diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000000..b21223c3726 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Two years until issues go stale +daysUntilStale: 730 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f9ad3f95d1..fb818edbbe8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,9 @@ variables: MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository - MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' + #MAVEN_CACHE_FOLDER: $(Agent.TempDirectory)/.m2/repository + #MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' + MAVEN_OPTS: '' trigger: - master @@ -15,17 +17,21 @@ jobs: timeoutInMinutes: 360 container: maven:3-jdk-11 steps: - - task: CacheBeta@0 + - task: Cache@2 inputs: - key: maven + key: 'maven | "$(Agent.OS)" | ./pom.xml' path: $(MAVEN_CACHE_FOLDER) + - task: Bash@3 + inputs: + targetType: 'inline' + script: mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER) - task: Maven@3 env: JAVA_HOME_11_X64: /usr/local/openjdk-11 inputs: goals: 'clean install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P ALLMODULES,JACOCO,CI,ERRORPRONE -nsu' + options: '-P ALLMODULES,JACOCO,CI,ERRORPRONE -nsu -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx2048m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index 2fca895151a..00000000000 --- a/examples/.gitignore +++ /dev/null @@ -1,125 +0,0 @@ -/target/ - -# Created by https://www.gitignore.io - -### Java ### -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -### Maven ### -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties - - -### Vim ### -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -*.un~ -Session.vim -.netrwhist -*~ - - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm - -*.iml - -## Directory-based project format: -.idea/ -# if you remove the above rule, at least ignore the following: - -# User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries - -# Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml - -# Gradle: -# .idea/gradle.xml -# .idea/libraries - -# Mongo Explorer plugin: -# .idea/mongoSettings.xml - -## File-based project format: -*.ipr -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties - - - -### Eclipse ### -*.pydevproject -.metadata -.gradle -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.loadpath - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# JDT-specific (Eclipse Java Development Tools) - -# PDT-specific -.buildpath - -# sbteclipse plugin -.target - -# TeXlipse plugin -.texlipse - diff --git a/examples/pom.xml b/examples/pom.xml deleted file mode 100644 index 83ae563ebbc..00000000000 --- a/examples/pom.xml +++ /dev/null @@ -1,133 +0,0 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-fhir - 4.2.0-SNAPSHOT - ../pom.xml - - - hapi-fhir-base-examples - jar - - HAPI FHIR - Examples (for site) - - - - - ca.uhn.hapi.fhir - hapi-fhir-bom - ${project.version} - import - pom - - - - - - - ca.uhn.hapi.fhir - hapi-fhir-base - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2 - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2.1 - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - - - ca.uhn.hapi.fhir - hapi-fhir-structures-r4 - - - ca.uhn.hapi.fhir - hapi-fhir-structures-hl7org-dstu2 - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu2 - - - ca.uhn.hapi.fhir - hapi-fhir-validation - - - ca.uhn.hapi.fhir - hapi-fhir-converter - - - ca.uhn.hapi.fhir - hapi-fhir-client-okhttp - - - javax.servlet - javax.servlet-api - provided - - - - ca.uhn.hapi.fhir - hapi-fhir-jaxrsserver-base - - - javax.ws.rs - javax.ws.rs-api - 2.0 - provided - - - javax.ejb - ejb-api - 3.0 - provided - - - org.springframework - spring-web - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-base - - - - org.slf4j - slf4j-simple - ${slf4j_version} - - - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - true - - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - diff --git a/examples/src/main/java/example/AuthorizationInterceptors.java b/examples/src/main/java/example/AuthorizationInterceptors.java deleted file mode 100644 index 009b725a11d..00000000000 --- a/examples/src/main/java/example/AuthorizationInterceptors.java +++ /dev/null @@ -1,216 +0,0 @@ -package example; - -import ca.uhn.fhir.interceptor.api.HookParams; -import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; -import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.annotation.Update; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; -import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; -import ca.uhn.fhir.rest.server.interceptor.auth.*; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import org.hl7.fhir.dstu3.model.IdType; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.List; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -@SuppressWarnings("unused") -public class AuthorizationInterceptors { - - public class PatientResourceProvider implements IResourceProvider - { - - @Override - public Class getResourceType() { - return Patient.class; - } - - public MethodOutcome create(@ResourceParam Patient thePatient, RequestDetails theRequestDetails) { - - return new MethodOutcome(); // populate this - } - - } - - //START SNIPPET: patientAndAdmin - @SuppressWarnings("ConstantConditions") - public class PatientAndAdminAuthorizationInterceptor extends AuthorizationInterceptor { - - @Override - public List buildRuleList(RequestDetails theRequestDetails) { - - // Process authorization header - The following is a fake - // implementation. Obviously we'd want something more real - // for a production scenario. - // - // In this basic example we have two hardcoded bearer tokens, - // one which is for a user that has access to one patient, and - // another that has full access. - IdDt userIdPatientId = null; - boolean userIsAdmin = false; - String authHeader = theRequestDetails.getHeader("Authorization"); - if ("Bearer dfw98h38r".equals(authHeader)) { - // This user has access only to Patient/1 resources - userIdPatientId = new IdDt("Patient", 1L); - } else if ("Bearer 39ff939jgg".equals(authHeader)) { - // This user has access to everything - userIsAdmin = true; - } else { - // Throw an HTTP 401 - throw new AuthenticationException("Missing or invalid Authorization header value"); - } - - // If the user is a specific patient, we create the following rule chain: - // Allow the user to read anything in their own patient compartment - // Allow the user to write anything in their own patient compartment - // If a client request doesn't pass either of the above, deny it - if (userIdPatientId != null) { - return new RuleBuilder() - .allow().read().allResources().inCompartment("Patient", userIdPatientId).andThen() - .allow().write().allResources().inCompartment("Patient", userIdPatientId).andThen() - .denyAll() - .build(); - } - - // If the user is an admin, allow everything - if (userIsAdmin) { - return new RuleBuilder() - .allowAll() - .build(); - } - - // By default, deny everything. This should never get hit, but it's - // good to be defensive - return new RuleBuilder() - .denyAll() - .build(); - } - } - //END SNIPPET: patientAndAdmin - - - //START SNIPPET: conditionalUpdate - @Update() - public MethodOutcome update( - @IdParam IdDt theId, - @ResourceParam Patient theResource, - @ConditionalUrlParam String theConditionalUrl, - ServletRequestDetails theRequestDetails, - IInterceptorBroadcaster theInterceptorBroadcaster) { - - // If we're processing a conditional URL... - if (isNotBlank(theConditionalUrl)) { - - // Pretend we've done the conditional processing. Now let's - // notify the interceptors that an update has been performed - // and supply the actual ID that's being updated - IdDt actual = new IdDt("Patient", "1123"); - - } - - // In a real server, perhaps we would process the conditional - // request differently and follow a separate path. Either way, - // let's pretend there is some storage code here. - theResource.setId(theId.withVersion("2")); - - // Notify the interceptor framework when we're about to perform an update. This is - // useful as the authorization interceptor will pick this event up and use it - // to factor into a decision about whether the operation should be allowed to proceed. - IBaseResource previousContents = theResource; - IBaseResource newContents = theResource; - HookParams params = new HookParams() - .add(IBaseResource.class, previousContents) - .add(IBaseResource.class, newContents) - .add(RequestDetails.class, theRequestDetails) - .add(ServletRequestDetails.class, theRequestDetails); - theInterceptorBroadcaster.callHooks(Pointcut.STORAGE_PRESTORAGE_RESOURCE_UPDATED, params); - - MethodOutcome retVal = new MethodOutcome(); - retVal.setCreated(true); - retVal.setResource(theResource); - return retVal; - } - //END SNIPPET: conditionalUpdate - - public void authorizeTenantAction() { - //START SNIPPET: authorizeTenantAction - new AuthorizationInterceptor(PolicyEnum.DENY) { - @Override - public List buildRuleList(RequestDetails theRequestDetails) { - return new RuleBuilder() - .allow().read().resourcesOfType(Patient.class).withAnyId().forTenantIds("TENANTA").andThen() - .build(); - } - }; - //END SNIPPET: authorizeTenantAction - - - //START SNIPPET: patchAll - new AuthorizationInterceptor(PolicyEnum.DENY) { - @Override - public List buildRuleList(RequestDetails theRequestDetails) { - return new RuleBuilder() - // Authorize patch requests - .allow().patch().allRequests().andThen() - // Authorize actual writes that patch may perform - .allow().write().allResources().inCompartment("Patient", new IdType("Patient/123")).andThen() - .build(); - } - }; - //END SNIPPET: patchAll - - } - - - //START SNIPPET: narrowing - public class MyPatientSearchNarrowingInterceptor extends SearchNarrowingInterceptor { - - /** - * This method must be overridden to provide the list of compartments - * and/or resources that the current user should have access to - */ - @Override - protected AuthorizedList buildAuthorizedList(RequestDetails theRequestDetails) { - // Process authorization header - The following is a fake - // implementation. Obviously we'd want something more real - // for a production scenario. - // - // In this basic example we have two hardcoded bearer tokens, - // one which is for a user that has access to one patient, and - // another that has full access. - String authHeader = theRequestDetails.getHeader("Authorization"); - if ("Bearer dfw98h38r".equals(authHeader)) { - - // This user will have access to two compartments - return new AuthorizedList() - .addCompartment("Patient/123") - .addCompartment("Patient/456"); - - } else if ("Bearer 39ff939jgg".equals(authHeader)) { - - // This user has access to everything - return new AuthorizedList(); - - } else { - - throw new AuthenticationException("Unknown bearer token"); - - } - - } - - } - //END SNIPPET: narrowing - - -} diff --git a/examples/src/main/java/example/AuthorizingTesterUiClientFactory.java b/examples/src/main/java/example/AuthorizingTesterUiClientFactory.java deleted file mode 100644 index 78c1d399ba0..00000000000 --- a/examples/src/main/java/example/AuthorizingTesterUiClientFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -package example; - -import javax.servlet.http.HttpServletRequest; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.client.interceptor.BasicAuthInterceptor; -import ca.uhn.fhir.rest.server.util.ITestingUiClientFactory; - -public class AuthorizingTesterUiClientFactory implements ITestingUiClientFactory { - - @Override - public IGenericClient newClient(FhirContext theFhirContext, HttpServletRequest theRequest, String theServerBaseUrl) { - // Create a client - IGenericClient client = theFhirContext.newRestfulGenericClient(theServerBaseUrl); - - // Register an interceptor which adds credentials - client.registerInterceptor(new BasicAuthInterceptor("someusername", "somepassword")); - - return client; - } - -} diff --git a/examples/src/main/java/example/BundleFetcher.java b/examples/src/main/java/example/BundleFetcher.java deleted file mode 100644 index 9da5300043d..00000000000 --- a/examples/src/main/java/example/BundleFetcher.java +++ /dev/null @@ -1,67 +0,0 @@ -package example; - -import java.util.HashSet; -import java.util.Set; - -import org.hl7.fhir.instance.model.api.IBaseBundle; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Bundle; -import ca.uhn.fhir.model.dstu2.resource.RelatedPerson; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -/** - * @author Bill de Beaubien on 1/13/2016. - */ -public class BundleFetcher { - public static void fetchRestOfBundle(IGenericClient theClient, Bundle theBundle) { - // we need to keep track of which resources are already in the bundle so that if other resources (e.g. Practitioner) are _included, - // we don't end up with multiple copies - Set resourcesAlreadyAdded = new HashSet(); - addInitialUrlsToSet(theBundle, resourcesAlreadyAdded); - Bundle partialBundle = theBundle; - for (;;) { - if (partialBundle.getLink(IBaseBundle.LINK_NEXT) != null) { - partialBundle = theClient.loadPage().next(partialBundle).execute(); - addAnyResourcesNotAlreadyPresentToBundle(theBundle, partialBundle, resourcesAlreadyAdded); - } else { - break; - } - } - // the self and next links for the aggregated bundle aren't really valid anymore, so remove them - theBundle.getLink().clear(); - } - - private static void addInitialUrlsToSet(Bundle theBundle, Set theResourcesAlreadyAdded) { - for (Bundle.Entry entry : theBundle.getEntry()) { - theResourcesAlreadyAdded.add(entry.getFullUrl()); - } - } - - private static void addAnyResourcesNotAlreadyPresentToBundle(Bundle theAggregatedBundle, Bundle thePartialBundle, Set theResourcesAlreadyAdded) { - for (Bundle.Entry entry : thePartialBundle.getEntry()) { - if (!theResourcesAlreadyAdded.contains(entry.getFullUrl())) { - theResourcesAlreadyAdded.add(entry.getFullUrl()); - theAggregatedBundle.getEntry().add(entry); - } - } - } - - public static void main(String[] args) throws Exception { - FhirContext ctx = FhirContext.forDstu2(); - String serverBase = "http://fhirtest.uhn.ca/baseDstu2"; - IGenericClient client = ctx.newRestfulGenericClient(serverBase); - // use RelatedPerson because there aren't that many on the server - Bundle bundle = client.search().forResource(RelatedPerson.class).returnBundle(Bundle.class).execute(); - BundleFetcher.fetchRestOfBundle(client, bundle); - if (bundle.getTotal() != bundle.getEntry().size()) { - System.out.println("Counts didn't match! Expected " + bundle.getTotal() + " but bundle only had " + bundle.getEntry().size() + " entries!"); - } - -// IParser parser = ctx.newXmlParser().setPrettyPrint(true); -// System.out.println(parser.encodeResourceToString(bundle)); - - } -} - - diff --git a/examples/src/main/java/example/ClientExamples.java b/examples/src/main/java/example/ClientExamples.java deleted file mode 100644 index 25a805d8dd8..00000000000 --- a/examples/src/main/java/example/ClientExamples.java +++ /dev/null @@ -1,224 +0,0 @@ -package example; - -import ca.uhn.fhir.rest.api.CacheControlDirective; -import org.hl7.fhir.dstu3.model.Bundle; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.okhttp.client.OkHttpRestfulClientFactory; -import ca.uhn.fhir.rest.api.EncodingEnum; -import ca.uhn.fhir.rest.client.apache.GZipContentInterceptor; -import ca.uhn.fhir.rest.client.api.*; -import ca.uhn.fhir.rest.client.interceptor.*; -import org.hl7.fhir.r4.model.Patient; - -public class ClientExamples { - - public interface IPatientClient extends IBasicClient { - // nothing yet - } - - @SuppressWarnings("unused") - public void createProxy() { - // START SNIPPET: proxy - FhirContext ctx = FhirContext.forDstu2(); - - // Set connections to access the network via the HTTP proxy at - // example.com : 8888 - ctx.getRestfulClientFactory().setProxy("example.com", 8888); - - // If the proxy requires authentication, use the following as well - ctx.getRestfulClientFactory().setProxyCredentials("theUsername", "thePassword"); - - // Create the client - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - // END SNIPPET: proxy - } - - @SuppressWarnings("unused") - public void processMessage() { - // START SNIPPET: processMessage - FhirContext ctx = FhirContext.forDstu3(); - - // Create the client - IGenericClient client = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - - Bundle bundle = new Bundle(); - // ..populate the bundle.. - - Bundle response = client - .operation() - .processMessage() // New operation for sending messages - .setMessageBundle(bundle) - .asynchronous(Bundle.class) - .execute(); - // END SNIPPET: processMessage - } - - @SuppressWarnings("unused") - public void cacheControl() { - FhirContext ctx = FhirContext.forDstu3(); - - // Create the client - IGenericClient client = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - - Bundle bundle = new Bundle(); - // ..populate the bundle.. - - // START SNIPPET: cacheControl - Bundle response = client - .search() - .forResource(Patient.class) - .returnBundle(Bundle.class) - .cacheControl(new CacheControlDirective().setNoCache(true)) // <-- add a directive - .execute(); - // END SNIPPET: cacheControl - } - - @SuppressWarnings("unused") - public void createOkHttp() { - // START SNIPPET: okhttp - FhirContext ctx = FhirContext.forDstu3(); - - // Use OkHttp - ctx.setRestfulClientFactory(new OkHttpRestfulClientFactory(ctx)); - - // Create the client - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - // END SNIPPET: okhttp - } - - @SuppressWarnings("unused") - public void createTimeouts() { - // START SNIPPET: timeouts - FhirContext ctx = FhirContext.forDstu2(); - - // Set how long to try and establish the initial TCP connection (in ms) - ctx.getRestfulClientFactory().setConnectTimeout(20 * 1000); - - // Set how long to block for individual read/write operations (in ms) - ctx.getRestfulClientFactory().setSocketTimeout(20 * 1000); - - // Create the client - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - // END SNIPPET: timeouts - } - - @SuppressWarnings("unused") - public void createSecurity() { - // START SNIPPET: security - // Create a context and get the client factory so it can be configured - FhirContext ctx = FhirContext.forDstu2(); - IRestfulClientFactory clientFactory = ctx.getRestfulClientFactory(); - - // Create an HTTP basic auth interceptor - String username = "foobar"; - String password = "boobear"; - IClientInterceptor authInterceptor = new BasicAuthInterceptor(username, password); - - // If you're usinf an annotation client, use this style to - // register it - IPatientClient annotationClient = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/fhir"); - annotationClient.registerInterceptor(authInterceptor); - - // If you're using a generic client, use this instead - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - genericClient.registerInterceptor(authInterceptor); - // END SNIPPET: security - } - - @SuppressWarnings("unused") - public void createCookie() { - // START SNIPPET: cookie - // Create a context and get the client factory so it can be configured - FhirContext ctx = FhirContext.forDstu2(); - IRestfulClientFactory clientFactory = ctx.getRestfulClientFactory(); - - // Create a cookie interceptor. This cookie will have the name "mycookie" and - // the value "Chips Ahoy" - CookieInterceptor interceptor = new CookieInterceptor("mycookie=Chips Ahoy"); - - // Register the interceptor with your client (either style) - IPatientClient annotationClient = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/fhir"); - annotationClient.registerInterceptor(interceptor); - - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - annotationClient.registerInterceptor(interceptor); - // END SNIPPET: cookie - } - - @SuppressWarnings("unused") - public void gzip() { - // START SNIPPET: gzip - // Create a context and get the client factory so it can be configured - FhirContext ctx = FhirContext.forDstu2(); - IRestfulClientFactory clientFactory = ctx.getRestfulClientFactory(); - - // Register the interceptor with your client (either style) - IPatientClient annotationClient = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/fhir"); - annotationClient.registerInterceptor(new GZipContentInterceptor()); - // END SNIPPET: gzip - } - - @SuppressWarnings("unused") - public void createSecurityBearer() { - // START SNIPPET: securityBearer - // Create a context and get the client factory so it can be configured - FhirContext ctx = FhirContext.forDstu2(); - IRestfulClientFactory clientFactory = ctx.getRestfulClientFactory(); - - // In reality the token would have come from an authorization server - String token = "3w03fj.r3r3t"; - - BearerTokenAuthInterceptor authInterceptor = new BearerTokenAuthInterceptor(token); - - // Register the interceptor with your client (either style) - IPatientClient annotationClient = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/fhir"); - annotationClient.registerInterceptor(authInterceptor); - - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - annotationClient.registerInterceptor(authInterceptor); - // END SNIPPET: securityBearer - } - - @SuppressWarnings("unused") - public void createLogging() { - { - // START SNIPPET: logging - // Create a context and get the client factory so it can be configured - FhirContext ctx = FhirContext.forDstu2(); - IRestfulClientFactory clientFactory = ctx.getRestfulClientFactory(); - - // Create a logging interceptor - LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); - - // Optionally you may configure the interceptor (by default only - // summary info is logged) - loggingInterceptor.setLogRequestSummary(true); - loggingInterceptor.setLogRequestBody(true); - - // Register the interceptor with your client (either style) - IPatientClient annotationClient = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/fhir"); - annotationClient.registerInterceptor(loggingInterceptor); - - IGenericClient genericClient = ctx.newRestfulGenericClient("http://localhost:9999/fhir"); - genericClient.registerInterceptor(loggingInterceptor); - // END SNIPPET: logging - } - - /******************************/ - { - // START SNIPPET: clientConfig - // Create a client - FhirContext ctx = FhirContext.forDstu2(); - IPatientClient client = ctx.newRestfulClient(IPatientClient.class, "http://localhost:9999/"); - - // Request JSON encoding from the server (_format=json) - client.setEncoding(EncodingEnum.JSON); - - // Request pretty printing from the server (_pretty=true) - client.setPrettyPrint(true); - // END SNIPPET: clientConfig - } - } - -} diff --git a/examples/src/main/java/example/ClientTransactionExamples.java b/examples/src/main/java/example/ClientTransactionExamples.java deleted file mode 100644 index 82ffe9f7639..00000000000 --- a/examples/src/main/java/example/ClientTransactionExamples.java +++ /dev/null @@ -1,94 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.composite.QuantityDt; -import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu2.resource.*; -import ca.uhn.fhir.model.dstu2.valueset.*; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -public class ClientTransactionExamples { - - public static void main(String[] args) { - conditionalCreate(); - } - - private static void conditionalCreate() { - - //START SNIPPET: conditional - // Create a patient object - Patient patient = new Patient(); - patient.addIdentifier() - .setSystem("http://acme.org/mrns") - .setValue("12345"); - patient.addName() - .addFamily("Jameson") - .addGiven("J") - .addGiven("Jonah"); - patient.setGender(AdministrativeGenderEnum.MALE); - - // Give the patient a temporary UUID so that other resources in - // the transaction can refer to it - patient.setId(IdDt.newRandomUuid()); - - // Create an observation object - Observation observation = new Observation(); - observation.setStatus(ObservationStatusEnum.FINAL); - observation - .getCode() - .addCoding() - .setSystem("http://loinc.org") - .setCode("789-8") - .setDisplay("Erythrocytes [#/volume] in Blood by Automated count"); - observation.setValue( - new QuantityDt() - .setValue(4.12) - .setUnit("10 trillion/L") - .setSystem("http://unitsofmeasure.org") - .setCode("10*12/L")); - - // The observation refers to the patient using the ID, which is already - // set to a temporary UUID - observation.setSubject(new ResourceReferenceDt(patient.getId().getValue())); - - // Create a bundle that will be used as a transaction - Bundle bundle = new Bundle(); - bundle.setType(BundleTypeEnum.TRANSACTION); - - // Add the patient as an entry. This entry is a POST with an - // If-None-Exist header (conditional create) meaning that it - // will only be created if there isn't already a Patient with - // the identifier 12345 - bundle.addEntry() - .setFullUrl(patient.getId().getValue()) - .setResource(patient) - .getRequest() - .setUrl("Patient") - .setIfNoneExist("identifier=http://acme.org/mrns|12345") - .setMethod(HTTPVerbEnum.POST); - - // Add the observation. This entry is a POST with no header - // (normal create) meaning that it will be created even if - // a similar resource already exists. - bundle.addEntry() - .setResource(observation) - .getRequest() - .setUrl("Observation") - .setMethod(HTTPVerbEnum.POST); - - // Log the request - FhirContext ctx = FhirContext.forDstu2(); - System.out.println(ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(bundle)); - - // Create a client and post the transaction to the server - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - Bundle resp = client.transaction().withBundle(bundle).execute(); - - // Log the response - System.out.println(ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); - //END SNIPPET: conditional - - } - -} diff --git a/examples/src/main/java/example/CompleteExampleClient.java b/examples/src/main/java/example/CompleteExampleClient.java deleted file mode 100644 index b58a0b47351..00000000000 --- a/examples/src/main/java/example/CompleteExampleClient.java +++ /dev/null @@ -1,66 +0,0 @@ -package example; - -//START SNIPPET: client -import java.io.IOException; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu2.resource.Organization; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.client.api.IRestfulClient; - -public class CompleteExampleClient { - - /** - * This is a simple client interface. It can have many methods for various - * searches but in this case it has only 1. - */ - public static interface ClientInterface extends IRestfulClient { - - /** - * This is translated into a URL similar to the following: - * http://fhir.healthintersections.com.au/open/Patient?identifier=urn:oid:1.2.36.146.595.217.0.1%7C12345 - */ - @Search - List findPatientsForMrn(@RequiredParam(name = Patient.SP_IDENTIFIER) IdentifierDt theIdentifier); - - } - - /** - * The main method here will directly call an open FHIR server and retrieve a - * list of resources matching a given criteria, then load a linked resource. - */ - public static void main(String[] args) throws IOException { - - // Create a client factory - FhirContext ctx = FhirContext.forDstu2(); - - // Create the client - String serverBase = "http://fhir.healthintersections.com.au/open"; - ClientInterface client = ctx.newRestfulClient(ClientInterface.class, serverBase); - - // Invoke the client to search for patient - List patients = client.findPatientsForMrn(new IdentifierDt("urn:oid:1.2.36.146.595.217.0.1", "12345")); - - System.out.println("Found " + patients.size() + " patients"); - - // Print a value from the loaded resource - Patient patient = patients.get(0); - System.out.println("Patient Last Name: " + patient.getName().get(0).getFamily().get(0).getValue()); - - // Load a referenced resource - ResourceReferenceDt managingRef = patient.getManagingOrganization(); - Organization org = (Organization) managingRef.loadResource(client); - - // Print organization name - System.out.println(org.getName()); - - } - -} -// END SNIPPET: client - diff --git a/examples/src/main/java/example/ConsentInterceptors.java b/examples/src/main/java/example/ConsentInterceptors.java deleted file mode 100644 index be9ba91ea03..00000000000 --- a/examples/src/main/java/example/ConsentInterceptors.java +++ /dev/null @@ -1,75 +0,0 @@ -package example; - -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; -import ca.uhn.fhir.rest.server.interceptor.consent.ConsentOutcome; -import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices; -import ca.uhn.fhir.rest.server.interceptor.consent.IConsentService; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.Observation; - -@SuppressWarnings("unused") -public class ConsentInterceptors { - - - //START SNIPPET: service - public class MyConsentService implements IConsentService { - - /** - * Invoked once at the start of every request - */ - @Override - public ConsentOutcome startOperation(RequestDetails theRequestDetails, IConsentContextServices theContextServices) { - // This means that all requests should flow through the consent service - // This has performance implications - If you know that some requests - // don't need consent checking it is a good idea to return - // ConsentOutcome.AUTHORIZED instead for those requests. - return ConsentOutcome.PROCEED; - } - - /** - * Can a given resource be returned to the user? - */ - @Override - public ConsentOutcome canSeeResource(RequestDetails theRequestDetails, IBaseResource theResource, IConsentContextServices theContextServices) { - // In this basic example, we will filter out lab results so that they - // are never disclosed to the user. A real interceptor might do something - // more nuanced. - if (theResource instanceof Observation) { - Observation obs = (Observation)theResource; - if (obs.getCategoryFirstRep().hasCoding("http://hl7.org/fhir/codesystem-observation-category.html", "laboratory")) { - return ConsentOutcome.REJECT; - } - } - - // Otherwise, allow the - return ConsentOutcome.PROCEED; - } - - /** - * Modify resources that are being shown to the user - */ - @Override - public ConsentOutcome willSeeResource(RequestDetails theRequestDetails, IBaseResource theResource, IConsentContextServices theContextServices) { - // Don't return the subject for Observation resources - if (theResource instanceof Observation) { - Observation obs = (Observation)theResource; - obs.setSubject(null); - } - return ConsentOutcome.AUTHORIZED; - } - - @Override - public void completeOperationSuccess(RequestDetails theRequestDetails, IConsentContextServices theContextServices) { - // We could write an audit trail entry in here - } - - @Override - public void completeOperationFailure(RequestDetails theRequestDetails, BaseServerResponseException theException, IConsentContextServices theContextServices) { - // We could write an audit trail entry in here - } - } - //END SNIPPET: service - - -} diff --git a/examples/src/main/java/example/ConverterExamples.java b/examples/src/main/java/example/ConverterExamples.java deleted file mode 100644 index 219b59f7a22..00000000000 --- a/examples/src/main/java/example/ConverterExamples.java +++ /dev/null @@ -1,39 +0,0 @@ -package example; - -import org.hl7.fhir.converter.NullVersionConverterAdvisor30; -import org.hl7.fhir.convertors.*; -import org.hl7.fhir.exceptions.FHIRException; - -public class ConverterExamples { - - @SuppressWarnings("unused") - public void c1020() throws FHIRException { - //START SNIPPET: 1020 - // Create a converter - NullVersionConverterAdvisor30 advisor = new NullVersionConverterAdvisor30(); - VersionConvertor_10_30 converter = new VersionConvertor_10_30(advisor); - - // Create an input resource to convert - org.hl7.fhir.dstu2.model.Observation input = new org.hl7.fhir.dstu2.model.Observation(); - input.setEncounter(new org.hl7.fhir.dstu2.model.Reference("Encounter/123")); - - // Convert the resource - org.hl7.fhir.dstu3.model.Observation output = converter.convertObservation(input); - String context = output.getContext().getReference(); - //END SNIPPET: 1020 - } - - @SuppressWarnings("unused") - public void c1420() throws FHIRException { - //START SNIPPET: 1420 - // Create a resource to convert - org.hl7.fhir.dstu2016may.model.Questionnaire input = new org.hl7.fhir.dstu2016may.model.Questionnaire(); - input.setTitle("My title"); - - // Convert the resource - org.hl7.fhir.dstu3.model.Questionnaire output = VersionConvertor_14_30.convertQuestionnaire(input); - String context = output.getTitle(); - //END SNIPPET: 1420 - } - -} diff --git a/examples/src/main/java/example/Copier.java b/examples/src/main/java/example/Copier.java deleted file mode 100644 index f73c23e1df3..00000000000 --- a/examples/src/main/java/example/Copier.java +++ /dev/null @@ -1,121 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.util.ResourceReferenceInfo; -import org.hl7.fhir.dstu3.model.Bundle; -import org.hl7.fhir.dstu3.model.Resource; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -@SuppressWarnings("unused") -public class Copier { - private static final Logger ourLog = LoggerFactory.getLogger(Copier.class); - - public static void main(String[] args) { - FhirContext ctx = FhirContext.forDstu3(); - IGenericClient source = ctx.newRestfulGenericClient("http://localhost:8080/baseDstu3"); - IGenericClient target = ctx.newRestfulGenericClient("https://try.smilecdr.com:8000"); - - List resType = Arrays.asList( - "Patient", "Organization", "Encounter", "Procedure", - "Observation", "ResearchSubject", "Specimen", - "ResearchStudy", "Location", "Practitioner" - ); - - List queued = new ArrayList<>(); - Set sent = new HashSet<>(); - for (String next : resType) { - copy(ctx, source, target, next, queued, sent); - } - - while (queued.size() > 0) { - ourLog.info("Have {} queued resources to deliver", queued.size()); - - for (IBaseResource nextQueued : new ArrayList<>(queued)) { - - String missingRef = null; - for (ResourceReferenceInfo nextRefInfo : ctx.newTerser().getAllResourceReferences(nextQueued)) { - String nextRef = nextRefInfo.getResourceReference().getReferenceElement().getValue(); - if (isNotBlank(nextRef) && !sent.contains(nextRef)) { - missingRef = nextRef; - } - } - if (missingRef != null) { - ourLog.info("Can't send {} because of missing ref {}", nextQueued.getIdElement().getIdPart(), missingRef); - continue; - } - - IIdType newId = target - .update() - .resource(nextQueued) - .execute() - .getId(); - - ourLog.info("Copied resource {} and got ID {}", nextQueued.getIdElement().getValue(), newId); - sent.add(nextQueued.getIdElement().toUnqualifiedVersionless().getValue()); - queued.remove(nextQueued); - } - } - - - } - - private static void copy(FhirContext theCtx, IGenericClient theSource, IGenericClient theTarget, String theResType, List theQueued, Set theSent) { - Bundle received = theSource - .search() - .forResource(theResType) - .returnBundle(Bundle.class) - .execute(); - copy(theCtx, theTarget, theResType, theQueued, theSent, received); - - while (received.getLink("next") != null) { - ourLog.info("Fetching next page..."); - received = theSource.loadPage().next(received).execute(); - copy(theCtx, theTarget, theResType, theQueued, theSent, received); - } - - } - - private static void copy(FhirContext theCtx, IGenericClient theTarget, String theResType, List theQueued, Set theSent, Bundle theReceived) { - for (Bundle.BundleEntryComponent nextEntry : theReceived.getEntry()) { - Resource nextResource = nextEntry.getResource(); - nextResource.setId(theResType + "/" + "CR-" + nextResource.getIdElement().getIdPart()); - - boolean haveUnsentReference = false; - for (ResourceReferenceInfo nextRefInfo : theCtx.newTerser().getAllResourceReferences(nextResource)) { - IIdType nextRef = nextRefInfo.getResourceReference().getReferenceElement(); - if (nextRef.hasIdPart()) { - String newRef = nextRef.getResourceType() + "/" + "CR-" + nextRef.getIdPart(); - ourLog.info("Changing reference {} to {}", nextRef.getValue(), newRef); - nextRefInfo.getResourceReference().setReference(newRef); - if (!theSent.contains(newRef)) { - haveUnsentReference = true; - } - } - } - - if (haveUnsentReference) { - ourLog.info("Queueing {} for delivery after", nextResource.getId()); - theQueued.add(nextResource); - continue; - } - - IIdType newId = theTarget - .update() - .resource(nextResource) - .execute() - .getId(); - - ourLog.info("Copied resource {} and got ID {}", nextResource.getId(), newId); - theSent.add(nextResource.getIdElement().toUnqualifiedVersionless().getValue()); - } - } - -} diff --git a/examples/src/main/java/example/CustomObservation.java b/examples/src/main/java/example/CustomObservation.java deleted file mode 100644 index 54269735c0e..00000000000 --- a/examples/src/main/java/example/CustomObservation.java +++ /dev/null @@ -1,7 +0,0 @@ -package example; - -import org.hl7.fhir.dstu3.model.Observation; - -public class CustomObservation extends Observation { - -} diff --git a/examples/src/main/java/example/Dstu2Examples.java b/examples/src/main/java/example/Dstu2Examples.java deleted file mode 100644 index 5456c55a522..00000000000 --- a/examples/src/main/java/example/Dstu2Examples.java +++ /dev/null @@ -1,67 +0,0 @@ -package example; - -import java.util.Collection; - -import javax.servlet.ServletException; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.RestfulServer; - -@SuppressWarnings("serial") -public class Dstu2Examples { - private Collection resourceProviderList; - - public static void main(String[] args) { - new Dstu2Examples().getResourceTags(); - } - - @SuppressWarnings("unused") - public void getResourceTags() { - // START SNIPPET: context - // Create a DSTU2 context, which will use DSTU2 semantics - FhirContext ctx = FhirContext.forDstu2(); - - // This parser supports DSTU2 - IParser parser = ctx.newJsonParser(); - - // This client supports DSTU2 - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - // END SNIPPET: context - } - - - // START SNIPPET: server - public class MyServer extends RestfulServer - { - - @Override - protected void initialize() throws ServletException { - - // In your initialize method, assign a DSTU2 FhirContext. This - // is all that is required in order to put the server - // into DSTU2 mode - setFhirContext(FhirContext.forDstu2()); - - // Then set resource providers as normal, and do any other - // configuration you need to do. - setResourceProviders(resourceProviderList); - - } - - } - // END SNIPPET: server - - - public void upgrade() { - // START SNIPPET: client - FhirContext ctxDstu2 = FhirContext.forDstu2(); - IGenericClient clientDstu2 = ctxDstu2.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - - // END SNIPPET: client - - } - -} diff --git a/examples/src/main/java/example/ExampleProviders.java b/examples/src/main/java/example/ExampleProviders.java deleted file mode 100644 index 8a41d40a469..00000000000 --- a/examples/src/main/java/example/ExampleProviders.java +++ /dev/null @@ -1,82 +0,0 @@ -package example; - -import java.util.ArrayList; -import java.util.List; - -import org.hl7.fhir.dstu3.model.Bundle; - -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.server.HardcodedServerAddressStrategy; -import ca.uhn.fhir.rest.server.IResourceProvider; - -@SuppressWarnings(value= {"serial"}) -public class ExampleProviders { - - -//START SNIPPET: plainProvider -public class PlainProvider { - - /** - * This method is a Patient search, but HAPI can not automatically - * determine the resource type so it must be explicitly stated. - */ - @Search(type=Patient.class) - public Bundle searchForPatients(@RequiredParam(name=Patient.SP_NAME) StringDt theName) { - Bundle retVal = new Bundle(); - // perform search - return retVal; - } - -} -//END SNIPPET: plainProvider - - -//START SNIPPET: plainProviderServer -public class ExampleServlet extends ca.uhn.fhir.rest.server.RestfulServer { - - /** - * Constructor - */ - public ExampleServlet() { - /* - * Plain providers are passed to the server in the same way - * as resource providers. You may pass both resource providers - * and and plain providers to the same server if you like. - */ - List plainProviders=new ArrayList(); - plainProviders.add(new PlainProvider()); - registerProviders(plainProviders); - - List resourceProviders = new ArrayList(); - // ...add some resource providers... - registerProviders(resourceProviders); - } - -} -//END SNIPPET: plainProviderServer - - //START SNIPPET: addressStrategy - public class MyServlet extends ca.uhn.fhir.rest.server.RestfulServer { - - /** - * Constructor - */ - public MyServlet() { - - String serverBaseUrl = "http://foo.com/fhir"; - setServerAddressStrategy(new HardcodedServerAddressStrategy(serverBaseUrl)); - - // ...add some resource providers, etc... - List resourceProviders = new ArrayList(); - setResourceProviders(resourceProviders); - } - - } -//END SNIPPET: addressStrategy - - - -} diff --git a/examples/src/main/java/example/ExampleRestfulClient.java b/examples/src/main/java/example/ExampleRestfulClient.java deleted file mode 100644 index 16e05c2304e..00000000000 --- a/examples/src/main/java/example/ExampleRestfulClient.java +++ /dev/null @@ -1,26 +0,0 @@ -package example; - -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.StringDt; - -@SuppressWarnings("unused") -public class ExampleRestfulClient { - -//START SNIPPET: client -public static void main(String[] args) { - FhirContext ctx = FhirContext.forDstu2(); - String serverBase = "http://foo.com/fhirServerBase"; - - // Create the client - IRestfulClient client = ctx.newRestfulClient(IRestfulClient.class, serverBase); - - // Try the client out! This method will invoke the server - List patients = client.getPatient(new StringDt("SMITH")); - -} -//END SNIPPET: client - -} diff --git a/examples/src/main/java/example/ExampleRestfulServlet.java b/examples/src/main/java/example/ExampleRestfulServlet.java deleted file mode 100644 index 34bd915a86d..00000000000 --- a/examples/src/main/java/example/ExampleRestfulServlet.java +++ /dev/null @@ -1,45 +0,0 @@ -package example; - -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; - -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.RestfulServer; - -//START SNIPPET: servlet -/** - * In this example, we are using Servlet 3.0 annotations to define - * the URL pattern for this servlet, but we could also - * define this in a web.xml file. - */ -@WebServlet(urlPatterns= {"/fhir/*"}, displayName="FHIR Server") -public class ExampleRestfulServlet extends RestfulServer { - - private static final long serialVersionUID = 1L; - - /** - * The initialize method is automatically called when the servlet is starting up, so it can - * be used to configure the servlet to define resource providers, or set up - * configuration, interceptors, etc. - */ - @Override - protected void initialize() throws ServletException { - /* - * The servlet defines any number of resource providers, and - * configures itself to use them by calling - * setResourceProviders() - */ - List resourceProviders = new ArrayList(); - resourceProviders.add(new RestfulPatientResourceProvider()); - resourceProviders.add(new RestfulObservationResourceProvider()); - setResourceProviders(resourceProviders); - } - -} -//END SNIPPET: servlet - - - diff --git a/examples/src/main/java/example/ExtensionsDstu2.java b/examples/src/main/java/example/ExtensionsDstu2.java deleted file mode 100644 index fe0a272ce5f..00000000000 --- a/examples/src/main/java/example/ExtensionsDstu2.java +++ /dev/null @@ -1,106 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.ExtensionDt; -import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.resource.Questionnaire; -import ca.uhn.fhir.model.dstu2.resource.Questionnaire.GroupQuestion; -import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; -import ca.uhn.fhir.model.primitive.CodeDt; -import ca.uhn.fhir.model.primitive.DateTimeDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.parser.DataFormatException; - -public class ExtensionsDstu2 { - -@SuppressWarnings("unused") -public static void main(String[] args) throws DataFormatException, IOException { - - { - Questionnaire q= new Questionnaire(); - GroupQuestion item = q.getGroup().addQuestion(); - item.setText("Hello"); - - ExtensionDt extension = new ExtensionDt(false, "http://hl7.org/fhir/StructureDefinition/translation"); - item.getTextElement().addUndeclaredExtension(extension); - - extension.addUndeclaredExtension(new ExtensionDt(false, "lang", new CodeDt("es"))); - extension.addUndeclaredExtension(new ExtensionDt(false, "cont", new StringDt("hola"))); - - System.out.println(FhirContext.forDstu2().newJsonParser().setPrettyPrint(true).encodeResourceToString(q)); - } - - -// START SNIPPET: resourceExtension -// Create an example patient -Patient patient = new Patient(); -patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); - -// Create an extension -ExtensionDt ext = new ExtensionDt(); -ext.setModifier(false); -ext.setUrl("http://example.com/extensions#someext"); -ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); - -// Add the extension to the resource -patient.addUndeclaredExtension(ext); -//END SNIPPET: resourceExtension - - -//START SNIPPET: resourceStringExtension -// Continuing the example from above, we will add a name to the patient, and then -// add an extension to part of that name -HumanNameDt name = patient.addName(); -name.addFamily().setValue("Shmoe"); - -// Add a new "given name", which is of type StringDt -StringDt given = name.addGiven(); -given.setValue("Joe"); - -// Create an extension and add it to the StringDt -ExtensionDt givenExt = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); -given.addUndeclaredExtension(givenExt); -//END SNIPPET: resourceStringExtension - -FhirContext ctx = FhirContext.forDstu2(); -String output = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(output); - - -//START SNIPPET: parseExtension -// Get all extensions (modifier or not) for a given URL -List resourceExts = patient.getUndeclaredExtensionsByUrl("http://fooextensions.com#exts"); - -// Get all non-modifier extensions regardless of URL -List nonModExts = patient.getUndeclaredExtensions(); - -//Get all non-modifier extensions regardless of URL -List modExts = patient.getUndeclaredModifierExtensions(); -//END SNIPPET: parseExtension - -} - - -public void foo() { -//START SNIPPET: subExtension -Patient patient = new Patient(); - -// Add an extension (initially with no contents) to the resource -ExtensionDt parent = new ExtensionDt(false, "http://example.com#parent"); -patient.addUndeclaredExtension(parent); - -// Add two extensions as children to the parent extension -ExtensionDt child1 = new ExtensionDt(false, "http://example.com#childOne", new StringDt("value1")); -parent.addUndeclaredExtension(child1); - -ExtensionDt child2 = new ExtensionDt(false, "http://example.com#childTwo", new StringDt("value1")); -parent.addUndeclaredExtension(child2); -//END SNIPPET: subExtension - -} - -} diff --git a/examples/src/main/java/example/ExtensionsDstu3.java b/examples/src/main/java/example/ExtensionsDstu3.java deleted file mode 100644 index 0593761c662..00000000000 --- a/examples/src/main/java/example/ExtensionsDstu3.java +++ /dev/null @@ -1,160 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.List; - -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.dstu3.model.Identifier.IdentifierUse; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -public class ExtensionsDstu3 { - - public void customType() { - -IGenericClient client = FhirContext.forDstu3().newRestfulGenericClient("http://foo"); - -//START SNIPPET: customTypeClientSimple -// Create an example patient -MyPatient custPatient = new MyPatient(); -custPatient.addName().setFamily("Smith").addGiven("John"); -custPatient.setPetName(new StringType("Rover")); // populate the extension - -// Create the resource like normal -client.create().resource(custPatient).execute(); - -// You can also read the resource back like normal -custPatient = client.read().resource(MyPatient.class).withId("123").execute(); -//END SNIPPET: customTypeClientSimple - -//START SNIPPET: customTypeClientSearch -// Perform the search using the custom type -Bundle bundle = client - .search() - .forResource(MyPatient.class) - .returnBundle(Bundle.class) - .execute(); - -// Entries in the return bundle will use the given type -MyPatient pat0 = (MyPatient) bundle.getEntry().get(0).getResource(); -//END SNIPPET: customTypeClientSearch - -//START SNIPPET: customTypeClientSearch2 -//Perform the search using the custom type -bundle = client - .history() - .onInstance(new IdType("Patient/123")) - .andReturnBundle(Bundle.class) - .preferResponseType(MyPatient.class) - .execute(); - -//Entries in the return bundle will use the given type -MyPatient historyPatient0 = (MyPatient) bundle.getEntry().get(0).getResource(); -//END SNIPPET: customTypeClientSearch2 - - } - - public void customTypeDeclared() { - - -//START SNIPPET: customTypeClientDeclared -FhirContext ctx = FhirContext.forDstu3(); - -// Instruct the context that if it receives a resource which -// claims to conform to the given profile (by URL), it should -// use the MyPatient type to parse this resource -ctx.setDefaultTypeForProfile("http://example.com/StructureDefinition/mypatient", MyPatient.class); - -// You can declare as many default types as you like -ctx.setDefaultTypeForProfile("http://foo.com/anotherProfile", CustomObservation.class); - -// Create a client -IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu3"); - -// You can also read the resource back like normal -Patient patient = client.read().resource(Patient.class).withId("123").execute(); -if (patient instanceof MyPatient) { - // If the server supplied a resource which declared to conform - // to the given profile, MyPatient will have been returned so - // process it differently.. -} - -//END SNIPPET: customTypeClientDeclared - - - } - -@SuppressWarnings("unused") -public static void main(String[] args) throws DataFormatException, IOException { - - -// START SNIPPET: resourceExtension -// Create an example patient -Patient patient = new Patient(); -patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135"); - -// Create an extension -Extension ext = new Extension(); -ext.setUrl("http://example.com/extensions#someext"); -ext.setValue(new DateTimeType("2011-01-02T11:13:15")); - -// Add the extension to the resource -patient.addExtension(ext); -//END SNIPPET: resourceExtension - - -//START SNIPPET: resourceStringExtension -// Continuing the example from above, we will add a name to the patient, and then -// add an extension to part of that name -HumanName name = patient.addName(); -name.setFamily("Shmoe"); - -// Add a new "given name", which is of type String -StringType given = name.addGivenElement(); -given.setValue("Joe"); - -// Create an extension and add it to the String -Extension givenExt = new Extension("http://examples.com#moreext", new StringType("Hello")); -given.addExtension(givenExt); -//END SNIPPET: resourceStringExtension - -FhirContext ctx = FhirContext.forDstu3(); -String output = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(output); - - -//START SNIPPET: parseExtension -// Get all extensions (modifier or not) for a given URL -List resourceExts = patient.getExtensionsByUrl("http://fooextensions.com#exts"); - -// Get all non-modifier extensions regardless of URL -List nonModExts = patient.getExtension(); - -//Get all non-modifier extensions regardless of URL -List modExts = patient.getModifierExtension(); -//END SNIPPET: parseExtension - -} - - -public void foo() { -//START SNIPPET: subExtension -Patient patient = new Patient(); - -// Add an extension (initially with no contents) to the resource -Extension parent = new Extension("http://example.com#parent"); -patient.addExtension(parent); - -// Add two extensions as children to the parent extension -Extension child1 = new Extension("http://example.com#childOne", new StringType("value1")); -parent.addExtension(child1); - -Extension child2 = new Extension("http://example.com#chilwo", new StringType("value1")); -parent.addExtension(child2); -//END SNIPPET: subExtension - -} - -} diff --git a/examples/src/main/java/example/FhirContextIntro.java b/examples/src/main/java/example/FhirContextIntro.java deleted file mode 100644 index 0ee77203a77..00000000000 --- a/examples/src/main/java/example/FhirContextIntro.java +++ /dev/null @@ -1,137 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; -import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu2.resource.Observation; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.NameUseEnum; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.parser.IParser; - -public class FhirContextIntro { - - @SuppressWarnings("unused") - public static void creatingContext() { -// START SNIPPET: creatingContext -// Create a context for DSTU2 -FhirContext ctxDstu2 = FhirContext.forDstu2(); - -// Alternately, create a context for R4 -FhirContext ctxR4 = FhirContext.forR4(); -// END SNIPPET: creatingContext - - } - - @SuppressWarnings("unused") - public static void creatingContextHl7org() { -// START SNIPPET: creatingContextHl7org -// Create a context for DSTU3 -FhirContext ctx = FhirContext.forDstu3(); - -// Working with RI structures is similar to how it works with the HAPI structures -org.hl7.fhir.dstu3.model.Patient patient = new org.hl7.fhir.dstu3.model.Patient(); -patient.addName().addGiven("John").setFamily("Smith"); -patient.getBirthDateElement().setValueAsString("1998-02-22"); - -// Parsing and encoding works the same way too -String encoded = ctx.newJsonParser().encodeResourceToString(patient); - -// END SNIPPET: creatingContextHl7org - - } - - public static void main(String[] args) throws DataFormatException { - -new FhirContextIntro().encodeMsg(); - - - } - - public void encodeMsg() throws DataFormatException { -FhirContext ctx = new FhirContext(Patient.class, Observation.class); -//START SNIPPET: encodeMsg - -/** - * FHIR model types in HAPI are simple POJOs. To create a new - * one, invoke the default constructor and then - * start populating values. - */ -Patient patient = new Patient(); - -// Add an MRN (a patient identifier) -IdentifierDt id = patient.addIdentifier(); -id.setSystem("http://example.com/fictitious-mrns"); -id.setValue("MRN001"); - -// Add a name -HumanNameDt name = patient.addName(); -name.setUse(NameUseEnum.OFFICIAL); -name.addFamily("Tester"); -name.addGiven("John"); -name.addGiven("Q"); - -// We can now use a parser to encode this resource into a string. -String encoded = ctx.newXmlParser().encodeResourceToString(patient); -System.out.println(encoded); -//END SNIPPET: encodeMsg - -//START SNIPPET: encodeMsgJson -IParser jsonParser = ctx.newJsonParser(); -jsonParser.setPrettyPrint(true); -encoded = jsonParser.encodeResourceToString(patient); -System.out.println(encoded); -//END SNIPPET: encodeMsgJson - - - } - - -public void fluent() throws DataFormatException { -FhirContext ctx = new FhirContext(Patient.class, Observation.class); -String encoded; -//START SNIPPET: encodeMsgFluent -Patient patient = new Patient(); -patient.addIdentifier().setSystem("http://example.com/fictitious-mrns").setValue("MRN001"); -patient.addName().setUse(NameUseEnum.OFFICIAL).addFamily("Tester").addGiven("John").addGiven("Q"); - -encoded = ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(encoded); -//END SNIPPET: encodeMsgFluent - -} - - - public static void parseMsg() { -FhirContext ctx = FhirContext.forR4(); - -//START SNIPPET: parseMsg -// The following is an example Patient resource -String msgString = "" - + "
John Cardinal
" - + "" - + "" - + "" - + "
" - + "
"; - -// The hapi context object is used to create a new XML parser -// instance. The parser can then be used to parse (or unmarshall) the -// string message into a Patient object -IParser parser = ctx.newXmlParser(); -Patient patient = parser.parseResource(Patient.class, msgString); - -// The patient object has accessor methods to retrieve all of the -// data which has been parsed into the instance. -String patientId = patient.getIdentifier().get(0).getValue(); -String familyName = patient.getName().get(0).getFamily().get(0).getValue(); -String gender = patient.getGender(); - -System.out.println(patientId); // PRP1660 -System.out.println(familyName); // Cardinal -System.out.println(gender); // M -//END SNIPPET: parseMsg - - } - -} diff --git a/examples/src/main/java/example/FhirDataModel.java b/examples/src/main/java/example/FhirDataModel.java deleted file mode 100644 index d6d521a4586..00000000000 --- a/examples/src/main/java/example/FhirDataModel.java +++ /dev/null @@ -1,224 +0,0 @@ -package example; - -import java.util.*; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.dstu2.composite.*; -import ca.uhn.fhir.model.dstu2.resource.Observation; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.*; -import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -public class FhirDataModel { - - public static void datatypes() { - // START SNIPPET: datatypes - Observation obs = new Observation(); - - // These are all equivalent - obs.setIssued(new InstantDt(new Date())); - obs.setIssued(new Date(), TemporalPrecisionEnum.MILLI); - obs.setIssuedWithMillisPrecision(new Date()); - - // The InstantDt also lets you work with the instant as a Java Date - // object or as a FHIR String. - Date date = obs.getIssuedElement().getValue(); // A date object - String dateString = obs.getIssuedElement().getValueAsString(); // "2014-03-08T12:59:58.068-05:00" - // END SNIPPET: datatypes - - System.out.println(date); - System.out.println(dateString); - - } - - @SuppressWarnings("unused") - public void nonNull() { - // START SNIPPET: nonNull - Observation observation = new Observation(); - - // None of these calls will not return null, but instead create their - // respective - // child elements. - List identifierList = observation.getIdentifier(); - CodeableConceptDt code = observation.getCode(); - StringDt textElement = observation.getCode().getTextElement(); - - // DateTimeDt is a FHIR primitive however, so the following will return - // null - // unless a value has been placed there. - Date active = observation.addIdentifier().getPeriod().getStartElement().getValue(); - // END SNIPPET: nonNull - - } - - @SuppressWarnings("unused") - public static void codes() { - // START SNIPPET: codes - Patient patient = new Patient(); - - // You can set this code using a String if you want. Note that - // for "closed" valuesets (such as the one used for Patient.gender) - // you must use one of the strings defined by the FHIR specification. - // You must not define your own. - patient.getGenderElement().setValue("male"); - - // HAPI also provides Java enumerated types which make it easier to - // deal with coded values. This code achieves the exact same result - // as the code above. - patient.setGender(AdministrativeGenderEnum.MALE); - - // You can also retrieve coded values the same way - String genderString = patient.getGenderElement().getValueAsString(); - AdministrativeGenderEnum genderEnum = patient.getGenderElement().getValueAsEnum(); - - // The following is a shortcut to create - patient.setMaritalStatus(MaritalStatusCodesEnum.M); - // END SNIPPET: codes - - } - - - @SuppressWarnings("unused") - public static void codeableConcepts() { - // START SNIPPET: codeableConcepts - Patient patient = new Patient(); - - // Coded types can naturally be set using plain strings - CodingDt statusCoding = patient.getMaritalStatus().addCoding(); - statusCoding.setSystem("http://hl7.org/fhir/v3/MaritalStatus"); - statusCoding.setCode("M"); - statusCoding.setDisplay("Married"); - - // You could add a second coding to the field if needed too. This - // can be useful if you want to convey the concept using different - // codesystems. - CodingDt secondStatus = patient.getMaritalStatus().addCoding(); - secondStatus.setCode("H"); - secondStatus.setSystem("http://example.com#maritalStatus"); - secondStatus.setDisplay("Happily Married"); - - // CodeableConcept also has a text field meant to convey - // a user readable version of the concepts it conveys. - patient.getMaritalStatus().setText("Happily Married"); - - // There are also accessors for retrieving values - String firstCode = patient.getMaritalStatus().getCoding().get(0).getCode(); - String secondCode = patient.getMaritalStatus().getCoding().get(1).getCode(); - // END SNIPPET: codeableConcepts - - } - - @SuppressWarnings("unused") - public static void codeableConceptEnums() { - // START SNIPPET: codeableConceptEnums - Patient patient = new Patient(); - - // Set the CodeableConcept's first coding to use the code - // and codesystem associated with the M value. - patient.setMaritalStatus(MaritalStatusCodesEnum.M); - - // If you need to set other fields (such as the display name) after - // using the Enum type, you may still do so. - patient.getMaritalStatus().getCodingFirstRep().setDisplay("Married"); - patient.getMaritalStatus().getCodingFirstRep().setVersion("1.0"); - patient.getMaritalStatus().getCodingFirstRep().setUserSelected(true); - - // You can use accessors to retrieve values from CodeableConcept fields - - // Returns "M" - String code = patient.getMaritalStatus().getCodingFirstRep().getCode(); - - // Returns "http://hl7.org/fhir/v3/MaritalStatus". This value was also - // populated via the enum above. - String codeSystem = patient.getMaritalStatus().getCodingFirstRep().getCode(); - - // In many cases, Enum types can be used to retrieve values as well. Note that - // the setter takes a single type, but the getter returns a Set, because the - // field can technicaly contain more than one code and codesystem. BE CAREFUL - // when using this method however, as no Enum will be returned in the case - // that the field contains only a code other than the ones defined by the Enum. - Set status = patient.getMaritalStatus().getValueAsEnum(); - // END SNIPPET: codeableConceptEnums - - } - - - public static void main(String[] args) { - tmp(); - - - datatypes(); - - // START SNIPPET: observation - // Create an Observation instance - Observation observation = new Observation(); - - // Give the observation a status - observation.setStatus(ObservationStatusEnum.FINAL); - - // Give the observation a code (what kind of observation is this) - CodingDt coding = observation.getCode().addCoding(); - coding.setCode("29463-7").setSystem("http://loinc.org").setDisplay("Body Weight"); - - // Create a quantity datatype - QuantityDt value = new QuantityDt(); - value.setValue(83.9).setSystem("http://unitsofmeasure.org").setCode("kg"); - observation.setValue(value); - - // Set the reference range - SimpleQuantityDt low = new SimpleQuantityDt(); - low.setValue(45).setSystem("http://unitsofmeasure.org").setCode("kg"); - observation.getReferenceRangeFirstRep().setLow(low); - SimpleQuantityDt high = new SimpleQuantityDt(); - low.setValue(90).setSystem("http://unitsofmeasure.org").setCode("kg"); - observation.getReferenceRangeFirstRep().setHigh(high); - - // END SNIPPET: observation - - - } - - private static void tmp() { -// Create a FHIR Context -FhirContext ctx = FhirContext.forDstu2(); - -// Create a client -IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - -// Read a patient with the given ID -Patient patient = client - .read() - .resource(Patient.class) - .withId("952975") - .execute(); - -// Print the patient's name -String string = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(string); - - } - - public void namesHard() { - // START SNIPPET: namesHard - Patient patient = new Patient(); - HumanNameDt name = patient.addName(); - StringDt family = name.addFamily(); - family.setValue("Smith"); - StringDt firstName = name.addGiven(); - firstName.setValue("Rob"); - StringDt secondName = name.addGiven(); - secondName.setValue("Bruce"); - // END SNIPPET: namesHard - } - - public void namesEasy() { - // START SNIPPET: namesEasy - Patient patient = new Patient(); - patient.addName().addFamily("Smith").addGiven("Rob").addGiven("Bruce"); - // END SNIPPET: namesEasy - } - -} diff --git a/examples/src/main/java/example/GenericClientExample.java b/examples/src/main/java/example/GenericClientExample.java deleted file mode 100644 index 8366f2c147b..00000000000 --- a/examples/src/main/java/example/GenericClientExample.java +++ /dev/null @@ -1,536 +0,0 @@ -package example; - -import java.util.ArrayList; -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.PerformanceOptionsEnum; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.dstu2.resource.*; -import ca.uhn.fhir.model.dstu2.resource.OperationOutcome.Issue; -import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; -import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum; -import ca.uhn.fhir.model.primitive.*; -import ca.uhn.fhir.rest.api.*; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; -import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; -import ca.uhn.fhir.rest.param.DateRangeParam; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; - -public class GenericClientExample { - public static void deferModelScanning() { - // START SNIPPET: deferModelScanning - // Create a context and configure it for deferred child scanning - FhirContext ctx = FhirContext.forDstu2(); - ctx.setPerformanceOptions(PerformanceOptionsEnum.DEFERRED_MODEL_SCANNING); - - // Now create a client and use it - String serverBase = "http://fhirtest.uhn.ca/baseDstu2"; - IGenericClient client = ctx.newRestfulGenericClient(serverBase); - // END SNIPPET: deferModelScanning - } - - public static void performance() { - // START SNIPPET: dontValidate - // Create a context - FhirContext ctx = FhirContext.forDstu2(); - - // Disable server validation (don't pull the server's metadata first) - ctx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); - - // Now create a client and use it - String serverBase = "http://fhirtest.uhn.ca/baseDstu2"; - IGenericClient client = ctx.newRestfulGenericClient(serverBase); - // END SNIPPET: dontValidate - } - - public static void simpleExample() { - // START SNIPPET: simple - // We're connecting to a DSTU1 compliant server in this example - FhirContext ctx = FhirContext.forDstu2(); - String serverBase = "http://fhirtest.uhn.ca/baseDstu2"; - - IGenericClient client = ctx.newRestfulGenericClient(serverBase); - - // Perform a search - Bundle results = client - .search() - .forResource(Patient.class) - .where(Patient.FAMILY.matches().value("duck")) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .execute(); - - System.out.println("Found " + results.getEntry().size() + " patients named 'duck'"); - // END SNIPPET: simple - } - - @SuppressWarnings("unused") - public static void fluentSearch() { - FhirContext ctx = FhirContext.forDstu2(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhir.healthintersections.com.au/open"); - { - // START SNIPPET: create - Patient patient = new Patient(); - // ..populate the patient object.. - patient.addIdentifier().setSystem("urn:system").setValue("12345"); - patient.addName().addFamily("Smith").addGiven("John"); - - // Invoke the server create method (and send pretty-printed JSON - // encoding to the server - // instead of the default which is non-pretty printed XML) - MethodOutcome outcome = client.create() - .resource(patient) - .prettyPrint() - .encodedJson() - .execute(); - - // The MethodOutcome object will contain information about the - // response from the server, including the ID of the created - // resource, the OperationOutcome response, etc. (assuming that - // any of these things were provided by the server! They may not - // always be) - IdDt id = (IdDt) outcome.getId(); - System.out.println("Got ID: " + id.getValue()); - // END SNIPPET: create - } - { - Patient patient = new Patient(); - // START SNIPPET: createConditional - // One form - MethodOutcome outcome = client.create() - .resource(patient) - .conditionalByUrl("Patient?identifier=system%7C00001") - .execute(); - - // Another form - MethodOutcome outcome2 = client.create() - .resource(patient) - .conditional() - .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) - .execute(); - - // This will return Boolean.TRUE if the server responded with an HTTP 201 created, - // otherwise it will return null. - Boolean created = outcome.getCreated(); - - // The ID of the created, or the pre-existing resource - IdDt id = (IdDt) outcome.getId(); - // END SNIPPET: createConditional - } - { - // START SNIPPET: validate - Patient patient = new Patient(); - patient.addIdentifier().setSystem("http://hospital.com").setValue("123445"); - patient.addName().addFamily("Smith").addGiven("John"); - - // Validate the resource - MethodOutcome outcome = client.validate() - .resource(patient) - .execute(); - - // The returned object will contain an operation outcome resource - OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome(); - - // If the OperationOutcome has any issues with a severity of ERROR or SEVERE, - // the validation failed. - for (Issue nextIssue : oo.getIssue()) { - if (nextIssue.getSeverityElement().getValueAsEnum().ordinal() >= IssueSeverityEnum.ERROR.ordinal()) { - System.out.println("We failed validation!"); - } - } - // END SNIPPET: validate - } - { - // START SNIPPET: update - Patient patient = new Patient(); - // ..populate the patient object.. - patient.addIdentifier().setSystem("urn:system").setValue("12345"); - patient.addName().addFamily("Smith").addGiven("John"); - - // To update a resource, it should have an ID set (if the resource - // object - // comes from the results of a previous read or search, it will already - // have one though) - patient.setId("Patient/123"); - - // Invoke the server update method - MethodOutcome outcome = client.update() - .resource(patient) - .execute(); - - // The MethodOutcome object will contain information about the - // response from the server, including the ID of the created - // resource, the OperationOutcome response, etc. (assuming that - // any of these things were provided by the server! They may not - // always be) - IdDt id = (IdDt) outcome.getId(); - System.out.println("Got ID: " + id.getValue()); - // END SNIPPET: update - } - { - Patient patient = new Patient(); - // START SNIPPET: updateConditional - client.update() - .resource(patient) - .conditionalByUrl("Patient?identifier=system%7C00001") - .execute(); - - client.update() - .resource(patient) - .conditional() - .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) - .execute(); - // END SNIPPET: updateConditional - } - { - // START SNIPPET: etagupdate - // First, let's retrive the latest version of a resource - // from the server - Patient patient = client.read().resource(Patient.class).withId("123").execute(); - - // If the server is a version aware server, we should now know the latest version - // of the resource - System.out.println("Version ID: " + patient.getId().getVersionIdPart()); - - // Now let's make a change to the resource - patient.setGender(AdministrativeGenderEnum.FEMALE); - - // Invoke the server update method - Because the resource has - // a version, it will be included in the request sent to - // the server - try { - MethodOutcome outcome = client - .update() - .resource(patient) - .execute(); - } catch (PreconditionFailedException e) { - // If we get here, the latest version has changed - // on the server so our update failed. - } - // END SNIPPET: etagupdate - } - { - // START SNIPPET: conformance - // Retrieve the server's conformance statement and print its - // description - Conformance conf = client.fetchConformance().ofType(Conformance.class).execute(); - System.out.println(conf.getDescriptionElement().getValue()); - // END SNIPPET: conformance - } - { - // START SNIPPET: delete - IBaseOperationOutcome resp = client.delete().resourceById(new IdDt("Patient", "1234")).execute(); - - // outcome may be null if the server didn't return one - if (resp != null) { - OperationOutcome outcome = (OperationOutcome) resp; - System.out.println(outcome.getIssueFirstRep().getDetailsElement().getValue()); - } - // END SNIPPET: delete - } - { - // START SNIPPET: deleteConditional - client.delete() - .resourceConditionalByUrl("Patient?identifier=system%7C00001") - .execute(); - - client.delete() - .resourceConditionalByType("Patient") - .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) - .execute(); - // END SNIPPET: deleteConditional - } - { - // START SNIPPET: search - ca.uhn.fhir.model.dstu2.resource.Bundle response = client.search() - .forResource(Patient.class) - .where(Patient.BIRTHDATE.beforeOrEquals().day("2011-01-01")) - .and(Patient.CAREPROVIDER.hasChainedProperty(Organization.NAME.matches().value("Health"))) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .execute(); - // END SNIPPET: search - - // START SNIPPET: searchOr - response = client.search() - .forResource(Patient.class) - .where(Patient.FAMILY.matches().values("Smith", "Smyth")) - .returnBundle(Bundle.class) - .execute(); - // END SNIPPET: searchOr - - // START SNIPPET: searchAnd - response = client.search() - .forResource(Patient.class) - .where(Patient.ADDRESS.matches().values("Toronto")) - .and(Patient.ADDRESS.matches().values("Ontario")) - .and(Patient.ADDRESS.matches().values("Canada")) - .returnBundle(Bundle.class) - .execute(); - // END SNIPPET: searchAnd - - // START SNIPPET: searchCompartment - response = client.search() - .forResource(Patient.class) - .withIdAndCompartment("123", "condition") - .where(Patient.ADDRESS.matches().values("Toronto")) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .execute(); - // END SNIPPET: searchCompartment - - // START SNIPPET: searchUrl - String searchUrl = "http://example.com/base/Patient?identifier=foo"; - - // Search URL can also be a relative URL in which case the client's base - // URL will be added to it - searchUrl = "Patient?identifier=foo"; - - response = client.search() - .byUrl(searchUrl) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .execute(); - // END SNIPPET: searchUrl - - // START SNIPPET: searchSubsetSummary - response = client.search() - .forResource(Patient.class) - .where(Patient.ADDRESS.matches().values("Toronto")) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .summaryMode(SummaryEnum.TRUE) - .execute(); - // END SNIPPET: searchSubsetSummary - - // START SNIPPET: searchSubsetElements - response = client.search() - .forResource(Patient.class) - .where(Patient.ADDRESS.matches().values("Toronto")) - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .elementsSubset("identifier", "name") // only include the identifier and name - .execute(); - // END SNIPPET: searchSubsetElements - - // START SNIPPET: searchAdv - response = client.search() - .forResource(Patient.class) - .encodedJson() - .where(Patient.BIRTHDATE.beforeOrEquals().day("2012-01-22")) - .and(Patient.BIRTHDATE.after().day("2011-01-01")) - .withTag("http://acme.org/codes", "needs-review") - .include(Patient.INCLUDE_ORGANIZATION.asRecursive()) - .include(Patient.INCLUDE_CAREPROVIDER.asNonRecursive()) - .revInclude(Provenance.INCLUDE_TARGET) - .lastUpdated(new DateRangeParam("2011-01-01", null)) - .sort().ascending(Patient.BIRTHDATE) - .sort().descending(Patient.NAME).limitTo(123) - .returnBundle(Bundle.class) - .execute(); - // END SNIPPET: searchAdv - - // START SNIPPET: searchPost - response = client.search() - .forResource("Patient") - .where(Patient.NAME.matches().value("Tester")) - .usingStyle(SearchStyleEnum.POST) - .returnBundle(Bundle.class) - .execute(); - // END SNIPPET: searchPost - - // START SNIPPET: searchComposite - response = client.search() - .forResource("Observation") - .where(Observation.CODE_VALUE_DATE - .withLeft(Observation.CODE.exactly().code("FOO$BAR")) - .withRight(Observation.VALUE_DATE.exactly().day("2001-01-01"))) - .returnBundle(Bundle.class) - .execute(); - // END SNIPPET: searchComposite - } - { - // START SNIPPET: transaction - List resources = new ArrayList(); - // .. populate this list - note that you can also pass in a populated - // Bundle if you want to create one manually .. - - List response = client.transaction().withResources(resources).execute(); - // END SNIPPET: transaction - } - - { - // START SNIPPET: read - // search for patient 123 - Patient patient = client.read() - .resource(Patient.class) - .withId("123") - .execute(); - // END SNIPPET: read - } - { - // START SNIPPET: vread - // search for patient 123 (specific version 888) - Patient patient = client.read() - .resource(Patient.class) - .withIdAndVersion("123", "888") - .execute(); - // END SNIPPET: vread - } - { - // START SNIPPET: readabsolute - // search for patient 123 on example.com - String url = "http://example.com/fhir/Patient/123"; - Patient patient = client.read() - .resource(Patient.class) - .withUrl(url) - .execute(); - // END SNIPPET: readabsolute - } - - { - // START SNIPPET: etagread - // search for patient 123 - Patient patient = client.read() - .resource(Patient.class) - .withId("123") - .ifVersionMatches("001").returnNull() - .execute(); - if (patient == null) { - // resource has not changed - } - // END SNIPPET: etagread - } - - - - } - - @SuppressWarnings("unused") - public static void history() { - IGenericClient client = FhirContext.forDstu2().newRestfulGenericClient(""); - { - ca.uhn.fhir.model.dstu2.resource.Bundle response; - // START SNIPPET: historyDstu2 - response = client - .history() - .onServer() - .andReturnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .execute(); - // END SNIPPET: historyDstu2 - } - { - ca.uhn.fhir.model.dstu2.resource.Bundle response; - // START SNIPPET: historyFeatures - response = client - .history() - .onServer() - .andReturnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class) - .since(new InstantDt("2012-01-01T12:22:32.038Z")) - .count(100) - .execute(); - // END SNIPPET: historyFeatures - } - } - - public static void main(String[] args) { - paging(); - } - private static void paging() { - { - // START SNIPPET: searchPaging - FhirContext ctx = FhirContext.forDstu2(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - - // Perform a search - Bundle resultBundle = client.search() - .forResource(Patient.class) - .where(Patient.NAME.matches().value("Smith")) - .returnBundle(Bundle.class) - .execute(); - - if (resultBundle.getLink(Bundle.LINK_NEXT) != null) { - - // load next page - Bundle nextPage = client.loadPage().next(resultBundle).execute(); - } - // END SNIPPET: searchPaging - } - } - - @SuppressWarnings("unused") - private static void operationHttpGet() { - // START SNIPPET: operationHttpGet - // Create a client to talk to the HeathIntersections server - FhirContext ctx = FhirContext.forDstu2(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhir-dev.healthintersections.com.au/open"); - client.registerInterceptor(new LoggingInterceptor(true)); - - // Create the input parameters to pass to the server - Parameters inParams = new Parameters(); - inParams.addParameter().setName("start").setValue(new DateDt("2001-01-01")); - inParams.addParameter().setName("end").setValue(new DateDt("2015-03-01")); - - // Invoke $everything on "Patient/1" - Parameters outParams = client - .operation() - .onInstance(new IdDt("Patient", "1")) - .named("$everything") - .withParameters(inParams) - .useHttpGet() // Use HTTP GET instead of POST - .execute(); - // END SNIPPET: operationHttpGet - } - - @SuppressWarnings("unused") - private static void operation() { - // START SNIPPET: operation - // Create a client to talk to the HeathIntersections server - FhirContext ctx = FhirContext.forDstu2(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhir-dev.healthintersections.com.au/open"); - client.registerInterceptor(new LoggingInterceptor(true)); - - // Create the input parameters to pass to the server - Parameters inParams = new Parameters(); - inParams.addParameter().setName("start").setValue(new DateDt("2001-01-01")); - inParams.addParameter().setName("end").setValue(new DateDt("2015-03-01")); - - // Invoke $everything on "Patient/1" - Parameters outParams = client - .operation() - .onInstance(new IdDt("Patient", "1")) - .named("$everything") - .withParameters(inParams) - .execute(); - - /* - * Note that the $everything operation returns a Bundle instead - * of a Parameters resource. The client operation methods return a - * Parameters instance however, so HAPI creates a Parameters object - * with a single parameter containing the value. - */ - Bundle responseBundle = (Bundle) outParams.getParameter().get(0).getResource(); - - // Print the response bundle - System.out.println(ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(responseBundle)); - // END SNIPPET: operation - } - - @SuppressWarnings("unused") - private static void operationNoIn() { - // START SNIPPET: operationNoIn - // Create a client to talk to the HeathIntersections server - FhirContext ctx = FhirContext.forDstu2(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhir-dev.healthintersections.com.au/open"); - client.registerInterceptor(new LoggingInterceptor(true)); - - // Invoke $everything on "Patient/1" - Parameters outParams = client - .operation() - .onInstance(new IdDt("Patient", "1")) - .named("$everything") - .withNoParameters(Parameters.class) // No input parameters - .execute(); - // END SNIPPET: operationNoIn - } - -} diff --git a/examples/src/main/java/example/GenomicsUploader.java b/examples/src/main/java/example/GenomicsUploader.java deleted file mode 100644 index f7f87823905..00000000000 --- a/examples/src/main/java/example/GenomicsUploader.java +++ /dev/null @@ -1,61 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; -import org.hl7.fhir.r4.model.Enumerations; -import org.hl7.fhir.r4.model.SearchParameter; - -public class GenomicsUploader { - - public static void main(String[] theArgs) { - FhirContext ctx = FhirContext.forR4(); - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseR4"); - client.registerInterceptor(new LoggingInterceptor(false)); - - SearchParameter dnaSequenceVariantName = new SearchParameter(); - dnaSequenceVariantName.setId("SearchParameter/dnaSequenceVariantName"); - dnaSequenceVariantName.setStatus(Enumerations.PublicationStatus.ACTIVE); - dnaSequenceVariantName.addBase("Observation"); - dnaSequenceVariantName.setCode("dnaSequenceVariantName"); - dnaSequenceVariantName.setType(Enumerations.SearchParamType.TOKEN); - dnaSequenceVariantName.setTitle("DNASequenceVariantName"); - dnaSequenceVariantName.setExpression("Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDNASequenceVariantName')"); - dnaSequenceVariantName.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); - client.update().resource(dnaSequenceVariantName).execute(); - - SearchParameter dNAVariantId = new SearchParameter(); - dNAVariantId.setId("SearchParameter/dNAVariantId"); - dNAVariantId.setStatus(Enumerations.PublicationStatus.ACTIVE); - dNAVariantId.addBase("Observation"); - dNAVariantId.setCode("dnaVariantId"); - dNAVariantId.setType(Enumerations.SearchParamType.TOKEN); - dNAVariantId.setTitle("DNAVariantId"); - dNAVariantId.setExpression("Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDNAVariantId')"); - dNAVariantId.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); - client.update().resource(dNAVariantId).execute(); - - SearchParameter gene = new SearchParameter(); - gene.setId("SearchParameter/gene"); - gene.setStatus(Enumerations.PublicationStatus.ACTIVE); - gene.addBase("Observation"); - gene.setCode("gene"); - gene.setType(Enumerations.SearchParamType.TOKEN); - gene.setTitle("Gene"); - gene.setExpression("Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"); - gene.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); - client.update().resource(gene).execute(); - - SearchParameter alleleName = new SearchParameter(); - alleleName.setId("SearchParameter/alleleName"); - alleleName.setStatus(Enumerations.PublicationStatus.ACTIVE); - alleleName.addBase("Observation"); - alleleName.setCode("alleleName"); - alleleName.setType(Enumerations.SearchParamType.TOKEN); - alleleName.setTitle("AlleleName"); - alleleName.setExpression("Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAlleleName')"); - alleleName.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); - client.update().resource(alleleName).execute(); - } - -} diff --git a/examples/src/main/java/example/HttpProxy.java b/examples/src/main/java/example/HttpProxy.java deleted file mode 100644 index 3e26973b7f3..00000000000 --- a/examples/src/main/java/example/HttpProxy.java +++ /dev/null @@ -1,48 +0,0 @@ -package example; - -import org.apache.http.HttpHost; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.client.CredentialsProvider; -import org.apache.http.impl.client.*; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -public class HttpProxy { - - public static void main(String[] args) { - /* - * This is out ot date - Just keeping - * it in case it's helpful... - */ - final String authUser = "username"; - final String authPassword = "password"; - CredentialsProvider credsProvider = new BasicCredentialsProvider(); - credsProvider.setCredentials(new AuthScope("10.10.10.10", 8080), - new UsernamePasswordCredentials(authUser, authPassword)); - - HttpHost myProxy = new HttpHost("10.10.10.10", 8080); - - - HttpClientBuilder clientBuilder = HttpClientBuilder.create(); - clientBuilder - .setProxy(myProxy) - .setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy()) - .setDefaultCredentialsProvider(credsProvider) - .disableCookieManagement(); - CloseableHttpClient httpClient = clientBuilder.build(); - - FhirContext ctx = FhirContext.forDstu2(); - String serverBase = "http://spark.furore.com/fhir/"; - ctx.getRestfulClientFactory().setHttpClient(httpClient); - IGenericClient client = ctx.newRestfulGenericClient(serverBase); - - IdDt id = new IdDt("Patient", "123"); - client.read(Patient.class, id); - - } - -} diff --git a/examples/src/main/java/example/IRestfulClient.java b/examples/src/main/java/example/IRestfulClient.java deleted file mode 100644 index d9963f27d62..00000000000 --- a/examples/src/main/java/example/IRestfulClient.java +++ /dev/null @@ -1,56 +0,0 @@ -package example; - -import java.util.List; - -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.client.api.IBasicClient; - -//START SNIPPET: provider -/** - * All RESTful clients must be an interface which extends IBasicClient - */ -public interface IRestfulClient extends IBasicClient { - - /** - * The "@Read" annotation indicates that this method supports the - * read operation. Read operations should return a single resource - * instance. - * - * @param theId - * The read operation takes one parameter, which must be of type - * IdDt and must be annotated with the "@Read.IdParam" annotation. - * @return - * Returns a resource matching this identifier, or null if none exists. - */ - @Read() - public Patient getResourceById(@IdParam IdDt theId); - - /** - * The "@Search" annotation indicates that this method supports the - * search operation. You may have many different methods annotated with - * this annotation, to support many different search criteria. This - * example searches by family name. - * - * @param theIdentifier - * This operation takes one parameter which is the search criteria. It is - * annotated with the "@Required" annotation. This annotation takes one argument, - * a string containing the name of the search criteria. The datatype here - * is StringDt, but there are other possible parameter types depending on the - * specific search criteria. - * @return - * This method returns a list of Patients. This list may contain multiple - * matching resources, or it may also be empty. - */ - @Search() - public List getPatient(@RequiredParam(name = Patient.SP_FAMILY) StringDt theFamilyName); - -} -//END SNIPPET: provider - - diff --git a/examples/src/main/java/example/IncludesExamples.java b/examples/src/main/java/example/IncludesExamples.java deleted file mode 100644 index 899d095d62d..00000000000 --- a/examples/src/main/java/example/IncludesExamples.java +++ /dev/null @@ -1,58 +0,0 @@ -package example; - -import java.util.ArrayList; -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Organization; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.valueset.BundleTypeEnum; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactory; - -public class IncludesExamples { - - public static void main(String[] args) { - testSearchForPatients(); - } - - private static void testSearchForPatients() { - List resources = new IncludesExamples().searchForPatients(); - - // Create a bundle with both - FhirContext ctx = FhirContext.forDstu2(); - - Dstu2BundleFactory bf = new Dstu2BundleFactory(ctx); - bf.addRootPropertiesToBundle(null, null, null, null, null, resources.size(), BundleTypeEnum.SEARCHSET, null); - bf.addResourcesToBundle(new ArrayList<>(resources), BundleTypeEnum.SEARCHSET, null, null, null); - IBaseResource b = bf.getResourceBundle(); - - // Encode the bundle - String encoded = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(b); - System.out.println(encoded); - } - - // START SNIPPET: addIncludes - @Search - private List searchForPatients() { - // Create an organization - Organization org = new Organization(); - org.setId("Organization/65546"); - org.setName("Test Organization"); - - // Create a patient - Patient patient = new Patient(); - patient.setId("Patient/1333"); - patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); - patient.getManagingOrganization().setResource(org); - - // Here we return only the patient object, which has links to other resources - List retVal = new ArrayList(); - retVal.add(patient); - return retVal; - } - // END SNIPPET: addIncludes - -} diff --git a/examples/src/main/java/example/JaxRsClient.java b/examples/src/main/java/example/JaxRsClient.java deleted file mode 100644 index 581b38c4b88..00000000000 --- a/examples/src/main/java/example/JaxRsClient.java +++ /dev/null @@ -1,28 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jaxrs.client.JaxRsRestfulClientFactory; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -@SuppressWarnings(value= {"serial"}) -public class JaxRsClient { - -public static void main(String[] args) { -//START SNIPPET: createClient - - // Create a client - FhirContext ctx = FhirContext.forDstu2(); - - // Create an instance of the JAX RS client factory and - // set it on the context - JaxRsRestfulClientFactory clientFactory = new JaxRsRestfulClientFactory(ctx); - ctx.setRestfulClientFactory(clientFactory); - - // This client uses JAX-RS! - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2"); - -//END SNIPPET: createClient -} - - -} diff --git a/examples/src/main/java/example/JaxRsConformanceProvider.java b/examples/src/main/java/example/JaxRsConformanceProvider.java deleted file mode 100644 index 1f1549f07f7..00000000000 --- a/examples/src/main/java/example/JaxRsConformanceProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -package example; - -import java.util.concurrent.ConcurrentHashMap; - -import javax.ejb.EJB; -import javax.ejb.Stateless; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - -import ca.uhn.fhir.jaxrs.server.AbstractJaxRsConformanceProvider; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.IResourceProvider; - -/** - * Conformance Rest Service - * - * @author Peter Van Houte - */ - // START SNIPPET: jax-rs-conformance -@Path("") -@Stateless -@Produces({ MediaType.APPLICATION_JSON, Constants.CT_FHIR_JSON, Constants.CT_FHIR_XML }) -public class JaxRsConformanceProvider extends AbstractJaxRsConformanceProvider { - - @EJB - private JaxRsPatientRestProvider provider; - - public JaxRsConformanceProvider() { - super("My Server Description", "My Server Name", "My Server Version"); - } - - @Override - protected ConcurrentHashMap, IResourceProvider> getProviders() { - ConcurrentHashMap, IResourceProvider> map = new ConcurrentHashMap, IResourceProvider>(); - map.put(JaxRsConformanceProvider.class, this); - map.put(JaxRsPatientRestProvider.class, provider); - return map; - } -} -// END SNIPPET: jax-rs-conformance diff --git a/examples/src/main/java/example/JaxRsPatientRestProvider.java b/examples/src/main/java/example/JaxRsPatientRestProvider.java deleted file mode 100644 index 6c68f1a6a14..00000000000 --- a/examples/src/main/java/example/JaxRsPatientRestProvider.java +++ /dev/null @@ -1,68 +0,0 @@ -package example; - -import javax.ejb.Local; -import javax.ejb.Stateless; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -import ca.uhn.fhir.jaxrs.server.AbstractJaxRsResourceProvider; -import ca.uhn.fhir.model.dstu2.resource.Parameters; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.rest.annotation.*; -import ca.uhn.fhir.rest.api.*; - -/** - * A demo JaxRs Patient Rest Provider - */ -@Local -@Stateless -// START SNIPPET: jax-rs-provider-construction -@Path("/Patient") -@Produces({ MediaType.APPLICATION_JSON, Constants.CT_FHIR_JSON, Constants.CT_FHIR_XML }) -public class JaxRsPatientRestProvider extends AbstractJaxRsResourceProvider { - - public JaxRsPatientRestProvider() { - super(JaxRsPatientRestProvider.class); - } -// END SNIPPET: jax-rs-provider-construction - - @Override - public Class getResourceType() { - return Patient.class; - } - - - @Create - public MethodOutcome create(@ResourceParam final Patient patient, @ConditionalUrlParam String theConditional) { - // create the patient ... - return new MethodOutcome(new IdDt(1L)).setCreated(true); - } - -// START SNIPPET: jax-rs-provider-operation - @GET - @Path("/{id}/$someCustomOperation") - public Response someCustomOperationUsingGet(@PathParam("id") String id, String resource) throws Exception { - return customOperation(resource, RequestTypeEnum.GET, id, "$someCustomOperation", - RestOperationTypeEnum.EXTENDED_OPERATION_INSTANCE); - } - - @Operation(name = "someCustomOperation", idempotent = true, returnParameters = { - @OperationParam(name = "return", type = StringDt.class) }) - public Parameters someCustomOperation(@IdParam IdDt myId, @OperationParam(name = "dummy") StringDt dummyInput) { - Parameters parameters = new Parameters(); - parameters.addParameter().setName("return").setValue(new StringDt("My Dummy Result")); - return parameters; - } - // END SNIPPET: jax-rs-provider-operation - - @POST - @Path("/{id}/$someCustomOperation") - public Response someCustomOperationUsingPost(@PathParam("id") String id, String resource) throws Exception { - return customOperation(resource, RequestTypeEnum.POST, id, "$someCustomOperation", - RestOperationTypeEnum.EXTENDED_OPERATION_INSTANCE); - } - -} diff --git a/examples/src/main/java/example/Multitenancy.java b/examples/src/main/java/example/Multitenancy.java deleted file mode 100644 index 21f840e379e..00000000000 --- a/examples/src/main/java/example/Multitenancy.java +++ /dev/null @@ -1,50 +0,0 @@ -package example; - -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.RestfulServer; -import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.Patient; - -public class Multitenancy { - -//START SNIPPET: enableUrlBaseTenantIdentificationStrategy - public class MyServer extends RestfulServer { - - @Override - protected void initialize() { - - setTenantIdentificationStrategy(new UrlBaseTenantIdentificationStrategy()); - - // ... do other initialization ... - } -} -//END SNIPPET: enableUrlBaseTenantIdentificationStrategy - -//START SNIPPET: resourceProvider - public class MyPatientResourceProvider implements IResourceProvider { - - @Override - public Class getResourceType() { - return Patient.class; - } - - @Read - public Patient read(RequestDetails theRequestDetails, @IdParam IdType theId) { - - String tenantId = theRequestDetails.getTenantId(); - String resourceId = theId.getIdPart(); - - // Use these two values to fetch the patient - - return new Patient(); - } -} - -//END SNIPPET: resourceProvider - -} diff --git a/examples/src/main/java/example/MyPatient.java b/examples/src/main/java/example/MyPatient.java deleted file mode 100644 index 02248f0a81d..00000000000 --- a/examples/src/main/java/example/MyPatient.java +++ /dev/null @@ -1,99 +0,0 @@ -package example; - -//START SNIPPET: patientDef -import java.util.ArrayList; -import java.util.List; - -import org.hl7.fhir.dstu3.model.DateTimeType; -import org.hl7.fhir.dstu3.model.Patient; -import org.hl7.fhir.dstu3.model.StringType; - -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Extension; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.util.ElementUtil; - -/** - * Definition class for adding extensions to the built-in - * Patient resource type. - * - * Note the "profile" attribute below, which indicates the URL/ID of the - * profile implemented by this resource. You are not required to supply this, - * but if you do it will be automatically populated in the resource meta - * tag if the resource is returned by a server. - */ -@ResourceDef(name="Patient", profile="http://example.com/StructureDefinition/mypatient") -public class MyPatient extends Patient { - - private static final long serialVersionUID = 1L; - - /** - * Each extension is defined in a field. Any valid HAPI Data Type - * can be used for the field type. Note that the [name=""] attribute - * in the @Child annotation needs to match the name for the bean accessor - * and mutator methods. - */ - @Child(name="petName") - @Extension(url="http://example.com/dontuse#petname", definedLocally=false, isModifier=false) - @Description(shortDefinition="The name of the patient's favourite pet") - private StringType myPetName; - - /** - * The second example extension uses a List type to provide - * repeatable values. Note that a [max=] value has been placed in - * the @Child annotation. - * - * Note also that this extension is a modifier extension - */ - @Child(name="importantDates", max=Child.MAX_UNLIMITED) - @Extension(url="http://example.com/dontuse#importantDates", definedLocally=false, isModifier=true) - @Description(shortDefinition="Some dates of note for this patient") - private List myImportantDates; - - /** - * It is important to override the isEmpty() method, adding a check for any - * newly added fields. - */ - @Override - public boolean isEmpty() { - return super.isEmpty() && ElementUtil.isEmpty(myPetName, myImportantDates); - } - - /******** - * Accessors and mutators follow - * - * IMPORTANT: - * Each extension is required to have an getter/accessor and a stter/mutator. - * You are highly recommended to create getters which create instances if they - * do not already exist, since this is how the rest of the HAPI FHIR API works. - ********/ - - /** Getter for important dates */ - public List getImportantDates() { - if (myImportantDates==null) { - myImportantDates = new ArrayList(); - } - return myImportantDates; - } - - /** Getter for pet name */ - public StringType getPetName() { - if (myPetName == null) { - myPetName = new StringType(); - } - return myPetName; - } - - /** Setter for important dates */ - public void setImportantDates(List theImportantDates) { - myImportantDates = theImportantDates; - } - - /** Setter for pet name */ - public void setPetName(StringType thePetName) { - myPetName = thePetName; - } - -} -//END SNIPPET: patientDef diff --git a/examples/src/main/java/example/MyPatientUse.java b/examples/src/main/java/example/MyPatientUse.java deleted file mode 100644 index d4068a86c7e..00000000000 --- a/examples/src/main/java/example/MyPatientUse.java +++ /dev/null @@ -1,86 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Extension; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.DateTimeDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.parser.IParser; - -public class MyPatientUse { - - @ResourceDef() - public static class MyPatient extends Patient { - - @Child(name="petName") - @Extension(url="http://example.com/dontuse#petname", definedLocally=false, isModifier=false) - @Description(shortDefinition="The name of the patient's favourite pet") - private StringDt myPetName; - - public StringDt getPetName() { - if(myPetName==null) { - myPetName = new StringDt(); - } - return myPetName; - } - - public void setPetName(StringDt thePetName) { - myPetName = thePetName; - } - - public List getImportantDates() { - if (myImportantDates==null) { - myImportantDates=new ArrayList(); - } - return myImportantDates; - } - - public void setImportantDates(List theImportantDates) { - myImportantDates = theImportantDates; - } - - @Child(name="importantDates", max=Child.MAX_UNLIMITED) - @Extension(url="http://example.com/dontuse#importantDates", definedLocally=false, isModifier=true) - @Description(shortDefinition="Some dates of note for the patient") - private List myImportantDates; - - } - -@SuppressWarnings("unused") -public static void main(String[] args) throws DataFormatException, IOException { -//START SNIPPET: patientUse -MyPatient patient = new MyPatient(); -patient.setPetName(new StringDt("Fido")); -patient.getImportantDates().add(new DateTimeDt("2010-01-02")); -patient.getImportantDates().add(new DateTimeDt("2014-01-26T11:11:11")); - -patient.addName().addFamily("Smith").addGiven("John").addGiven("Quincy").addSuffix("Jr"); - -IParser p = FhirContext.forDstu2().newXmlParser().setPrettyPrint(true); -String messageString = p.encodeResourceToString(patient); - -System.out.println(messageString); -//END SNIPPET: patientUse - -//START SNIPPET: patientParse -IParser parser = FhirContext.forDstu2().newXmlParser(); -MyPatient newPatient = parser.parseResource(MyPatient.class, messageString); -//END SNIPPET: patientParse - -{ - FhirContext ctx2 = FhirContext.forDstu2(); - RuntimeResourceDefinition def = ctx2.getResourceDefinition(patient); - System.out.println(ctx2.newXmlParser().setPrettyPrint(true).encodeResourceToString(def.toProfile())); -} -} - -} diff --git a/examples/src/main/java/example/Narrative.java b/examples/src/main/java/example/Narrative.java deleted file mode 100644 index d8c5c9aa4ce..00000000000 --- a/examples/src/main/java/example/Narrative.java +++ /dev/null @@ -1,40 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.NarrativeStatusEnum; -import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; -import ca.uhn.fhir.parser.DataFormatException; - -@SuppressWarnings("unused") -public class Narrative { - -public static void main(String[] args) throws DataFormatException { - -//START SNIPPET: example1 -Patient patient = new Patient(); -patient.addIdentifier().setSystem("urn:foo").setValue("7000135"); -patient.addName().addFamily("Smith").addGiven("John").addGiven("Edward"); -patient.addAddress().addLine("742 Evergreen Terrace").setCity("Springfield").setState("ZZ"); - -FhirContext ctx = FhirContext.forDstu2(); - -// Use the narrative generator -ctx.setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator()); - -// Encode the output, including the narrative -String output = ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(output); -//END SNIPPET: example1 - -} - -public void simple() { -//START SNIPPET: simple -Patient pat = new Patient(); -pat.getText().setStatus(NarrativeStatusEnum.GENERATED); -pat.getText().setDiv("
This is the narrative text
this is line 2
"); -//END SNIPPET: simple -} - -} diff --git a/examples/src/main/java/example/NarrativeGenerator.java b/examples/src/main/java/example/NarrativeGenerator.java deleted file mode 100644 index daeab7ae4ae..00000000000 --- a/examples/src/main/java/example/NarrativeGenerator.java +++ /dev/null @@ -1,21 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.narrative.CustomThymeleafNarrativeGenerator; - -@SuppressWarnings("unused") -public class NarrativeGenerator { - - public void testGenerator() { - -//START SNIPPET: gen -FhirContext ctx = FhirContext.forDstu2(); -String propFile = "classpath:/com/foo/customnarrative.properties"; -CustomThymeleafNarrativeGenerator gen = new CustomThymeleafNarrativeGenerator(propFile); - -ctx.setNarrativeGenerator(gen); -//END SNIPPET: gen - - - } -} diff --git a/examples/src/main/java/example/NewInterceptors.java b/examples/src/main/java/example/NewInterceptors.java deleted file mode 100644 index 60da5d43ded..00000000000 --- a/examples/src/main/java/example/NewInterceptors.java +++ /dev/null @@ -1,4 +0,0 @@ -package example; - -public class NewInterceptors { -} diff --git a/examples/src/main/java/example/PagingPatientProvider.java b/examples/src/main/java/example/PagingPatientProvider.java deleted file mode 100644 index efcfaa7ff46..00000000000 --- a/examples/src/main/java/example/PagingPatientProvider.java +++ /dev/null @@ -1,88 +0,0 @@ -package example; - -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.IResourceProvider; - -import javax.annotation.Nonnull; - -@SuppressWarnings("null") -// START SNIPPET: provider -public class PagingPatientProvider implements IResourceProvider { - - /** - * Search for Patient resources matching a given family name - */ - @Search - public IBundleProvider search(@RequiredParam(name = Patient.SP_FAMILY) StringParam theFamily) { - final InstantDt searchTime = InstantDt.withCurrentTime(); - - /** - * First, we'll search the database for a set of database row IDs that - * match the given search criteria. That way we can keep just the row IDs - * around, and load the actual resources on demand later as the client - * pages through them. - */ - final List matchingResourceIds = null; // <-- implement this - - /** - * Return a bundle provider which can page through the IDs and return the - * resources that go with them. - */ - return new IBundleProvider() { - - @Override - public Integer size() { - return matchingResourceIds.size(); - } - - @Nonnull - @Override - public List getResources(int theFromIndex, int theToIndex) { - int end = Math.max(theToIndex, matchingResourceIds.size() - 1); - List idsToReturn = matchingResourceIds.subList(theFromIndex, end); - return loadResourcesByIds(idsToReturn); - } - - @Override - public InstantDt getPublished() { - return searchTime; - } - - @Override - public Integer preferredPageSize() { - // Typically this method just returns null - return null; - } - - @Override - public String getUuid() { - return null; - } - }; - } - - /** - * Load a list of patient resources given their IDs - */ - private List loadResourcesByIds(List theIdsToReturn) { - // .. implement this search against the database .. - return null; - } - - @Override - public Class getResourceType() { - return Patient.class; - } - -} -// END SNIPPET: provider diff --git a/examples/src/main/java/example/PagingServer.java b/examples/src/main/java/example/PagingServer.java deleted file mode 100644 index d35ceddd138..00000000000 --- a/examples/src/main/java/example/PagingServer.java +++ /dev/null @@ -1,33 +0,0 @@ -package example; - -import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; -import ca.uhn.fhir.rest.server.RestfulServer; - -@SuppressWarnings({ "serial" }) -//START SNIPPET: provider -public class PagingServer extends RestfulServer { - - public PagingServer() { - - /* - * Set the resource providers as always. Here we are using the paging - * provider from the example below, but it is not strictly neccesary - * to use a paging resource provider as well. If a normal resource - * provider is used (one which returns List instead of IBundleProvider) - * then the loaded resources will be stored by the IPagingProvider. - */ - setResourceProviders(new PagingPatientProvider()); - - /* - * Set a paging provider. Here a simple in-memory implementation - * is used, but you may create your own. - */ - FifoMemoryPagingProvider pp = new FifoMemoryPagingProvider(10); - pp.setDefaultPageSize(10); - pp.setMaximumPageSize(100); - setPagingProvider(pp); - - } - -} -//END SNIPPET: provider diff --git a/examples/src/main/java/example/Parser.java b/examples/src/main/java/example/Parser.java deleted file mode 100644 index 7e3802fcb42..00000000000 --- a/examples/src/main/java/example/Parser.java +++ /dev/null @@ -1,42 +0,0 @@ -package example; - -import java.io.IOException; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.parser.IParser; - -public class Parser { - -public static void main(String[] args) throws DataFormatException, IOException { - { -//START SNIPPET: disableStripVersions -FhirContext ctx = FhirContext.forDstu2(); -IParser parser = ctx.newJsonParser(); - -// Disable the automatic stripping of versions from references on the parser -parser.setStripVersionsFromReferences(false); -//END SNIPPET: disableStripVersions - -//START SNIPPET: disableStripVersionsCtx -ctx.getParserOptions().setStripVersionsFromReferences(false); -//END SNIPPET: disableStripVersionsCtx - - } - - { -//START SNIPPET: disableStripVersionsField -FhirContext ctx = FhirContext.forDstu2(); -IParser parser = ctx.newJsonParser(); - -// Preserve versions only on these two fields (for the given parser) -parser.setDontStripVersionsFromReferencesAtPaths("AuditEvent.entity.reference", "Patient.managingOrganization"); - -// You can also apply this setting to the context so that it will -// flow to all parsers -ctx.getParserOptions().setDontStripVersionsFromReferencesAtPaths("AuditEvent.entity.reference", "Patient.managingOrganization"); -//END SNIPPET: disableStripVersionsField - - } -} -} diff --git a/examples/src/main/java/example/PatchExamples.java b/examples/src/main/java/example/PatchExamples.java deleted file mode 100644 index 43af0984d46..00000000000 --- a/examples/src/main/java/example/PatchExamples.java +++ /dev/null @@ -1,30 +0,0 @@ -package example; - -import org.hl7.fhir.dstu3.model.IdType; -import org.hl7.fhir.dstu3.model.OperationOutcome; - -import ca.uhn.fhir.rest.annotation.*; -import ca.uhn.fhir.rest.api.PatchTypeEnum; - - -public class PatchExamples { - - //START SNIPPET: patch - @Patch - public OperationOutcome patientPatch(@IdParam IdType theId, PatchTypeEnum thePatchType, @ResourceParam String theBody) { - - if (thePatchType == PatchTypeEnum.JSON_PATCH) { - // do something - } - if (thePatchType == PatchTypeEnum.XML_PATCH) { - // do something - } - - OperationOutcome retVal = new OperationOutcome(); - retVal.getText().setDivAsString("
OK
"); - return retVal; - } - //END SNIPPET: patch - - -} diff --git a/examples/src/main/java/example/QuickUsage.java b/examples/src/main/java/example/QuickUsage.java deleted file mode 100644 index fffa88ed80f..00000000000 --- a/examples/src/main/java/example/QuickUsage.java +++ /dev/null @@ -1,54 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; -import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.client.api.IRestfulClient; - -public class QuickUsage { - -@SuppressWarnings("unused") -public static void main(String[] args) throws DataFormatException, IOException { - -Patient patient = new Patient(); -patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:fake:mrns").setValue("7000135"); -patient.addIdentifier().setUse(IdentifierUseEnum.SECONDARY).setSystem("urn:fake:otherids").setValue("3287486"); - -patient.addName().addFamily("Smith").addGiven("John").addGiven("Q").addSuffix("Junior"); - -patient.setGender(AdministrativeGenderEnum.MALE); - - -FhirContext ctx = FhirContext.forDstu2(); -String xmlEncoded = ctx.newXmlParser().encodeResourceToString(patient); -String jsonEncoded = ctx.newJsonParser().encodeResourceToString(patient); - -MyClientInterface client = ctx.newRestfulClient(MyClientInterface.class, "http://foo/fhir"); -IdentifierDt searchParam = new IdentifierDt("urn:someidentifiers", "7000135"); -List clients = client.findPatientsByIdentifier(searchParam); -} - -public interface MyClientInterface extends IRestfulClient -{ - /** A FHIR search */ - @Search - public List findPatientsByIdentifier(@RequiredParam(name="identifier") IdentifierDt theIdentifier); - - /** A FHIR create */ - @Create - public MethodOutcome createPatient(@ResourceParam Patient thePatient); - -} - -} diff --git a/examples/src/main/java/example/RequestCounterInterceptor.java b/examples/src/main/java/example/RequestCounterInterceptor.java deleted file mode 100644 index acf35013d56..00000000000 --- a/examples/src/main/java/example/RequestCounterInterceptor.java +++ /dev/null @@ -1,29 +0,0 @@ -package example; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; - -//START SNIPPET: interceptor -public class RequestCounterInterceptor extends InterceptorAdapter -{ - - private int myRequestCount; - - public int getRequestCount() { - return myRequestCount; - } - - /** - * Override the incomingRequestPreProcessed method, which is called - * for each incoming request before any processing is done - */ - @Override - public boolean incomingRequestPreProcessed(HttpServletRequest theRequest, HttpServletResponse theResponse) { - myRequestCount++; - return true; - } - -} -//END SNIPPET: interceptor diff --git a/examples/src/main/java/example/RequestExceptionInterceptor.java b/examples/src/main/java/example/RequestExceptionInterceptor.java deleted file mode 100644 index c041250bd77..00000000000 --- a/examples/src/main/java/example/RequestExceptionInterceptor.java +++ /dev/null @@ -1,36 +0,0 @@ -package example; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; -import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; - -//START SNIPPET: interceptor -public class RequestExceptionInterceptor extends InterceptorAdapter -{ - - @Override - public boolean handleException(RequestDetails theRequestDetails, BaseServerResponseException theException, HttpServletRequest theServletRequest, - HttpServletResponse theServletResponse) throws ServletException, IOException { - - // HAPI's server exceptions know what the appropriate HTTP status code is - theServletResponse.setStatus(theException.getStatusCode()); - - // Provide a response ourself - theServletResponse.setContentType("text/plain"); - theServletResponse.getWriter().append("Failed to process!"); - theServletResponse.getWriter().close(); - - // Since we handled this response in the interceptor, we must return false - // to stop processing immediately - return false; - } - - -} -//END SNIPPET: interceptor diff --git a/examples/src/main/java/example/ResourceRefs.java b/examples/src/main/java/example/ResourceRefs.java deleted file mode 100644 index b5d81d41595..00000000000 --- a/examples/src/main/java/example/ResourceRefs.java +++ /dev/null @@ -1,36 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Organization; -import ca.uhn.fhir.model.dstu2.resource.Patient; - -public class ResourceRefs { - - private static FhirContext ourCtx = FhirContext.forDstu2(); - - public static void main(String[] args) { - manualContained(); - } - - public static void manualContained() { - // START SNIPPET: manualContained - // Create an organization, and give it a local ID - Organization org = new Organization(); - org.setId("#localOrganization"); - org.getNameElement().setValue("Contained Test Organization"); - - // Create a patient - Patient patient = new Patient(); - patient.setId("Patient/1333"); - patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); - - // Set the reference, and manually add the contained resource - patient.getManagingOrganization().setReference("#localOrganization"); - patient.getContained().getContainedResources().add(org); - - String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); - System.out.println(encoded); - // END SNIPPET: manualContained - } - -} diff --git a/examples/src/main/java/example/RestfulObservationResourceProvider.java b/examples/src/main/java/example/RestfulObservationResourceProvider.java deleted file mode 100644 index 773d7640c7c..00000000000 --- a/examples/src/main/java/example/RestfulObservationResourceProvider.java +++ /dev/null @@ -1,87 +0,0 @@ -package example; - -import java.util.Collections; -import java.util.List; - -import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.model.primitive.UriDt; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.server.IResourceProvider; - -//START SNIPPET: provider -/** - * All resource providers must implement IResourceProvider - */ -public class RestfulObservationResourceProvider implements IResourceProvider { - - /** - * The getResourceType method comes from IResourceProvider, and must - * be overridden to indicate what type of resource this provider - * supplies. - */ - @Override - public Class getResourceType() { - return Patient.class; - } - - /** - * The "@Read" annotation indicates that this method supports the - * read operation. It takes one argument, the Resource type being returned. - * - * @param theId - * The read operation takes one parameter, which must be of type - * IdDt and must be annotated with the "@Read.IdParam" annotation. - * @return - * Returns a resource matching this identifier, or null if none exists. - */ - @Read() - public Patient getResourceById(@IdParam IdDt theId) { - Patient patient = new Patient(); - patient.addIdentifier(); - patient.getIdentifier().get(0).setSystem(new UriDt("urn:hapitest:mrns")); - patient.getIdentifier().get(0).setValue("00002"); - patient.addName().addFamily("Test"); - patient.getName().get(0).addGiven("PatientOne"); - patient.setGender(AdministrativeGenderEnum.FEMALE); - return patient; - } - - /** - * The "@Search" annotation indicates that this method supports the - * search operation. You may have many different methods annotated with - * this annotation, to support many different search criteria. This - * example searches by family name. - * - * @param theIdentifier - * This operation takes one parameter which is the search criteria. It is - * annotated with the "@Required" annotation. This annotation takes one argument, - * a string containing the name of the search criteria. The datatype here - * is StringDt, but there are other possible parameter types depending on the - * specific search criteria. - * @return - * This method returns a list of Patients. This list may contain multiple - * matching resources, or it may also be empty. - */ - @Search() - public List getPatient(@RequiredParam(name = Patient.SP_FAMILY) StringDt theFamilyName) { - Patient patient = new Patient(); - patient.addIdentifier(); - patient.getIdentifier().get(0).setUse(IdentifierUseEnum.OFFICIAL); - patient.getIdentifier().get(0).setSystem(new UriDt("urn:hapitest:mrns")); - patient.getIdentifier().get(0).setValue("00001"); - patient.addName(); - patient.getName().get(0).addFamily("Test"); - patient.getName().get(0).addGiven("PatientOne"); - patient.setGender(AdministrativeGenderEnum.MALE); - return Collections.singletonList(patient); - } - -} -//END SNIPPET: provider diff --git a/examples/src/main/java/example/RestfulPatientResourceProvider.java b/examples/src/main/java/example/RestfulPatientResourceProvider.java deleted file mode 100644 index 3fe42a9ab39..00000000000 --- a/examples/src/main/java/example/RestfulPatientResourceProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -package example; - -import java.util.Collections; -import java.util.List; - -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; -import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.UriDt; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.IResourceProvider; - -//START SNIPPET: provider -/** - * All resource providers must implement IResourceProvider - */ -public class RestfulPatientResourceProvider implements IResourceProvider { - - /** - * The getResourceType method comes from IResourceProvider, and must - * be overridden to indicate what type of resource this provider - * supplies. - */ - @Override - public Class getResourceType() { - return Patient.class; - } - - /** - * The "@Read" annotation indicates that this method supports the - * read operation. Read operations should return a single resource - * instance. - * - * @param theId - * The read operation takes one parameter, which must be of type - * IdDt and must be annotated with the "@Read.IdParam" annotation. - * @return - * Returns a resource matching this identifier, or null if none exists. - */ - @Read() - public Patient getResourceById(@IdParam IdDt theId) { - Patient patient = new Patient(); - patient.addIdentifier(); - patient.getIdentifier().get(0).setSystem(new UriDt("urn:hapitest:mrns")); - patient.getIdentifier().get(0).setValue("00002"); - patient.addName().addFamily("Test"); - patient.getName().get(0).addGiven("PatientOne"); - patient.setGender(AdministrativeGenderEnum.FEMALE); - return patient; - } - - /** - * The "@Search" annotation indicates that this method supports the - * search operation. You may have many different methods annotated with - * this annotation, to support many different search criteria. This - * example searches by family name. - * - * @param theFamilyName - * This operation takes one parameter which is the search criteria. It is - * annotated with the "@Required" annotation. This annotation takes one argument, - * a string containing the name of the search criteria. The datatype here - * is StringParam, but there are other possible parameter types depending on the - * specific search criteria. - * @return - * This method returns a list of Patients. This list may contain multiple - * matching resources, or it may also be empty. - */ - @Search() - public List getPatient(@RequiredParam(name = Patient.SP_FAMILY) StringParam theFamilyName) { - Patient patient = new Patient(); - patient.addIdentifier(); - patient.getIdentifier().get(0).setUse(IdentifierUseEnum.OFFICIAL); - patient.getIdentifier().get(0).setSystem(new UriDt("urn:hapitest:mrns")); - patient.getIdentifier().get(0).setValue("00001"); - patient.addName(); - patient.getName().get(0).addFamily(theFamilyName.getValue()); - patient.getName().get(0).addGiven("PatientOne"); - patient.setGender(AdministrativeGenderEnum.MALE); - return Collections.singletonList(patient); - } - -} -//END SNIPPET: provider - - diff --git a/examples/src/main/java/example/RestfulPatientResourceProviderMore.java b/examples/src/main/java/example/RestfulPatientResourceProviderMore.java deleted file mode 100644 index 8bb1c1eed4d..00000000000 --- a/examples/src/main/java/example/RestfulPatientResourceProviderMore.java +++ /dev/null @@ -1,1036 +0,0 @@ -package example; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.dstu3.model.Bundle; -import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.dstu3.model.Identifier.IdentifierUse; -import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.*; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.annotation.*; -import ca.uhn.fhir.rest.annotation.Count; -import ca.uhn.fhir.rest.api.*; -import ca.uhn.fhir.rest.client.api.IBasicClient; -import ca.uhn.fhir.rest.client.api.IRestfulClient; -import ca.uhn.fhir.rest.param.*; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.exceptions.*; - -@SuppressWarnings("unused") -public abstract class RestfulPatientResourceProviderMore implements IResourceProvider { - - public interface ITestClient extends IBasicClient - { - - @Search - List getPatientByDob(@RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theParam); - - } - -private boolean detectedVersionConflict; -private boolean conflictHappened; -private boolean couldntFindThisId; -private FhirContext myContext; - -//START SNIPPET: searchAll -@Search -public List getAllOrganizations() { - List retVal=new ArrayList(); // populate this - return retVal; -} -//END SNIPPET: searchAll - -//START SNIPPET: updateEtag -@Update -public MethodOutcome update(@IdParam IdType theId, @ResourceParam Patient thePatient) { - String resourceId = theId.getIdPart(); - String versionId = theId.getVersionIdPart(); // this will contain the ETag - - String currentVersion = "1"; // populate this with the current version - - if (!versionId.equals(currentVersion)) { - throw new ResourceVersionConflictException("Expected version " + currentVersion); - } - - // ... perform the update ... - return new MethodOutcome(); - -} -//END SNIPPET: updateEtag - -//START SNIPPET: summaryAndElements -@Search -public List search( - SummaryEnum theSummary, // will receive the summary (no annotation required) - @Elements Set theElements // (requires the @Elements annotation) - ) { - return null; // todo: populate -} -//END SNIPPET: summaryAndElements - -//START SNIPPET: searchCompartment -public class PatientRp implements IResourceProvider { - - @Override - public Class getResourceType() { - return Patient.class; - } - - @Search(compartmentName="Condition") - public List searchCompartment(@IdParam IdType thePatientId) { - List retVal=new ArrayList(); - - // populate this with resources of any type that are a part of the - // "Condition" compartment for the Patient with ID "thePatientId" - - return retVal; - } - - // .. also include other Patient operations .. -} -//END SNIPPET: searchCompartment - - -//START SNIPPET: sort -@Search -public List findPatients( - @RequiredParam(name=Patient.SP_IDENTIFIER) StringParam theParameter, - @Sort SortSpec theSort) { - List retVal=new ArrayList(); // populate this - - // theSort is null unless a _sort parameter is actually provided - if (theSort != null) { - - // The name of the param to sort by - String param = theSort.getParamName(); - - // The sort order, or null - SortOrderEnum order = theSort.getOrder(); - - // This will be populated if a second _sort was specified - SortSpec subSort = theSort.getChain(); - - // ...apply the sort... - } - - return retVal; -} -//END SNIPPET: sort - -//START SNIPPET: underlyingReq -@Search -public List findPatients( - @RequiredParam(name="foo") StringParam theParameter, - HttpServletRequest theRequest, - HttpServletResponse theResponse) { - List retVal=new ArrayList(); // populate this - return retVal; -} -//END SNIPPET: underlyingReq - -//START SNIPPET: referenceSimple -@Search -public List findDiagnosticReportsWithSubjet( - @OptionalParam(name=DiagnosticReport.SP_SUBJECT) ReferenceParam theSubject - ) { - List retVal=new ArrayList(); - - // If the parameter passed in includes a resource type (e.g. ?subject:Patient=123) - // that resource type is available. Here we just check that it is either not provided - // or set to "Patient" - if (theSubject.hasResourceType()) { - String resourceType = theSubject.getResourceType(); - if ("Patient".equals(resourceType) == false) { - throw new InvalidRequestException("Invalid resource type for parameter 'subject': " + resourceType); - } - } - - if (theSubject != null) { - // ReferenceParam extends IdType so all of the resource ID methods are available - String subjectId = theSubject.getIdPart(); - - // .. populate retVal with DiagnosticReport resources having - // subject with id "subjectId" .. - - } - - return retVal; - -} -//END SNIPPET: referenceSimple - - -//START SNIPPET: referenceWithChain -@Search -public List findReportsWithChain( - @RequiredParam(name=DiagnosticReport.SP_SUBJECT, chainWhitelist= {Patient.SP_FAMILY, Patient.SP_GENDER}) ReferenceParam theSubject - ) { - List retVal=new ArrayList(); - - String chain = theSubject.getChain(); - if (Patient.SP_FAMILY.equals(chain)) { - String familyName = theSubject.getValue(); - // .. populate with reports matching subject family name .. - } - if (Patient.SP_GENDER.equals(chain)) { - String gender = theSubject.getValue(); - // .. populate with reports matching subject gender .. - } - - return retVal; -} -//END SNIPPET: referenceWithChain - - -//START SNIPPET: referenceWithChainCombo -@Search -public List findReportsWithChainCombo ( - @RequiredParam(name=DiagnosticReport.SP_SUBJECT, chainWhitelist= {"", Patient.SP_FAMILY}) ReferenceParam theSubject - ) { - List retVal=new ArrayList(); - - String chain = theSubject.getChain(); - if (Patient.SP_FAMILY.equals(chain)) { - String familyName = theSubject.getValue(); - // .. populate with reports matching subject family name .. - } - if ("".equals(chain)) { - String resourceId = theSubject.getValue(); - // .. populate with reports matching subject with resource ID .. - } - - return retVal; -} -//END SNIPPET: referenceWithChainCombo - - -//START SNIPPET: referenceWithStaticChain -@Search -public List findObservations( - @RequiredParam(name=Observation.SP_SUBJECT+'.'+Patient.SP_IDENTIFIER) TokenParam theProvider - ) { - - String system = theProvider.getSystem(); - String identifier = theProvider.getValue(); - - // ...Do a search for all observations for the given subject... - - List retVal=new ArrayList(); // populate this - return retVal; - -} -//END SNIPPET: referenceWithStaticChain - - -//START SNIPPET: referenceWithDynamicChain -@Search() -public List findBySubject( - @RequiredParam(name=Observation.SP_SUBJECT, chainWhitelist = {"", Patient.SP_IDENTIFIER, Patient.SP_BIRTHDATE}) ReferenceParam subject - ) { - List observations = new ArrayList(); - - String chain = subject.getChain(); - if (Patient.SP_IDENTIFIER.equals(chain)) { - - // Because the chained parameter "subject.identifier" is actually of type - // "token", we convert the value to a token before processing it. - TokenParam tokenSubject = subject.toTokenParam(myContext); - String system = tokenSubject.getSystem(); - String identifier = tokenSubject.getValue(); - - // TODO: populate all the observations for the identifier - - } else if (Patient.SP_BIRTHDATE.equals(chain)) { - - // Because the chained parameter "subject.birthdate" is actually of type - // "date", we convert the value to a date before processing it. - DateParam dateSubject = subject.toDateParam(myContext); - DateTimeType birthDate = new DateTimeType(dateSubject.getValueAsString()); - - // TODO: populate all the observations for the birthdate - - } else if ("".equals(chain)) { - - String resourceId = subject.getValue(); - // TODO: populate all the observations for the resource id - - } - - return observations; -} -//END SNIPPET: referenceWithDynamicChain - - -//START SNIPPET: read -@Read() -public Patient getResourceById(@IdParam IdType theId) { - Patient retVal = new Patient(); - - // ...populate... - retVal.addIdentifier().setSystem("urn:mrns").setValue("12345"); - retVal.addName().setFamily("Smith").addGiven("Tester").addGiven("Q"); - // ...etc... - - // if you know the version ID of the resource, you should set it and HAPI will - // include it in a Content-Location header - retVal.setId(new IdType("Patient", "123", "2")); - - return retVal; -} -//END SNIPPET: read - -//START SNIPPET: delete -@Delete() -public void deletePatient(@IdParam IdType theId) { - // .. Delete the patient .. - if (couldntFindThisId) { - throw new ResourceNotFoundException("Unknown version"); - } - if (conflictHappened) { - throw new ResourceVersionConflictException("Couldn't delete because [foo]"); - } - // otherwise, delete was successful - return; // can also return MethodOutcome -} -//END SNIPPET: delete - - -//START SNIPPET: deleteConditional -@Delete() -public void deletePatientConditional(@IdParam IdType theId, @ConditionalUrlParam String theConditionalUrl) { - // Only one of theId or theConditionalUrl will have a value depending - // on whether the URL receieved was a logical ID, or a conditional - // search string - if (theId != null) { - // do a normal delete - } else { - // do a conditional delete - } - - // otherwise, delete was successful - return; // can also return MethodOutcome -} -//END SNIPPET: deleteConditional - -//START SNIPPET: history -@History() -public List getPatientHistory( - @IdParam IdType theId, - @Since InstantType theSince, - @At DateRangeParam theAt - ) { - List retVal = new ArrayList(); - - Patient patient = new Patient(); - patient.addName().setFamily("Smith"); - - // Set the ID and version - patient.setId(theId.withVersion("1")); - - // ...populate the rest... - return retVal; -} -//END SNIPPET: history - - -//START SNIPPET: vread -@Read(version=true) -public Patient readOrVread(@IdParam IdType theId) { - Patient retVal = new Patient(); - - if (theId.hasVersionIdPart()) { - // this is a vread - } else { - // this is a read - } - - // ...populate... - - return retVal; -} -//END SNIPPET: vread - -//START SNIPPET: searchStringParam -@Search() -public List searchByLastName(@RequiredParam(name=Patient.SP_FAMILY) StringParam theFamily) { - String valueToMatch = theFamily.getValue(); - - if (theFamily.isExact()) { - // Do an exact match search - } else { - // Do a fuzzy search if possible - } - - // ...populate... - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:mrns").setValue("12345"); - patient.addName().setFamily("Smith").addGiven("Tester").addGiven("Q"); - // ...etc... - - // Every returned resource must have its logical ID set. If the server - // supports versioning, that should be set too - String logicalId = "4325"; - String versionId = "2"; // optional - patient.setId(new IdType("Patient", logicalId, versionId)); - - /* - * This is obviously a fairly contrived example since we are always - * just returning the same hardcoded patient, but in a real scenario - * you could return as many resources as you wanted, and they - * should actually match the given search criteria. - */ - List retVal = new ArrayList(); - retVal.add(patient); - - return retVal; -} -//END SNIPPET: searchStringParam - -//START SNIPPET: searchNamedQuery -@Search(queryName="namedQuery1") -public List searchByNamedQuery(@RequiredParam(name="someparam") StringParam theSomeParam) { - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchNamedQuery - -//START SNIPPET: searchComposite -@Search() -public List searchByComposite( - @RequiredParam(name=Observation.SP_CODE_VALUE_DATE, compositeTypes= {TokenParam.class, DateParam.class}) - CompositeParam theParam) { - // Each of the two values in the composite param are accessible separately. - // In the case of Observation's name-value-date, the left is a string and - // the right is a date. - TokenParam observationName = theParam.getLeftValue(); - DateParam observationValue = theParam.getRightValue(); - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchComposite - - -//START SNIPPET: searchIdentifierParam -@Search() -public List searchByIdentifier(@RequiredParam(name=Patient.SP_IDENTIFIER) TokenParam theId) { - String identifierSystem = theId.getSystem(); - String identifier = theId.getValue(); - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchIdentifierParam - -//START SNIPPET: searchOptionalParam -@Search() -public List searchByNames( @RequiredParam(name=Patient.SP_FAMILY) StringParam theFamilyName, - @OptionalParam(name=Patient.SP_GIVEN) StringParam theGivenName ) { - String familyName = theFamilyName.getValue(); - String givenName = theGivenName != null ? theGivenName.getValue() : null; - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchOptionalParam - -//START SNIPPET: searchWithDocs -@Description(shortDefinition="This search finds all patient resources matching a given name combination") -@Search() -public List searchWithDocs( - @Description(shortDefinition="This is the patient's last name - Supports partial matches") - @RequiredParam(name=Patient.SP_FAMILY) StringParam theFamilyName, - - @Description(shortDefinition="This is the patient's given names") - @OptionalParam(name=Patient.SP_GIVEN) StringParam theGivenName ) { - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchWithDocs - - -//START SNIPPET: searchMultiple -@Search() -public List searchByObservationNames( - @RequiredParam(name=Observation.SP_CODE) TokenOrListParam theCodings ) { - - // The list here will contain 0..* codings, and any observations which match any of the - // given codings should be returned - List wantedCodings = theCodings.getValuesAsQueryTokens(); - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchMultiple - - -//START SNIPPET: searchMultipleAnd -@Search() -public List searchByPatientAddress( - @RequiredParam(name=Patient.SP_ADDRESS) StringAndListParam theAddressParts ) { - - // StringAndListParam is a container for 0..* StringOrListParam, which is in turn a - // container for 0..* strings. It is a little bit weird to understand at first, but think of the - // StringAndListParam to be an AND list with multiple OR lists inside it. So you will need - // to return results which match at least one string within every OR list. - List wantedCodings = theAddressParts.getValuesAsQueryTokens(); - for (StringOrListParam nextOrList : wantedCodings) { - List queryTokens = nextOrList.getValuesAsQueryTokens(); - // Only return results that match at least one of the tokens in the list below - for (StringParam nextString : queryTokens) { - // ....check for match... - } - } - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: searchMultipleAnd - - -//START SNIPPET: dates -@Search() -public List searchByObservationNames( @RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theDate ) { - ParamPrefixEnum prefix = theDate.getPrefix(); // e.g. gt, le, etc.. - Date date = theDate.getValue(); // e.g. 2011-01-02 - TemporalPrecisionEnum precision = theDate.getPrecision(); // e.g. DAY - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: dates - -public void dateClientExample() { -ITestClient client = provideTc(); -//START SNIPPET: dateClient -DateParam param = new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, "2011-01-02"); -List response = client.getPatientByDob(param); -//END SNIPPET: dateClient -} - -//START SNIPPET: dateRange -@Search() -public List searchByDateRange( - @RequiredParam(name=Observation.SP_DATE) DateRangeParam theRange ) { - - Date from = theRange.getLowerBoundAsInstant(); - Date to = theRange.getUpperBoundAsInstant(); - - List retVal = new ArrayList(); - // ...populate... - return retVal; -} -//END SNIPPET: dateRange - - -private ITestClient provideTc() { - return null; -} -@Override -public Class getResourceType() { - return null; -} - - - -//START SNIPPET: pathSpec -@Search() -public List getDiagnosticReport( - @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) - TokenParam theIdentifier, - - @IncludeParam(allow= {"DiagnosticReport:subject"}) - Set theIncludes ) { - - List retVal = new ArrayList(); - - // Assume this method exists and loads the report from the DB - DiagnosticReport report = loadSomeDiagnosticReportFromDatabase(theIdentifier); - - // If the client has asked for the subject to be included: - if (theIncludes.contains(new Include("DiagnosticReport:subject"))) { - - // The resource reference should contain the ID of the patient - IIdType subjectId = report.getSubject().getReferenceElement(); - - // So load the patient ID and return it - Patient subject = loadSomePatientFromDatabase(subjectId); - report.getSubject().setResource(subject); - - } - - retVal.add(report); - return retVal; -} -//END SNIPPET: pathSpec - -//START SNIPPET: revInclude -@Search() -public List getDiagnosticReport( - @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) - TokenParam theIdentifier, - - @IncludeParam() - Set theIncludes, - - @IncludeParam(reverse=true) - Set theReverseIncludes - ) { - -return new ArrayList(); // populate this -} -//END SNIPPET: revInclude - -//START SNIPPET: pathSpecSimple -@Search() -public List getDiagnosticReport( - @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) - TokenParam theIdentifier, - - @IncludeParam(allow= {"DiagnosticReport:subject"}) - String theInclude ) { - - List retVal = new ArrayList(); - - // Assume this method exists and loads the report from the DB - DiagnosticReport report = loadSomeDiagnosticReportFromDatabase(theIdentifier); - - // If the client has asked for the subject to be included: - if ("DiagnosticReport:subject".equals(theInclude)) { - - // The resource reference should contain the ID of the patient - IIdType subjectId = report.getSubject().getReferenceElement(); - - // So load the patient ID and return it - Patient subject = loadSomePatientFromDatabase(subjectId); - report.getSubject().setResource(subject); - - } - - retVal.add(report); - return retVal; -} -//END SNIPPET: pathSpecSimple - -//START SNIPPET: quantity -@Search() -public List getObservationsByQuantity( - @RequiredParam(name=Observation.SP_VALUE_QUANTITY) QuantityParam theQuantity) { - - List retVal = new ArrayList(); - - ParamPrefixEnum prefix = theQuantity.getPrefix(); - BigDecimal value = theQuantity.getValue(); - String units = theQuantity.getUnits(); - // .. Apply these parameters .. - - // ... populate ... - return retVal; -} -//END SNIPPET: quantity - -private DiagnosticReport loadSomeDiagnosticReportFromDatabase(TokenParam theIdentifier) { - return null; -} - -private Patient loadSomePatientFromDatabase(IIdType theId) { - return null; -} - - -//START SNIPPET: create -@Create -public MethodOutcome createPatient(@ResourceParam Patient thePatient) { - - /* - * First we might want to do business validation. The UnprocessableEntityException - * results in an HTTP 422, which is appropriate for business rule failure - */ - if (thePatient.getIdentifierFirstRep().isEmpty()) { - /* It is also possible to pass an OperationOutcome resource - * to the UnprocessableEntityException if you want to return - * a custom populated OperationOutcome. Otherwise, a simple one - * is created using the string supplied below. - */ - throw new UnprocessableEntityException("No identifier supplied"); - } - - // Save this patient to the database... - savePatientToDatabase(thePatient); - - // This method returns a MethodOutcome object which contains - // the ID (composed of the type Patient, the logical ID 3746, and the - // version ID 1) - MethodOutcome retVal = new MethodOutcome(); - retVal.setId(new IdType("Patient", "3746", "1")); - - // You can also add an OperationOutcome resource to return - // This part is optional though: - OperationOutcome outcome = new OperationOutcome(); - outcome.addIssue().setDiagnostics("One minor issue detected"); - retVal.setOperationOutcome(outcome); - - return retVal; -} -//END SNIPPET: create - - -//START SNIPPET: createConditional -@Create -public MethodOutcome createPatientConditional( - @ResourceParam Patient thePatient, - @ConditionalUrlParam String theConditionalUrl) { - - if (theConditionalUrl != null) { - // We are doing a conditional create - - // populate this with the ID of the existing resource which - // matches the conditional URL - return new MethodOutcome(); - } else { - // We are doing a normal create - - // populate this with the ID of the newly created resource - return new MethodOutcome(); - } - -} -//END SNIPPET: createConditional - - -//START SNIPPET: createClient -@Create -public abstract MethodOutcome createNewPatient(@ResourceParam Patient thePatient); -//END SNIPPET: createClient - -//START SNIPPET: updateConditional -@Update -public MethodOutcome updatePatientConditional( - @ResourceParam Patient thePatient, - @IdParam IdType theId, - @ConditionalUrlParam String theConditional) { - - // Only one of theId or theConditional will have a value and the other will be null, - // depending on the URL passed into the server. - if (theConditional != null) { - // Do a conditional update. theConditional will have a value like "Patient?identifier=system%7C00001" - } else { - // Do a normal update. theId will have the identity of the resource to update - } - - return new MethodOutcome(); // populate this -} -//END SNIPPET: updateConditional - -//START SNIPPET: updatePrefer -@Update -public MethodOutcome updatePatientPrefer( - @ResourceParam Patient thePatient, - @IdParam IdType theId) { - - // Save the patient to the database - - // Update the version and last updated time on the resource - IdType updatedId = theId.withVersion("123"); - thePatient.setId(updatedId); - InstantType lastUpdated = InstantType.withCurrentTime(); - thePatient.getMeta().setLastUpdatedElement(lastUpdated); - - // Add the resource to the outcome, so that it can be returned by the server - // if the client requests it - MethodOutcome outcome = new MethodOutcome(); - outcome.setId(updatedId); - outcome.setResource(thePatient); - return outcome; -} -//END SNIPPET: updatePrefer - -//START SNIPPET: updateRaw -@Update -public MethodOutcome updatePatientWithRawValue ( - @ResourceParam Patient thePatient, - @IdParam IdType theId, - @ResourceParam String theRawBody, - @ResourceParam EncodingEnum theEncodingEnum) { - - // Here, thePatient will have the parsed patient body, but - // theRawBody will also have the raw text of the resource - // being created, and theEncodingEnum will tell you which - // encoding was used - - return new MethodOutcome(); // populate this -} -//END SNIPPET: updateRaw - -//START SNIPPET: update -@Update -public MethodOutcome updatePatient(@IdParam IdType theId, @ResourceParam Patient thePatient) { - - /* - * First we might want to do business validation. The UnprocessableEntityException - * results in an HTTP 422, which is appropriate for business rule failure - */ - if (thePatient.getIdentifierFirstRep().isEmpty()) { - /* It is also possible to pass an OperationOutcome resource - * to the UnprocessableEntityException if you want to return - * a custom populated OperationOutcome. Otherwise, a simple one - * is created using the string supplied below. - */ - throw new UnprocessableEntityException("No identifier supplied"); - } - - String versionId = theId.getVersionIdPart(); - if (versionId != null) { - // If the client passed in a version number in an If-Match header, they are - // doing a version-aware update. You may wish to throw an exception if the supplied - // version is not the latest version. Note that as of DSTU2 the FHIR specification uses - // ETags and If-Match to handle version aware updates, so PreconditionFailedException (HTTP 412) - // is used instead of ResourceVersionConflictException (HTTP 409) - if (detectedVersionConflict) { - throw new PreconditionFailedException("Unexpected version"); - } - } - - // Save this patient to the database... - savePatientToDatabase(theId, thePatient); - - // This method returns a MethodOutcome object which contains - // the ID and Version ID for the newly saved resource - MethodOutcome retVal = new MethodOutcome(); - String newVersion = "2"; // may be null if the server is not version aware - retVal.setId(theId.withVersion(newVersion)); - - // You can also add an OperationOutcome resource to return - // This part is optional though: - OperationOutcome outcome = new OperationOutcome(); - outcome.addIssue().setDiagnostics("One minor issue detected"); - retVal.setOperationOutcome(outcome); - - // If your server supports creating resources during an update if they don't already exist - // (this is not mandatory and may not be desirable anyhow) you can flag in the response - // that this was a creation as follows: - // retVal.setCreated(true); - - return retVal; -} -//END SNIPPET: update - -//START SNIPPET: updateClient -@Update -public abstract MethodOutcome updateSomePatient(@IdParam IdType theId, @ResourceParam Patient thePatient); -//END SNIPPET: updateClient - -//START SNIPPET: validate -@Validate -public MethodOutcome validatePatient(@ResourceParam Patient thePatient, - @Validate.Mode ValidationModeEnum theMode, - @Validate.Profile String theProfile) { - - // Actually do our validation: The UnprocessableEntityException - // results in an HTTP 422, which is appropriate for business rule failure - if (thePatient.getIdentifierFirstRep().isEmpty()) { - /* It is also possible to pass an OperationOutcome resource - * to the UnprocessableEntityException if you want to return - * a custom populated OperationOutcome. Otherwise, a simple one - * is created using the string supplied below. - */ - throw new UnprocessableEntityException("No identifier supplied"); - } - - // This method returns a MethodOutcome object - MethodOutcome retVal = new MethodOutcome(); - - // You may also add an OperationOutcome resource to return - // This part is optional though: - OperationOutcome outcome = new OperationOutcome(); - outcome.addIssue().setSeverity(IssueSeverity.WARNING).setDiagnostics("One minor issue detected"); - retVal.setOperationOutcome(outcome); - - return retVal; -} -//END SNIPPET: validate - - - - -public static void main(String[] args) throws DataFormatException, IOException { -//nothing -} - - -private void savePatientToDatabase(Patient thePatient) { - // nothing -} -private void savePatientToDatabase(IdType theId, Patient thePatient) { - // nothing -} - -//START SNIPPET: metadataProvider -public class CapabilityStatementProvider { - - @Metadata - public CapabilityStatement getServerMetadata() { - CapabilityStatement retVal = new CapabilityStatement(); - // ..populate.. - return retVal; - } - -} -//END SNIPPET: metadataProvider - - - -//START SNIPPET: metadataClient -public interface MetadataClient extends IRestfulClient { - - @Metadata - CapabilityStatement getServerMetadata(); - - // ....Other methods can also be added as usual.... - -} -//END SNIPPET: metadataClient - -//START SNIPPET: historyClient -public interface HistoryClient extends IBasicClient { - /** Server level (history of ALL resources) */ - @History - Bundle getHistoryServer(); - - /** Type level (history of all resources of a given type) */ - @History(type=Patient.class) - Bundle getHistoryPatientType(); - - /** Instance level (history of a specific resource instance by type and ID) */ - @History(type=Patient.class) - Bundle getHistoryPatientInstance(@IdParam IdType theId); - - /** - * Either (or both) of the "since" and "count" paramaters can - * also be included in any of the methods above. - */ - @History - Bundle getHistoryServerWithCriteria(@Since Date theDate, @Count Integer theCount); - -} -//END SNIPPET: historyClient - - -public void bbbbb() throws DataFormatException, IOException { -//START SNIPPET: metadataClientUsage -FhirContext ctx = FhirContext.forDstu2(); -MetadataClient client = ctx.newRestfulClient(MetadataClient.class, "http://spark.furore.com/fhir"); -CapabilityStatement metadata = client.getServerMetadata(); -System.out.println(ctx.newXmlParser().encodeResourceToString(metadata)); -//END SNIPPET: metadataClientUsage -} - -//START SNIPPET: readTags -@Read() -public Patient readPatient(@IdParam IdType theId) { - Patient retVal = new Patient(); - - // ..populate demographics, contact, or anything else you usually would.. - - // Populate some tags - retVal.getMeta().addTag("http://animals", "Dog", "Canine Patient"); // TODO: more realistic example - retVal.getMeta().addTag("http://personality", "Friendly", "Friendly"); // TODO: more realistic example - - return retVal; -} -//END SNIPPET: readTags - -//START SNIPPET: clientReadInterface -private interface IPatientClient extends IBasicClient -{ - /** Read a patient from a server by ID */ - @Read - Patient readPatient(@IdParam IdType theId); - - // Only one method is shown here, but many methods may be - // added to the same client interface! -} -//END SNIPPET: clientReadInterface - -public void clientRead() { -//START SNIPPET: clientReadTags -IPatientClient client = FhirContext.forDstu2().newRestfulClient(IPatientClient.class, "http://foo/fhir"); -Patient patient = client.readPatient(new IdType("1234")); - -// Access the tag list -List tagList = patient.getMeta().getTag(); -for (Coding next : tagList) { - // ..process the tags somehow.. -} -//END SNIPPET: clientReadTags - -//START SNIPPET: clientCreateTags -Patient newPatient = new Patient(); - -// Populate the resource object -newPatient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setValue("123"); -newPatient.addName().setFamily("Jones").addGiven("Frank"); - -// Populate some tags -newPatient.getMeta().addTag("http://animals", "Dog", "Canine Patient"); // TODO: more realistic example -newPatient.getMeta().addTag("http://personality", "Friendly", "Friendly"); // TODO: more realistic example - -// ...invoke the create method on the client... -//END SNIPPET: clientCreateTags -} - -//START SNIPPET: createTags -@Create -public MethodOutcome createPatientResource(@ResourceParam Patient thePatient) { - - // ..save the resouce.. - IdType id = new IdType("123"); // the new databse primary key for this resource - - // Get the tag list - List tags = thePatient.getMeta().getTag(); - for (Coding tag : tags) { - // process/save each tag somehow - } - - return new MethodOutcome(id); -} -//END SNIPPET: createTags - -//START SNIPPET: transaction -@Transaction -public Bundle transaction(@TransactionParam Bundle theInput) { - for (BundleEntryComponent nextEntry : theInput.getEntry()) { - // Process entry - } - - Bundle retVal = new Bundle(); - // Populate return bundle - return retVal; -} -//END SNIPPET: transaction - - -} - - diff --git a/examples/src/main/java/example/SecurityInterceptors.java b/examples/src/main/java/example/SecurityInterceptors.java deleted file mode 100644 index a2e8851fa56..00000000000 --- a/examples/src/main/java/example/SecurityInterceptors.java +++ /dev/null @@ -1,66 +0,0 @@ -package example; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.codec.binary.Base64; - -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; -import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; - -public class SecurityInterceptors { - -// START SNIPPET: basicAuthInterceptor -public class BasicSecurityInterceptor extends InterceptorAdapter -{ - - /** - * This interceptor implements HTTP Basic Auth, which specifies that - * a username and password are provided in a header called Authorization. - */ - @Override - public boolean incomingRequestPostProcessed(RequestDetails theRequestDetails, HttpServletRequest theRequest, HttpServletResponse theResponse) throws AuthenticationException { - String authHeader = theRequest.getHeader("Authorization"); - - // The format of the header must be: - // Authorization: Basic [base64 of username:password] - if (authHeader == null || authHeader.startsWith("Basic ") == false) { - throw new AuthenticationException("Missing or invalid Authorization header"); - } - - String base64 = authHeader.substring("Basic ".length()); - String base64decoded = new String(Base64.decodeBase64(base64)); - String[] parts = base64decoded.split("\\:"); - - String username = parts[0]; - String password = parts[1]; - - /* - * Here we test for a hardcoded username & password. This is - * not typically how you would implement this in a production - * system of course.. - */ - if (!username.equals("someuser") || !password.equals("thepassword")) { - throw new AuthenticationException("Invalid username or password"); - } - - // Return true to allow the request to proceed - return true; - } - - -} -//END SNIPPET: basicAuthInterceptor - - - - public void basicAuthInterceptorRealm() { - //START SNIPPET: basicAuthInterceptorRealm - AuthenticationException ex = new AuthenticationException(); - ex.addAuthenticateHeaderForRealm("myRealm"); - throw ex; - //END SNIPPET: basicAuthInterceptorRealm - } - -} diff --git a/examples/src/main/java/example/ServerETagExamples.java b/examples/src/main/java/example/ServerETagExamples.java deleted file mode 100644 index b85f42c39ad..00000000000 --- a/examples/src/main/java/example/ServerETagExamples.java +++ /dev/null @@ -1,29 +0,0 @@ -package example; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; - -import ca.uhn.fhir.rest.server.ETagSupportEnum; -import ca.uhn.fhir.rest.server.RestfulServer; - -@SuppressWarnings("serial") -public class ServerETagExamples { - - // START SNIPPET: disablingETags - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class RestfulServerWithLogging extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - // ... define your resource providers here ... - - // ETag support is enabled by default - setETagSupport(ETagSupportEnum.ENABLED); - } - - } - // END SNIPPET: disablingETags - - - -} diff --git a/examples/src/main/java/example/ServerExceptionsExample.java b/examples/src/main/java/example/ServerExceptionsExample.java deleted file mode 100644 index 7506599da7a..00000000000 --- a/examples/src/main/java/example/ServerExceptionsExample.java +++ /dev/null @@ -1,33 +0,0 @@ -package example; - -import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum; -import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; - -public abstract class ServerExceptionsExample implements IResourceProvider { - -private boolean databaseIsDown; - -//START SNIPPET: returnOO -@Read -public Patient read(@IdParam IdDt theId) { - if (databaseIsDown) { - OperationOutcome oo = new OperationOutcome(); - oo.addIssue().setSeverity(IssueSeverityEnum.FATAL).setDetails("Database is down"); - throw new InternalErrorException("Database is down", oo); - } - - Patient patient = new Patient(); // populate this - return patient; -} -//END SNIPPET: returnOO - - -} - - diff --git a/examples/src/main/java/example/ServerInterceptors.java b/examples/src/main/java/example/ServerInterceptors.java deleted file mode 100644 index fdfc5311ba4..00000000000 --- a/examples/src/main/java/example/ServerInterceptors.java +++ /dev/null @@ -1,80 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.ExtensionDt; -import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; -import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.model.primitive.DateTimeDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.parser.DataFormatException; - -public class ServerInterceptors { - -@SuppressWarnings("unused") -public static void main(String[] args) throws DataFormatException, IOException { - - -// START SNIPPET: resourceExtension -// Create an example patient -Patient patient = new Patient(); -patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); - -// Create an extension -ExtensionDt ext = new ExtensionDt(); -ext.setModifier(false); -ext.setUrl("http://example.com/extensions#someext"); -ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); - -// Add the extension to the resource -patient.addUndeclaredExtension(ext); -//END SNIPPET: resourceExtension - - -//START SNIPPET: resourceStringExtension -HumanNameDt name = patient.addName(); -name.addFamily().setValue("Shmoe"); -StringDt given = name.addGiven(); -given.setValue("Joe"); -ExtensionDt ext2 = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); -given.addUndeclaredExtension(ext2); -//END SNIPPET: resourceStringExtension - -String output = FhirContext.forDstu2().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); -System.out.println(output); - - -//START SNIPPET: parseExtension -// Get all extensions (modifier or not) for a given URL -List resourceExts = patient.getUndeclaredExtensionsByUrl("http://fooextensions.com#exts"); - -// Get all non-modifier extensions regardless of URL -List nonModExts = patient.getUndeclaredExtensions(); - -//Get all non-modifier extensions regardless of URL -List modExts = patient.getUndeclaredModifierExtensions(); -//END SNIPPET: parseExtension - -} - - -public void foo() { -//START SNIPPET: subExtension -Patient patient = new Patient(); - -ExtensionDt parent = new ExtensionDt(false, "http://example.com#parent"); -patient.addUndeclaredExtension(parent); - -ExtensionDt child1 = new ExtensionDt(false, "http://example.com#childOne", new StringDt("value1")); -parent.addUndeclaredExtension(child1); - -ExtensionDt child2 = new ExtensionDt(false, "http://example.com#childTwo", new StringDt("value1")); -parent.addUndeclaredExtension(child2); -//END SNIPPET: subExtension - -} - -} diff --git a/examples/src/main/java/example/ServerMetadataExamples.java b/examples/src/main/java/example/ServerMetadataExamples.java deleted file mode 100644 index 20b5e98b838..00000000000 --- a/examples/src/main/java/example/ServerMetadataExamples.java +++ /dev/null @@ -1,41 +0,0 @@ -package example; - -import ca.uhn.fhir.model.api.Tag; -import ca.uhn.fhir.rest.annotation.Search; -import org.hl7.fhir.r4.model.InstantType; -import org.hl7.fhir.r4.model.Patient; - -import java.util.ArrayList; -import java.util.List; - -public class ServerMetadataExamples { - - // START SNIPPET: serverMethod - @Search - public List getAllPatients() { - ArrayList retVal = new ArrayList(); - - // Create a patient to return - Patient patient = new Patient(); - retVal.add(patient); - patient.setId("Patient/123"); - patient.addName().setFamily("Smith").addGiven("John"); - - // Add tags - patient.getMeta().addTag() - .setSystem(Tag.HL7_ORG_FHIR_TAG) - .setCode("some_tag") - .setDisplay("Some tag"); - patient.getMeta().addTag() - .setSystem(Tag.HL7_ORG_FHIR_TAG) - .setCode("another_tag") - .setDisplay("Another tag"); - - // Set the last updated date - patient.getMeta().setLastUpdatedElement(new InstantType("2011-02-22T11:22:00.0122Z")); - - return retVal; - } - // END SNIPPET: serverMethod - -} diff --git a/examples/src/main/java/example/ServerOperations.java b/examples/src/main/java/example/ServerOperations.java deleted file mode 100644 index 5d978867a0a..00000000000 --- a/examples/src/main/java/example/ServerOperations.java +++ /dev/null @@ -1,115 +0,0 @@ -package example; - -import java.io.IOException; -import java.util.List; - -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.model.Parameters; - -import ca.uhn.fhir.model.dstu2.composite.CodingDt; -import ca.uhn.fhir.model.dstu2.resource.Bundle; -import ca.uhn.fhir.model.dstu2.resource.ConceptMap; -import ca.uhn.fhir.model.primitive.DateDt; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Operation; -import ca.uhn.fhir.rest.annotation.OperationParam; -import ca.uhn.fhir.rest.param.DateParam; -import ca.uhn.fhir.rest.param.DateRangeParam; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.param.TokenAndListParam; -import ca.uhn.fhir.rest.param.TokenParam; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - - -public class ServerOperations { - private static final Logger ourLog = LoggerFactory.getLogger(ServerOperations.class); - - - //START SNIPPET: manualInputAndOutput - @Operation(name="$manualInputAndOutput", manualResponse=true, manualRequest=true) - public void manualInputAndOutput(HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws IOException { - String contentType = theServletRequest.getContentType(); - byte[] bytes = IOUtils.toByteArray(theServletRequest.getInputStream()); - ourLog.info("Received call with content type {} and {} bytes", contentType, bytes.length); - - // In a real example we might do something more interesting with the received bytes, - // here we'll just replace them with hardcoded ones - bytes = new byte[] { 0, 1, 2, 3 }; - - theServletResponse.setContentType(contentType); - theServletResponse.getOutputStream().write(bytes); - theServletResponse.getOutputStream().close(); - } - //END SNIPPET: manualInputAndOutput - - - //START SNIPPET: searchParamBasic - @Operation(name="$find-matches", idempotent=true) - public Parameters findMatchesBasic( - @OperationParam(name="date") DateParam theDate, - @OperationParam(name="code") TokenParam theCode) { - - Parameters retVal = new Parameters(); - // Populate bundle with matching resources - return retVal; - } - //END SNIPPET: searchParamBasic - - //START SNIPPET: searchParamAdvanced - @Operation(name="$find-matches", idempotent=true) - public Parameters findMatchesAdvanced( - @OperationParam(name="dateRange") DateRangeParam theDate, - @OperationParam(name="name") List theName, - @OperationParam(name="code") TokenAndListParam theEnd) { - - Parameters retVal = new Parameters(); - // Populate bundle with matching resources - return retVal; - } - //END SNIPPET: searchParamAdvanced - - //START SNIPPET: patientTypeOperation - @Operation(name="$everything", idempotent=true) - public Bundle patientTypeOperation( - @OperationParam(name="start") DateDt theStart, - @OperationParam(name="end") DateDt theEnd) { - - Bundle retVal = new Bundle(); - // Populate bundle with matching resources - return retVal; - } - //END SNIPPET: patientTypeOperation - - //START SNIPPET: patientInstanceOperation - @Operation(name="$everything", idempotent=true) - public Bundle patientInstanceOperation( - @IdParam IdDt thePatientId, - @OperationParam(name="start") DateDt theStart, - @OperationParam(name="end") DateDt theEnd) { - - Bundle retVal = new Bundle(); - // Populate bundle with matching resources - return retVal; - } - //END SNIPPET: patientInstanceOperation - - //START SNIPPET: serverOperation - @Operation(name="$closure") - public ConceptMap closureOperation( - @OperationParam(name="name") StringDt theStart, - @OperationParam(name="concept") List theEnd, - @OperationParam(name="version") IdDt theVersion) { - - ConceptMap retVal = new ConceptMap(); - // Populate bundle with matching resources - return retVal; - } - //END SNIPPET: serverOperation - -} diff --git a/examples/src/main/java/example/ServletExamples.java b/examples/src/main/java/example/ServletExamples.java deleted file mode 100644 index 40fe909ed2f..00000000000 --- a/examples/src/main/java/example/ServletExamples.java +++ /dev/null @@ -1,155 +0,0 @@ -package example; - -import java.util.Arrays; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; - -import org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator; -import org.springframework.web.cors.CorsConfiguration; - -import ca.uhn.fhir.rest.server.RestfulServer; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.interceptor.*; -import ca.uhn.fhir.validation.ResultSeverityEnum; - -@SuppressWarnings("serial") -public class ServletExamples { - - // START SNIPPET: loggingInterceptor - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class RestfulServerWithLogging extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - - // ... define your resource providers here ... - - // Now register the logging interceptor - LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); - registerInterceptor(loggingInterceptor); - - // The SLF4j logger "test.accesslog" will receive the logging events - loggingInterceptor.setLoggerName("test.accesslog"); - - // This is the format for each line. A number of substitution variables may - // be used here. See the JavaDoc for LoggingInterceptor for information on - // what is available. - loggingInterceptor.setMessageFormat("Source[${remoteAddr}] Operation[${operationType} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}]"); - - } - - } - // END SNIPPET: loggingInterceptor - - // START SNIPPET: validatingInterceptor - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class ValidatingServerWithLogging extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - - // ... define your resource providers here ... - - // Create an interceptor to validate incoming requests - RequestValidatingInterceptor requestInterceptor = new RequestValidatingInterceptor(); - - // Register a validator module (you could also use SchemaBaseValidator and/or SchematronBaseValidator) - requestInterceptor.addValidatorModule(new FhirInstanceValidator()); - - requestInterceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); - requestInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestInterceptor.setResponseHeaderValue("Validation on ${line}: ${message} ${severity}"); - requestInterceptor.setResponseHeaderValueNoIssues("No issues detected"); - - // Now register the validating interceptor - registerInterceptor(requestInterceptor); - - // Create an interceptor to validate responses - // This is configured in the same way as above - ResponseValidatingInterceptor responseInterceptor = new ResponseValidatingInterceptor(); - responseInterceptor.addValidatorModule(new FhirInstanceValidator()); - responseInterceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); - responseInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - responseInterceptor.setResponseHeaderValue("Validation on ${line}: ${message} ${severity}"); - responseInterceptor.setResponseHeaderValueNoIssues("No issues detected"); - registerInterceptor(responseInterceptor); - } - - } - // END SNIPPET: validatingInterceptor - - // START SNIPPET: exceptionInterceptor - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class RestfulServerWithExceptionHandling extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - - // ... define your resource providers here ... - - // Now register the interceptor - ExceptionHandlingInterceptor interceptor = new ExceptionHandlingInterceptor(); - registerInterceptor(interceptor); - - // Return the stack trace to the client for the following exception types - interceptor.setReturnStackTracesForExceptionTypes(InternalErrorException.class, NullPointerException.class); - - } - - } - // END SNIPPET: exceptionInterceptor - - // START SNIPPET: responseHighlighterInterceptor - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class RestfulServerWithResponseHighlighter extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - - // ... define your resource providers here ... - - // Now register the interceptor - ResponseHighlighterInterceptor interceptor = new ResponseHighlighterInterceptor(); - registerInterceptor(interceptor); - - } - - } - // END SNIPPET: responseHighlighterInterceptor - - // START SNIPPET: corsInterceptor - @WebServlet(urlPatterns = { "/fhir/*" }, displayName = "FHIR Server") - public class RestfulServerWithCors extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - - // ... define your resource providers here ... - - // Define your CORS configuration. This is an example - // showing a typical setup. You should customize this - // to your specific needs - CorsConfiguration config = new CorsConfiguration(); - config.addAllowedHeader("x-fhir-starter"); - config.addAllowedHeader("Origin"); - config.addAllowedHeader("Accept"); - config.addAllowedHeader("X-Requested-With"); - config.addAllowedHeader("Content-Type"); - - config.addAllowedOrigin("*"); - - config.addExposedHeader("Location"); - config.addExposedHeader("Content-Location"); - config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); - - // Create the interceptor and register it - CorsInterceptor interceptor = new CorsInterceptor(config); - registerInterceptor(interceptor); - - } - - } - // END SNIPPET: corsInterceptor - -} diff --git a/examples/src/main/java/example/TagsExamples.java b/examples/src/main/java/example/TagsExamples.java deleted file mode 100644 index 8a6c5a19aa5..00000000000 --- a/examples/src/main/java/example/TagsExamples.java +++ /dev/null @@ -1,69 +0,0 @@ -package example; - -import java.util.ArrayList; -import java.util.List; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.*; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.client.api.IGenericClient; - -public class TagsExamples { - - public static void main(String[] args) { - new TagsExamples().getResourceTags(); - } - - @SuppressWarnings("unused") - public void getResourceTags() { - // START SNIPPET: getResourceTags - IGenericClient client = FhirContext.forDstu2().newRestfulGenericClient("http://fhir.healthintersections.com.au/open"); - Patient p = client.read(Patient.class, "1"); - - // Retrieve the list of tags from the resource metadata - TagList tags = ResourceMetadataKeyEnum.TAG_LIST.get(p); - - // tags may be null if no tags were read in - if (tags == null) { - System.out.println("No tags!"); - } else { - - // You may iterate over all the tags - for (Tag next : tags) { - System.out.println(next.getScheme() + " - " + next.getTerm()); - } - - // You may also get a list of tags matching a given scheme - List someTags = tags.getTagsWithScheme("http://hl7.org/fhir/tag"); - - // Or a specific tag (by scheme and term) - Tag specificTag = tags.getTag("http://hl7.org/fhir/tag", "http://foo"); - - } - // END SNIPPET: getResourceTags - } - - // START SNIPPET: serverMethod - @Search - public List getAllPatients() { - ArrayList retVal = new ArrayList(); - - // Create a patient to return - Patient patient = new Patient(); - patient.setId("Patient/123"); - patient.addName().addFamily("Smith").addGiven("John"); - - // Create a tag list and add it to the resource - TagList tags = new TagList(); - ResourceMetadataKeyEnum.TAG_LIST.put(patient, tags); - - // Add some tags to the list - tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag1.html", "Some tag"); - tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag2.html", "Another tag"); - - return retVal; - } - // END SNIPPET: serverMethod - -} diff --git a/examples/src/main/java/example/ValidateDirectory.java b/examples/src/main/java/example/ValidateDirectory.java deleted file mode 100644 index 4c6ea0986ad..00000000000 --- a/examples/src/main/java/example/ValidateDirectory.java +++ /dev/null @@ -1,105 +0,0 @@ -package example; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -import java.io.File; -import java.io.FileReader; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.dstu3.model.ValueSet; -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.validation.FhirValidator; -import ca.uhn.fhir.validation.ValidationResult; - -public class ValidateDirectory { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidateDirectory.class); - - public static void main(String[] args) throws Exception { - // Load all profiles in this directory - File profileDirectory = new File("/tmp/directory/with/profiles"); - - // Validate resources in this directory - File resourceDirectory = new File("/tmp/directory/with/resources/to/validate"); - - FhirContext ctx = FhirContext.forDstu3(); - IParser xmlParser = ctx.newXmlParser(); - IParser jsonParser = ctx.newJsonParser(); - - Map structureDefinitions = new HashMap(); - Map codeSystems = new HashMap(); - Map valueSets = new HashMap(); - - // Load all profile files - for (File nextFile : profileDirectory.listFiles()) { - - IBaseResource parsedRes = null; - if (nextFile.getAbsolutePath().toLowerCase().endsWith(".xml")) { - parsedRes = xmlParser.parseResource(new FileReader(nextFile)); - } else if (nextFile.getAbsolutePath().toLowerCase().endsWith(".json")) { - parsedRes = jsonParser.parseResource(new FileReader(nextFile)); - } else { - ourLog.info("Ignoring file: {}", nextFile.getName()); - } - - if (parsedRes instanceof StructureDefinition) { - StructureDefinition res = (StructureDefinition) parsedRes; - if (isNotBlank(res.getUrl())) { - structureDefinitions.put(res.getUrl(), res); - } - } else if (parsedRes instanceof ValueSet) { - ValueSet res = (ValueSet) parsedRes; - if (isNotBlank(res.getUrl())) { - valueSets.put(res.getUrl(), res); - } - } else if (parsedRes instanceof CodeSystem) { - CodeSystem res = (CodeSystem) parsedRes; - if (isNotBlank(res.getUrl())) { - codeSystems.put(res.getUrl(), res); - } - } - } - - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); - - ValidationSupportChain validationSupportChain = new ValidationSupportChain(); - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport()); - validationSupportChain.addValidationSupport(new PrePopulatedValidationSupport(structureDefinitions, valueSets, codeSystems)); - - instanceValidator.setValidationSupport(validationSupportChain); - - FhirValidator val = ctx.newValidator(); - val.registerValidatorModule(instanceValidator); - - // Loop through the files in the validation directory and validate each one - for (File nextFile : resourceDirectory.listFiles()) { - - if (nextFile.getAbsolutePath().toLowerCase().endsWith(".xml")) { - ourLog.info("Going to validate: {}", nextFile.getName()); - } else if (nextFile.getAbsolutePath().toLowerCase().endsWith(".json")) { - ourLog.info("Going to validate: {}", nextFile.getName()); - } else { - ourLog.info("Ignoring file: {}", nextFile.getName()); - continue; - } - - String input = IOUtils.toString(new FileReader(nextFile)); - ValidationResult result = val.validateWithResult(input); - IBaseOperationOutcome oo = result.toOperationOutcome(); - ourLog.info("Result:\n{}", xmlParser.setPrettyPrint(true).encodeResourceToString(oo)); - } - - } - -} diff --git a/examples/src/main/java/example/ValidateSimple.java b/examples/src/main/java/example/ValidateSimple.java deleted file mode 100644 index bef1e2b3912..00000000000 --- a/examples/src/main/java/example/ValidateSimple.java +++ /dev/null @@ -1,43 +0,0 @@ -package example; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.validation.FhirValidator; -import ca.uhn.fhir.validation.ValidationResult; -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; - -import java.io.FileReader; - -public class ValidateSimple { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidateSimple.class); - - public static void main(String[] args) throws Exception { - FhirContext ctx = FhirContext.forR4(); - - // Create a validator module - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); - - // We'll create a validation chain with only the DefaultProfileValidationupport registered - ValidationSupportChain validationSupportChain = new ValidationSupportChain(); - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport()); - instanceValidator.setValidationSupport(validationSupportChain); - - // Create a validator and register the InstanceValidator module - FhirValidator val = ctx.newValidator(); - val.registerValidatorModule(instanceValidator); - - // Read in the file and validate it - String nextFile = args[0]; - try (FileReader fileReader = new FileReader(nextFile)) { - String input = IOUtils.toString(fileReader); - ValidationResult result = val.validateWithResult(input); - IBaseOperationOutcome oo = result.toOperationOutcome(); - ourLog.info("Result:\n{}", ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); - } - - } - -} diff --git a/examples/src/main/java/example/ValidatorExamples.java b/examples/src/main/java/example/ValidatorExamples.java deleted file mode 100644 index 171b7088095..00000000000 --- a/examples/src/main/java/example/ValidatorExamples.java +++ /dev/null @@ -1,331 +0,0 @@ -package example; - -import java.io.File; -import java.io.FileReader; -import java.util.List; - -import javax.servlet.ServletException; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.filefilter.WildcardFileFilter; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.*; -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.parser.StrictErrorHandler; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.server.RestfulServer; -import ca.uhn.fhir.validation.*; -import ca.uhn.fhir.validation.schematron.SchematronBaseValidator; - -@SuppressWarnings("serial") -public class ValidatorExamples { - - public void validationIntro() { - // START SNIPPET: validationIntro - FhirContext ctx = FhirContext.forDstu3(); - - // Ask the context for a validator - FhirValidator validator = ctx.newValidator(); - - // Create some modules and register them - IValidatorModule module1 = new SchemaBaseValidator(ctx); - validator.registerValidatorModule(module1); - IValidatorModule module2 = new SchematronBaseValidator(ctx); - validator.registerValidatorModule(module2); - - // Pass a resource in to be validated. The resource can - // be an IBaseResource instance, or can be a raw String - // containing a serialized resource as text. - Patient resource = new Patient(); - ValidationResult result = validator.validateWithResult(resource); - String resourceText = ""; - ValidationResult result2 = validator.validateWithResult(resourceText); - - // The result object now contains the validation results - for (SingleValidationMessage next : result.getMessages()) { - System.out.println(next.getLocationString() + " " + next.getMessage()); - } - // END SNIPPET: validationIntro - } - - // START SNIPPET: serverValidation - public class MyRestfulServer extends RestfulServer { - - @Override - protected void initialize() throws ServletException { - // ...Configure resource providers, etc... - - // Create a context, set the error handler and instruct - // the server to use it - FhirContext ctx = FhirContext.forDstu3(); - ctx.setParserErrorHandler(new StrictErrorHandler()); - setFhirContext(ctx); - } - - } - // END SNIPPET: serverValidation - - @SuppressWarnings("unused") - public void enableValidation() { - // START SNIPPET: clientValidation - FhirContext ctx = FhirContext.forDstu3(); - - ctx.setParserErrorHandler(new StrictErrorHandler()); - - // This client will have strict parser validation enabled - IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu3"); - // END SNIPPET: clientValidation - - } - - public void parserValidation() { - // START SNIPPET: parserValidation - FhirContext ctx = FhirContext.forDstu3(); - - // Create a parser and configure it to use the strict error handler - IParser parser = ctx.newXmlParser(); - parser.setParserErrorHandler(new StrictErrorHandler()); - - // This example resource is invalid, as Patient.active can not repeat - String input = ""; - - // The following will throw a DataFormatException because of the StrictErrorHandler - parser.parseResource(Patient.class, input); - // END SNIPPET: parserValidation - } - - public void validateResource() { - // START SNIPPET: basicValidation - // As always, you need a context - FhirContext ctx = FhirContext.forDstu3(); - - // Create and populate a new patient object - Patient p = new Patient(); - p.addName().setFamily("Smith").addGiven("John").addGiven("Q"); - p.addIdentifier().setSystem("urn:foo:identifiers").setValue("12345"); - p.addTelecom().setSystem(ContactPointSystem.PHONE).setValue("416 123-4567"); - - // Request a validator and apply it - FhirValidator val = ctx.newValidator(); - - // Create the Schema/Schematron modules and register them. Note that - // you might want to consider keeping these modules around as long-term - // objects: they parse and then store schemas, which can be an expensive - // operation. - IValidatorModule module1 = new SchemaBaseValidator(ctx); - IValidatorModule module2 = new SchematronBaseValidator(ctx); - val.registerValidatorModule(module1); - val.registerValidatorModule(module2); - - ValidationResult result = val.validateWithResult(p); - if (result.isSuccessful()) { - - System.out.println("Validation passed"); - - } else { - // We failed validation! - System.out.println("Validation failed"); - } - - // The result contains a list of "messages" - List messages = result.getMessages(); - for (SingleValidationMessage next : messages) { - System.out.println("Message:"); - System.out.println(" * Location: " + next.getLocationString()); - System.out.println(" * Severity: " + next.getSeverity()); - System.out.println(" * Message : " + next.getMessage()); - } - - // You can also convert the results into an OperationOutcome resource - OperationOutcome oo = (OperationOutcome) result.toOperationOutcome(); - String results = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo); - System.out.println(results); - // END SNIPPET: basicValidation - - } - - public static void main(String[] args) throws Exception { - instanceValidator(); - - } - - private static void instanceValidator() throws Exception { - // START SNIPPET: instanceValidator - FhirContext ctx = FhirContext.forDstu3(); - - // Create a FhirInstanceValidator and register it to a validator - FhirValidator validator = ctx.newValidator(); - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); - validator.registerValidatorModule(instanceValidator); - - /* - * If you want, you can configure settings on the validator to adjust - * its behaviour during validation - */ - instanceValidator.setAnyExtensionsAllowed(true); - - - /* - * Let's create a resource to validate. This Observation has some fields - * populated, but it is missing Observation.status, which is mandatory. - */ - Observation obs = new Observation(); - obs.getCode().addCoding().setSystem("http://loinc.org").setCode("12345-6"); - obs.setValue(new StringType("This is a value")); - - // Validate - ValidationResult result = validator.validateWithResult(obs); - - /* - * Note: You can also explicitly declare a profile to validate against - * using the block below. - */ - // ValidationResult result = validator.validateWithResult(obs, new ValidationOptions().addProfile("http://myprofile.com")); - - // Do we have any errors or fatal errors? - System.out.println(result.isSuccessful()); // false - - // Show the issues - for (SingleValidationMessage next : result.getMessages()) { - System.out.println(" Next issue " + next.getSeverity() + " - " + next.getLocationString() + " - " + next.getMessage()); - } - // Prints: - // Next issue ERROR - /f:Observation - Element '/f:Observation.status': minimum required = 1, but only found 0 - // Next issue WARNING - /f:Observation/f:code - Unable to validate code "12345-6" in code system "http://loinc.org" - - // You can also convert the result into an operation outcome if you - // need to return one from a server - OperationOutcome oo = (OperationOutcome) result.toOperationOutcome(); - // END SNIPPET: instanceValidator - } - - private static void instanceValidatorCustom() throws Exception { - // START SNIPPET: instanceValidatorCustom - FhirContext ctx = FhirContext.forDstu3(); - - // Create a FhirInstanceValidator and register it to a validator - FhirValidator validator = ctx.newValidator(); - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); - validator.registerValidatorModule(instanceValidator); - - IValidationSupport valSupport = new IValidationSupport() { - - @Override - public org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent theInclude) { - // TODO: implement - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - // TODO: implement - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - // TODO: implement - return null; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - // TODO: implement - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - // TODO: implement - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - // TODO: implement - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - // TODO: implement - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - // TODO: implement - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSet) { - // TODO: implement - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - // TODO: implement - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - // TODO: implement - return null; - } - }; - - /* - * ValidationSupportChain strings multiple instances of IValidationSupport together. The - * code below is useful because it means that when the validator wants to load a - * StructureDefinition or a ValueSet, it will first use DefaultProfileValidationSupport, - * which loads the default HL7 versions. Any StructureDefinitions which are not found in - * the built-in set are delegated to your custom implementation. - */ - ValidationSupportChain support = new ValidationSupportChain(new DefaultProfileValidationSupport(), valSupport); - instanceValidator.setValidationSupport(support); - - // END SNIPPET: instanceValidatorCustom - } - - @SuppressWarnings("unused") - private static void validateFiles() throws Exception { - // START SNIPPET: validateFiles - FhirContext ctx = FhirContext.forDstu3(); - - // Create a validator and configure it - FhirValidator validator = ctx.newValidator(); - validator.setValidateAgainstStandardSchema(true); - validator.setValidateAgainstStandardSchematron(true); - - // Get a list of files in a given directory - String[] fileList = new File("/home/some/dir").list(new WildcardFileFilter("*.txt")); - for (String nextFile : fileList) { - - // For each file, load the contents into a string - String nextFileContents = IOUtils.toString(new FileReader(nextFile)); - - // Parse that string (this example assumes JSON encoding) - IBaseResource resource = ctx.newJsonParser().parseResource(nextFileContents); - - // Apply the validation. This will throw an exception on the first - // validation failure - ValidationResult result = validator.validateWithResult(resource); - if (result.isSuccessful() == false) { - throw new Exception("We failed!"); - } - - } - - // END SNIPPET: validateFiles - } - -} diff --git a/examples/src/main/java/example/ValidatorExamplesDstu3.java b/examples/src/main/java/example/ValidatorExamplesDstu3.java deleted file mode 100644 index 87a13cbdfbe..00000000000 --- a/examples/src/main/java/example/ValidatorExamplesDstu3.java +++ /dev/null @@ -1,49 +0,0 @@ -package example; - -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.validation.FhirValidator; - -public class ValidatorExamplesDstu3 { - - public void validateProfileDstu3() { - // START SNIPPET: validateFiles - - FhirContext ctx = FhirContext.forDstu3(); - FhirValidator validator = ctx.newValidator(); - - // Typically if you are doing profile validation, you want to disable - // the schema/schematron validation since the profile will specify - // all the same rules (and more) - validator.setValidateAgainstStandardSchema(false); - validator.setValidateAgainstStandardSchematron(false); - - // FhirInstanceValidator is the validation module that handles - // profile validation. So, create an InstanceValidator module - // and register it to the validator. - FhirInstanceValidator instanceVal = new FhirInstanceValidator(); - validator.registerValidatorModule(instanceVal); - - // FhirInstanceValidator requires an instance of "IValidationSupport" in - // order to function. This module is used by the validator to actually obtain - // all of the resources it needs in order to perform validation. Specifically, - // the validator uses it to fetch StructureDefinitions, ValueSets, CodeSystems, - // etc, as well as to perform terminology validation. - // - // The implementation used here (ValidationSupportChain) is allows for - // multiple implementations to be used in a chain, where if a specific resource - // is needed the whole chain is tried and the first module which is actually - // able to answer is used. The first entry in the chain that we register is - // the DefaultProfileValidationSupport, which supplies the "built-in" FHIR - // StructureDefinitions and ValueSets - ValidationSupportChain validationSupportChain = new ValidationSupportChain(); - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport()); - instanceVal.setValidationSupport(validationSupportChain); - - // END SNIPPET: validateFiles - } - -} diff --git a/examples/src/main/java/example/customtype/CustomCompositeExtension.java b/examples/src/main/java/example/customtype/CustomCompositeExtension.java deleted file mode 100644 index 49a1ce5f5ce..00000000000 --- a/examples/src/main/java/example/customtype/CustomCompositeExtension.java +++ /dev/null @@ -1,84 +0,0 @@ -package example.customtype; - -import org.hl7.fhir.dstu3.model.BackboneElement; -import org.hl7.fhir.dstu3.model.Patient; -import org.hl7.fhir.dstu3.model.StringType; - -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Extension; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.util.ElementUtil; - -//START SNIPPET: resource -@ResourceDef(name = "Patient") -public class CustomCompositeExtension extends Patient { - - private static final long serialVersionUID = 1L; - - /** - * A custom extension - */ - @Child(name = "foo") - @Extension(url="http://acme.org/fooParent", definedLocally = false, isModifier = false) - protected FooParentExtension fooParentExtension; - - public FooParentExtension getFooParentExtension() { - return fooParentExtension; - } - - @Override - public boolean isEmpty() { - return super.isEmpty() && ElementUtil.isEmpty(fooParentExtension); - } - - public void setFooParentExtension(FooParentExtension theFooParentExtension) { - fooParentExtension = theFooParentExtension; - } - - @Block - public static class FooParentExtension extends BackboneElement { - - private static final long serialVersionUID = 4522090347756045145L; - - @Child(name = "childA") - @Extension(url = "http://acme.org/fooChildA", definedLocally = false, isModifier = false) - private StringType myChildA; - - @Child(name = "childB") - @Extension(url = "http://acme.org/fooChildB", definedLocally = false, isModifier = false) - private StringType myChildB; - - @Override - public FooParentExtension copy() { - FooParentExtension copy = new FooParentExtension(); - copy.myChildA = myChildA; - copy.myChildB = myChildB; - return copy; - } - - @Override - public boolean isEmpty() { - return super.isEmpty() && ElementUtil.isEmpty(myChildA, myChildB); - } - - public StringType getChildA() { - return myChildA; - } - - public StringType getChildB() { - return myChildB; - } - - public void setChildA(StringType theChildA) { - myChildA = theChildA; - } - - public void setChildB(StringType theChildB) { - myChildB = theChildB; - } - - } - -} -//END SNIPPET: resource diff --git a/examples/src/main/java/example/customtype/CustomDatatype.java b/examples/src/main/java/example/customtype/CustomDatatype.java deleted file mode 100644 index fc3ecbc0720..00000000000 --- a/examples/src/main/java/example/customtype/CustomDatatype.java +++ /dev/null @@ -1,63 +0,0 @@ -package example.customtype; - -//START SNIPPET: datatype -import org.hl7.fhir.dstu3.model.DateTimeType; -import org.hl7.fhir.dstu3.model.StringType; -import org.hl7.fhir.dstu3.model.Type; -import org.hl7.fhir.instance.model.api.ICompositeType; - -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.util.ElementUtil; - -/** - * This is an example of a custom datatype. - * - * This is an STU3 example so it extends Type and implements ICompositeType. For - * DSTU2 it would extend BaseIdentifiableElement and implement ICompositeDatatype. - */ -@DatatypeDef(name="CustomDatatype") -public class CustomDatatype extends Type implements ICompositeType { - - private static final long serialVersionUID = 1L; - - @Child(name = "date", order = 0, min = 1, max = 1) - private DateTimeType myDate; - - @Child(name = "kittens", order = 1, min = 1, max = 1) - private StringType myKittens; - - public DateTimeType getDate() { - if (myDate == null) - myDate = new DateTimeType(); - return myDate; - } - - public StringType getKittens() { - return myKittens; - } - - @Override - public boolean isEmpty() { - return ElementUtil.isEmpty(myDate, myKittens); - } - - public CustomDatatype setDate(DateTimeType theValue) { - myDate = theValue; - return this; - } - - public CustomDatatype setKittens(StringType theKittens) { - myKittens = theKittens; - return this; - } - - @Override - protected CustomDatatype typedCopy() { - CustomDatatype retVal = new CustomDatatype(); - super.copyValues(retVal); - retVal.myDate = myDate; - return retVal; - } -} -//END SNIPPET: datatype \ No newline at end of file diff --git a/examples/src/main/java/example/customtype/CustomResource.java b/examples/src/main/java/example/customtype/CustomResource.java deleted file mode 100644 index 3e1862c5b4a..00000000000 --- a/examples/src/main/java/example/customtype/CustomResource.java +++ /dev/null @@ -1,86 +0,0 @@ -package example.customtype; - -// START SNIPPET: resource -import java.util.ArrayList; -import java.util.List; - -import org.hl7.fhir.dstu3.model.DomainResource; -import org.hl7.fhir.dstu3.model.ResourceType; -import org.hl7.fhir.dstu3.model.StringType; -import org.hl7.fhir.dstu3.model.Type; - -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.util.ElementUtil; - -/** - * This is an example of a custom resource that also uses a custom - * datatype. - * - * Note that we are extensing DomainResource for an STU3 - * resource. For DSTU2 it would be BaseResource. - */ -@ResourceDef(name = "CustomResource", profile = "http://hl7.org/fhir/profiles/custom-resource") -public class CustomResource extends DomainResource { - - private static final long serialVersionUID = 1L; - - /** - * We give the resource a field with name "television". This field has no - * specific type, so it's a choice[x] field for any type. - */ - @Child(name="television", min=1, max=Child.MAX_UNLIMITED, order=0) - private List myTelevision; - - /** - * We'll give it one more field called "dogs" - */ - @Child(name = "dogs", min=0, max=1, order=1) - private StringType myDogs; - - @Override - public CustomResource copy() { - CustomResource retVal = new CustomResource(); - super.copyValues(retVal); - retVal.myTelevision = myTelevision; - retVal.myDogs = myDogs; - return retVal; - } - - public List getTelevision() { - if (myTelevision == null) { - myTelevision = new ArrayList(); - } - return myTelevision; - } - - public StringType getDogs() { - return myDogs; - } - - @Override - public ResourceType getResourceType() { - return null; - } - - @Override - public FhirVersionEnum getStructureFhirVersionEnum() { - return FhirVersionEnum.DSTU3; - } - - @Override - public boolean isEmpty() { - return ElementUtil.isEmpty(myTelevision, myDogs); - } - - public void setTelevision(List theValue) { - this.myTelevision = theValue; - } - - public void setDogs(StringType theDogs) { - myDogs = theDogs; - } - -} -// END SNIPPET: resource diff --git a/examples/src/main/java/example/customtype/CustomUsage.java b/examples/src/main/java/example/customtype/CustomUsage.java deleted file mode 100644 index a823aea607f..00000000000 --- a/examples/src/main/java/example/customtype/CustomUsage.java +++ /dev/null @@ -1,44 +0,0 @@ -package example.customtype; - -import java.util.Date; - -import org.hl7.fhir.dstu3.model.DateTimeType; -import org.hl7.fhir.dstu3.model.DateType; -import org.hl7.fhir.dstu3.model.StringType; - -import ca.uhn.fhir.context.FhirContext; - -public class CustomUsage { - - public static void main(String[] args) { - - // START SNIPPET: usage - // Create a context. Note that we declare the custom types we'll be using - // on the context before actually using them - FhirContext ctx = FhirContext.forDstu3(); - ctx.registerCustomType(CustomResource.class); - ctx.registerCustomType(CustomDatatype.class); - - // Now let's create an instance of our custom resource type - // and populate it with some data - CustomResource res = new CustomResource(); - - // Add some values, including our custom datatype - DateType value0 = new DateType("2015-01-01"); - res.getTelevision().add(value0); - - CustomDatatype value1 = new CustomDatatype(); - value1.setDate(new DateTimeType(new Date())); - value1.setKittens(new StringType("FOO")); - res.getTelevision().add(value1); - - res.setDogs(new StringType("Some Dogs")); - - // Now let's serialize our instance - String output = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(res); - System.out.println(output); - // END SNIPPET: usage - - } - -} diff --git a/examples/src/main/java/example/interceptor/MyTestInterceptor.java b/examples/src/main/java/example/interceptor/MyTestInterceptor.java deleted file mode 100644 index bd62ea36b64..00000000000 --- a/examples/src/main/java/example/interceptor/MyTestInterceptor.java +++ /dev/null @@ -1,25 +0,0 @@ -package example.interceptor; - -import ca.uhn.fhir.interceptor.api.Hook; -import ca.uhn.fhir.interceptor.api.Interceptor; -import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.jpa.subscription.module.CanonicalSubscription; -import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage; - -/** - * Interceptor class - */ -@Interceptor -public class MyTestInterceptor { - - @Hook(Pointcut.SUBSCRIPTION_BEFORE_REST_HOOK_DELIVERY) - public boolean beforeRestHookDelivery(ResourceDeliveryMessage theDeliveryMessage, CanonicalSubscription theSubscription) { - - String header = "Authorization: Bearer 1234567"; - - theSubscription.addHeader(header); - - return true; - } - -} diff --git a/examples/src/main/java/logback.xml b/examples/src/main/java/logback.xml deleted file mode 100644 index 1c8de9da344..00000000000 --- a/examples/src/main/java/logback.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - INFO - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%file:%line] %msg%n - - - - - - - - \ No newline at end of file diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index d40f599762d..599b8fe0ee4 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml @@ -181,7 +181,16 @@ - http://jamesagnew.github.io/hapi-fhir/apidocs/ + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-base + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-dstu2 + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-dstu3 + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-r4 + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-r5 + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-client + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-server + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-jpaserver-base + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-converter + https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-validation https://docs.oracle.com/javaee/7/api/ -Xdoclint:none diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 0e7ed584440..363a68022b2 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java b/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java index 4f67c9e065e..2cb484b2734 100644 --- a/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java +++ b/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.android; * #%L * HAPI FHIR - Android * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 1193fac9f34..6e01dce40bc 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -20,8 +20,8 @@ - com.google.code.gson - gson + com.fasterxml.jackson.core + jackson-databind @@ -206,65 +206,4 @@ - - - MINI - - - SITE - - - - - - org.apache.maven.plugins - maven-jxr-plugin - - - normal - - jxr - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - - checkstyle - - - - - false - ${project.basedir}/../src/checkstyle/checkstyle.xml - - - - - - - - - - diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java index d7e6fbd42e1..e4c96a64e58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDefinition.java index 8175fdf3fc6..18b8a18b632 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,8 @@ import org.hl7.fhir.instance.model.api.IBaseReference; public abstract class BaseRuntimeChildDefinition { + private BaseRuntimeChildDefinition myReplacedParentDefinition; + public abstract IAccessor getAccessor(); public abstract BaseRuntimeElementDefinition getChildByName(String theName); @@ -66,6 +68,14 @@ public abstract class BaseRuntimeChildDefinition { return getClass().getSimpleName() + "[" + getElementName() + "]"; } + public BaseRuntimeChildDefinition getReplacedParentDefinition() { + return myReplacedParentDefinition; + } + + public void setReplacedParentDefinition(BaseRuntimeChildDefinition myReplacedParentDefinition) { + this.myReplacedParentDefinition = myReplacedParentDefinition; + } + public interface IAccessor { List getValues(IBase theTarget); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java index 0f92a634ab2..eb667e765f9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java index 5d2d623ba27..6a8be697d15 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java @@ -9,7 +9,7 @@ import java.lang.reflect.Modifier; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -263,6 +263,7 @@ public abstract class BaseRuntimeElementCompositeDefinition ext int order = childAnnotation.order(); boolean childIsChoiceType = false; boolean orderIsReplaceParent = false; + BaseRuntimeChildDefinition replacedParent = null; if (order == Child.REPLACE_PARENT) { @@ -274,7 +275,7 @@ public abstract class BaseRuntimeElementCompositeDefinition ext if (nextDef.getExtensionUrl().equals(extensionAttr.url())) { orderIsReplaceParent = true; order = nextEntry.getKey(); - orderMap.remove(nextEntry.getKey()); + replacedParent = orderMap.remove(nextEntry.getKey()); elementNames.remove(elementName); break; } @@ -293,6 +294,7 @@ public abstract class BaseRuntimeElementCompositeDefinition ext orderIsReplaceParent = true; order = nextEntry.getKey(); BaseRuntimeDeclaredChildDefinition existing = orderMap.remove(nextEntry.getKey()); + replacedParent = existing; elementNames.remove(elementName); /* @@ -450,6 +452,7 @@ public abstract class BaseRuntimeElementCompositeDefinition ext } + def.setReplacedParentDefinition(replacedParent); orderMap.put(order, def); elementNames.add(elementName); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java index b80fc5faa29..fbe2fc502dc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,11 @@ package ca.uhn.fhir.context; import ca.uhn.fhir.util.UrlUtil; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.Validate; import org.hl7.fhir.instance.model.api.IBase; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.lang.reflect.Constructor; import java.util.*; @@ -33,11 +36,11 @@ public abstract class BaseRuntimeElementDefinition { private final Class myImplementingClass; private final String myName; private final boolean myStandardType; - private Map, Constructor> myConstructors = Collections.synchronizedMap(new HashMap, Constructor>()); - private List myExtensions = new ArrayList(); - private List myExtensionsModifier = new ArrayList(); - private List myExtensionsNonModifier = new ArrayList(); - private Map myUrlToExtension = new HashMap(); + private Map, Constructor> myConstructors = Collections.synchronizedMap(new HashMap<>()); + private List myExtensions = new ArrayList<>(); + private List myExtensionsModifier = new ArrayList<>(); + private List myExtensionsNonModifier = new ArrayList<>(); + private Map myUrlToExtension = new HashMap<>(); private BaseRuntimeElementDefinition myRootParentDefinition; public BaseRuntimeElementDefinition(String theName, Class theImplementingClass, boolean theStandardType) { @@ -56,19 +59,17 @@ public abstract class BaseRuntimeElementDefinition { myImplementingClass = theImplementingClass; } - public void addExtension(RuntimeChildDeclaredExtensionDefinition theExtension) { - if (theExtension == null) { - throw new NullPointerException(); - } + public void addExtension(@Nonnull RuntimeChildDeclaredExtensionDefinition theExtension) { + Validate.notNull(theExtension, "theExtension must not be null"); myExtensions.add(theExtension); } public abstract ChildTypeEnum getChildType(); @SuppressWarnings("unchecked") - private Constructor getConstructor(Object theArgument) { + private Constructor getConstructor(@Nullable Object theArgument) { - Class argumentType; + Class argumentType; if (theArgument == null) { argumentType = VOID_CLASS; } else { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ConfigurationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ConfigurationException.java index b8f26be30ca..01422dab39b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ConfigurationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ConfigurationException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index 0e9aeb987a2..b0e7d69c9ac 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -1,7 +1,8 @@ package ca.uhn.fhir.context; import ca.uhn.fhir.context.api.AddProfileTagEnum; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.i18n.HapiLocalizer; import ca.uhn.fhir.model.api.IElement; @@ -9,7 +10,13 @@ import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.view.ViewGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator; -import ca.uhn.fhir.parser.*; +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.parser.IParserErrorHandler; +import ca.uhn.fhir.parser.JsonParser; +import ca.uhn.fhir.parser.LenientErrorHandler; +import ca.uhn.fhir.parser.RDFParser; +import ca.uhn.fhir.parser.XmlParser; import ca.uhn.fhir.rest.api.IVersionSpecificBundleFactory; import ca.uhn.fhir.rest.client.api.IBasicClient; import ca.uhn.fhir.rest.client.api.IGenericClient; @@ -20,7 +27,6 @@ import ca.uhn.fhir.util.ReflectionUtil; import ca.uhn.fhir.util.VersionUtil; import ca.uhn.fhir.validation.FhirValidator; import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.jena.riot.Lang; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; @@ -37,7 +43,7 @@ import java.util.Map.Entry; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +103,7 @@ public class FhirContext { private Collection> myResourceTypesToScan; private volatile IRestfulClientFactory myRestfulClientFactory; private volatile RuntimeChildUndeclaredExtensionDefinition myRuntimeChildUndeclaredExtensionDefinition; - private IContextValidationSupport myValidationSupport; + private IValidationSupport myValidationSupport; private Map>> myVersionToNameToResourceType = Collections.emptyMap(); /** @@ -371,15 +377,27 @@ public class FhirContext { } } + /** + * Sets the configured performance options + * + * @see PerformanceOptionsEnum for a list of available options + */ + public void setPerformanceOptions(final PerformanceOptionsEnum... thePerformanceOptions) { + Collection asList = null; + if (thePerformanceOptions != null) { + asList = Arrays.asList(thePerformanceOptions); + } + setPerformanceOptions(asList); + } + /** * Returns the scanned runtime model for the given type. This is an advanced feature which is generally only needed * for extending the core library. */ public RuntimeResourceDefinition getResourceDefinition(final Class theResourceType) { validateInitialized(); - if (theResourceType == null) { - throw new NullPointerException("theResourceType can not be null"); - } + Validate.notNull(theResourceType, "theResourceType can not be null"); + if (Modifier.isAbstract(theResourceType.getModifiers())) { throw new IllegalArgumentException("Can not scan abstract or interface class (resource definitions must be concrete classes): " + theResourceType.getName()); } @@ -544,16 +562,37 @@ public class FhirContext { /** * Returns the validation support module configured for this context, creating a default - * implementation if no module has been passed in via the {@link #setValidationSupport(IContextValidationSupport)} + * implementation if no module has been passed in via the {@link #setValidationSupport(IValidationSupport)} * method * - * @see #setValidationSupport(IContextValidationSupport) + * @see #setValidationSupport(IValidationSupport) */ - public IContextValidationSupport getValidationSupport() { - if (myValidationSupport == null) { - myValidationSupport = myVersion.createValidationSupport(); + public IValidationSupport getValidationSupport() { + IValidationSupport retVal = myValidationSupport; + if (retVal == null) { + retVal = new DefaultProfileValidationSupport(this); + + /* + * If hapi-fhir-validation is on the classpath, we can create a much more robust + * validation chain using the classes found in that package + */ + String inMemoryTermSvcType = "org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport"; + String commonCodeSystemsSupportType = "org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService"; + if (ReflectionUtil.typeExists(inMemoryTermSvcType)) { + IValidationSupport inMemoryTermSvc = ReflectionUtil.newInstanceOrReturnNull(inMemoryTermSvcType, IValidationSupport.class, new Class[]{FhirContext.class}, new Object[]{this}); + IValidationSupport commonCodeSystemsSupport = ReflectionUtil.newInstanceOrReturnNull(commonCodeSystemsSupportType, IValidationSupport.class, new Class[]{FhirContext.class}, new Object[]{this}); + retVal = ReflectionUtil.newInstanceOrReturnNull("org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain", IValidationSupport.class, new Class[]{IValidationSupport[].class}, new Object[]{new IValidationSupport[]{ + retVal, + inMemoryTermSvc, + commonCodeSystemsSupport + }}); + assert retVal != null : "Failed to instantiate " + "org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain"; + } + + + myValidationSupport = retVal; } - return myValidationSupport; + return retVal; } /** @@ -561,7 +600,7 @@ public class FhirContext { * is used to supply underlying infrastructure such as conformance resources (StructureDefinition, ValueSet, etc) * as well as to provide terminology services to modules such as the validator and FluentPath executor */ - public void setValidationSupport(IContextValidationSupport theValidationSupport) { + public void setValidationSupport(IValidationSupport theValidationSupport) { myValidationSupport = theValidationSupport; } @@ -588,10 +627,10 @@ public class FhirContext { /** * Creates a new FluentPath engine which can be used to exvaluate * path expressions over FHIR resources. Note that this engine will use the - * {@link IContextValidationSupport context validation support} module which is + * {@link IValidationSupport context validation support} module which is * configured on the context at the time this method is called. *

- * In other words, call {@link #setValidationSupport(IContextValidationSupport)} before + * In other words, call {@link #setValidationSupport(IValidationSupport)} before * calling {@link #newFluentPath()} *

*

@@ -642,7 +681,6 @@ public class FhirContext { return new RDFParser(this, myParserErrorHandler, Lang.TURTLE); } - /** * Instantiates a new client instance. This method requires an interface which is defined specifically for your use * cases to contain methods for each of the RESTful operations you wish to implement (e.g. "read ImagingStudy", @@ -862,19 +900,6 @@ public class FhirContext { myParserErrorHandler = theParserErrorHandler; } - /** - * Sets the configured performance options - * - * @see PerformanceOptionsEnum for a list of available options - */ - public void setPerformanceOptions(final PerformanceOptionsEnum... thePerformanceOptions) { - Collection asList = null; - if (thePerformanceOptions != null) { - asList = Arrays.asList(thePerformanceOptions); - } - setPerformanceOptions(asList); - } - @SuppressWarnings({"cast"}) private List> toElementList(final Collection> theResourceTypes) { if (theResourceTypes == null) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirVersionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirVersionEnum.java index c86822c8639..92d0600a42d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirVersionEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirVersionEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -190,7 +190,7 @@ public enum FhirVersionEnum { Class c = Class.forName("org.hl7.fhir.dstu3.model.Constants"); myVersion = (String) c.getDeclaredField("VERSION").get(null); } catch (Exception e) { - myVersion = "3.0.1"; + myVersion = "3.0.2"; } } @@ -210,7 +210,7 @@ public enum FhirVersionEnum { Class c = Class.forName("org.hl7.fhir.r4.model.Constants"); myVersion = (String) c.getDeclaredField("VERSION").get(null); } catch (Exception e) { - myVersion = "4.0.0"; + myVersion = "4.0.2"; } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/IRuntimeDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/IRuntimeDatatypeDefinition.java index ed436b512c6..51e401a91a6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/IRuntimeDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/IRuntimeDatatypeDefinition.java @@ -7,7 +7,7 @@ import org.hl7.fhir.instance.model.api.IBaseDatatype; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index e5554769f37..31e54b50006 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ParserOptions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ParserOptions.java index b2530c58345..901df5dfbc0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ParserOptions.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ParserOptions.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/PerformanceOptionsEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/PerformanceOptionsEnum.java index ad3b40ab260..7053a7f6a8a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/PerformanceOptionsEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/PerformanceOptionsEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java index edbb1e05efd..866464cc9f6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java index 2c39f35ece8..780ee69e4c8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeBoundDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeBoundDatatypeDefinition.java index 3bae1009352..fd5677536ad 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeBoundDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeBoundDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeDatatypeDefinition.java index 3003bd6aa70..1d43662f6f1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildCompositeDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java index 51c9208523f..1632ab44a70 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java index 44ec4d3834c..d3f141bad09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDirectResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDirectResource.java index 47ed6916aa6..40ed06214ef 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDirectResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDirectResource.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildExtension.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildExtension.java index a1734ef3deb..35e3bfb60de 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildExtension.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildExtension.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildNarrativeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildNarrativeDefinition.java index 86d4d11f767..6566ca67186 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildNarrativeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildNarrativeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveBoundCodeDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveBoundCodeDatatypeDefinition.java index 0efaa40f01e..e3be1b255ab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveBoundCodeDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveBoundCodeDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java index 61cb14d4546..1383e597505 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveEnumerationDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveEnumerationDatatypeDefinition.java index 6468439c982..01cdb367799 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveEnumerationDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveEnumerationDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceBlockDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceBlockDefinition.java index e4882faee54..2c45a2b78ea 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceBlockDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceBlockDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceDefinition.java index 1ff9f49e9af..10dfa1fbbb1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildResourceDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java index 06ed342f512..d59538db803 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java index 9c74ab42943..88417fa6a24 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResourceList.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResourceList.java index 7fe75bd697f..38af8284168 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResourceList.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResourceList.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java index 0f759cc73c6..ba22b6085ef 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java index 7d69ece0f0d..8cfd145a6cb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeExtensionDtDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeExtensionDtDefinition.java index cfc8df5e087..585f9088784 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeExtensionDtDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeExtensionDtDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeIdDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeIdDatatypeDefinition.java index ab470575381..968de942d9c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeIdDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeIdDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java index b50a8a33516..287cf0aead9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeNarrativeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeNarrativeDefinition.java index f649d112805..4f3f3f188bf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeNarrativeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeNarrativeDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition.java index c5d99fa7740..7987e3e5924 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceBlockDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceBlockDefinition.java index d7983895f91..f21157cab78 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceBlockDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceBlockDefinition.java @@ -6,7 +6,7 @@ import java.util.Map; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java index 273060db8f1..bd8a538121f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java index 5ce2dd6594f..c7312354925 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java @@ -27,7 +27,7 @@ import static org.apache.commons.lang3.StringUtils.trim; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/AddProfileTagEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/AddProfileTagEnum.java index 4e23a50c1b7..72a1111a5ec 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/AddProfileTagEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/AddProfileTagEnum.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.context.FhirContext; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/BundleInclusionRule.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/BundleInclusionRule.java index 34194885f2c..0a46a6ba521 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/BundleInclusionRule.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/api/BundleInclusionRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ConceptValidationOptions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ConceptValidationOptions.java new file mode 100644 index 00000000000..7d1d3f2d135 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ConceptValidationOptions.java @@ -0,0 +1,36 @@ +package ca.uhn.fhir.context.support; + +/*- + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +public class ConceptValidationOptions { + + public boolean isInferSystem() { + return myInferSystem; + } + + public ConceptValidationOptions setInferSystem(boolean theInferSystem) { + myInferSystem = theInferSystem; + return this; + } + + private boolean myInferSystem; + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.java new file mode 100644 index 00000000000..3498ac29df0 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.java @@ -0,0 +1,354 @@ +package ca.uhn.fhir.context.support; + +/*- + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.ConfigurationException; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.util.BundleUtil; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IPrimitiveType; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Properties; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +public class DefaultProfileValidationSupport implements IValidationSupport { + + private static final String URL_PREFIX_STRUCTURE_DEFINITION = "http://hl7.org/fhir/StructureDefinition/"; + private static final String URL_PREFIX_STRUCTURE_DEFINITION_BASE = "http://hl7.org/fhir/"; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class); + private final FhirContext myCtx; + + private Map myCodeSystems; + private Map myStructureDefinitions; + private Map myValueSets; + private List myTerminologyResources; + private List myStructureDefinitionResources; + + /** + * Constructor + * + * @param theFhirContext The context to use + */ + public DefaultProfileValidationSupport(FhirContext theFhirContext) { + myCtx = theFhirContext; + } + + + private void initializeResourceLists() { + + if (myTerminologyResources != null && myStructureDefinitionResources != null) { + return; + } + + List terminologyResources = new ArrayList<>(); + List structureDefinitionResources = new ArrayList<>(); + switch (getFhirContext().getVersion().getVersion()) { + case DSTU2: + case DSTU2_HL7ORG: + terminologyResources.add("/org/hl7/fhir/instance/model/valueset/valuesets.xml"); + terminologyResources.add("/org/hl7/fhir/instance/model/valueset/v2-tables.xml"); + terminologyResources.add("/org/hl7/fhir/instance/model/valueset/v3-codesystems.xml"); + Properties profileNameProperties = new Properties(); + try { + profileNameProperties.load(DefaultProfileValidationSupport.class.getResourceAsStream("/org/hl7/fhir/instance/model/profile/profiles.properties")); + for (Object nextKey : profileNameProperties.keySet()) { + structureDefinitionResources.add("/org/hl7/fhir/instance/model/profile/" + nextKey); + } + } catch (IOException e) { + throw new ConfigurationException(e); + } + break; + case DSTU2_1: + terminologyResources.add("/org/hl7/fhir/dstu2016may/model/valueset/valuesets.xml"); + terminologyResources.add("/org/hl7/fhir/dstu2016may/model/valueset/v2-tables.xml"); + terminologyResources.add("/org/hl7/fhir/dstu2016may/model/valueset/v3-codesystems.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu2016may/model/profile/profiles-resources.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu2016may/model/profile/profiles-types.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu2016may/model/profile/profiles-others.xml"); + break; + case DSTU3: + terminologyResources.add("/org/hl7/fhir/dstu3/model/valueset/valuesets.xml"); + terminologyResources.add("/org/hl7/fhir/dstu3/model/valueset/v2-tables.xml"); + terminologyResources.add("/org/hl7/fhir/dstu3/model/valueset/v3-codesystems.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu3/model/profile/profiles-resources.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu3/model/profile/profiles-types.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu3/model/profile/profiles-others.xml"); + structureDefinitionResources.add("/org/hl7/fhir/dstu3/model/extension/extension-definitions.xml"); + break; + case R4: + terminologyResources.add("/org/hl7/fhir/r4/model/valueset/valuesets.xml"); + terminologyResources.add("/org/hl7/fhir/r4/model/valueset/v2-tables.xml"); + terminologyResources.add("/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r4/model/profile/profiles-resources.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r4/model/profile/profiles-types.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r4/model/profile/profiles-others.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r4/model/extension/extension-definitions.xml"); + break; + case R5: + structureDefinitionResources.add("/org/hl7/fhir/r5/model/profile/profiles-resources.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r5/model/profile/profiles-types.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r5/model/profile/profiles-others.xml"); + structureDefinitionResources.add("/org/hl7/fhir/r5/model/extension/extension-definitions.xml"); + terminologyResources.add("/org/hl7/fhir/r5/model/valueset/valuesets.xml"); + terminologyResources.add("/org/hl7/fhir/r5/model/valueset/v2-tables.xml"); + terminologyResources.add("/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml"); + break; + } + + myTerminologyResources = terminologyResources; + myStructureDefinitionResources = structureDefinitionResources; + } + + + @Override + public List fetchAllConformanceResources() { + ArrayList retVal = new ArrayList<>(); + retVal.addAll(myCodeSystems.values()); + retVal.addAll(myStructureDefinitions.values()); + retVal.addAll(myValueSets.values()); + return retVal; + } + + @Override + public List fetchAllStructureDefinitions() { + return toList(provideStructureDefinitionMap()); + } + + + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + return fetchCodeSystemOrValueSet(theSystem, true); + } + + private IBaseResource fetchCodeSystemOrValueSet(String theSystem, boolean codeSystem) { + synchronized (this) { + Map codeSystems = myCodeSystems; + Map valueSets = myValueSets; + if (codeSystems == null || valueSets == null) { + codeSystems = new HashMap<>(); + valueSets = new HashMap<>(); + + initializeResourceLists(); + for (String next : myTerminologyResources) { + loadCodeSystems(codeSystems, valueSets, next); + } + + myCodeSystems = codeSystems; + myValueSets = valueSets; + } + + // System can take the form "http://url|version" + String system = theSystem; + if (system.contains("|")) { + String version = system.substring(system.indexOf('|') + 1); + if (version.matches("^[0-9.]+$")) { + system = system.substring(0, system.indexOf('|')); + } + } + + if (codeSystem) { + return codeSystems.get(system); + } else { + return valueSets.get(system); + } + } + } + + @Override + public IBaseResource fetchStructureDefinition(String theUrl) { + String url = theUrl; + if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) { + // no change + } else if (url.indexOf('/') == -1) { + url = URL_PREFIX_STRUCTURE_DEFINITION + url; + } else if (StringUtils.countMatches(url, '/') == 1) { + url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url; + } + Map structureDefinitionMap = provideStructureDefinitionMap(); + IBaseResource retVal = structureDefinitionMap.get(url); + return retVal; + } + + @Override + public IBaseResource fetchValueSet(String theUrl) { + IBaseResource retVal = fetchCodeSystemOrValueSet(theUrl, false); + return retVal; + } + + public void flush() { + myCodeSystems = null; + myStructureDefinitions = null; + } + + @Override + public FhirContext getFhirContext() { + return myCtx; + } + + private Map provideStructureDefinitionMap() { + Map structureDefinitions = myStructureDefinitions; + if (structureDefinitions == null) { + structureDefinitions = new HashMap<>(); + + initializeResourceLists(); + for (String next : myStructureDefinitionResources) { + loadStructureDefinitions(structureDefinitions, next); + } + + myStructureDefinitions = structureDefinitions; + } + return structureDefinitions; + } + + private void loadCodeSystems(Map theCodeSystems, Map theValueSets, String theClasspath) { + ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath); + InputStream inputStream = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); + InputStreamReader reader = null; + if (inputStream != null) { + try { + reader = new InputStreamReader(inputStream, Constants.CHARSET_UTF8); + List resources = parseBundle(reader); + for (IBaseResource next : resources) { + + RuntimeResourceDefinition nextDef = getFhirContext().getResourceDefinition(next); + Map map = null; + switch (nextDef.getName()) { + case "CodeSystem": + map = theCodeSystems; + break; + case "ValueSet": + map = theValueSets; + break; + } + + if (map != null) { + String urlValueString = getConformanceResourceUrl(next); + if (isNotBlank(urlValueString)) { + map.put(urlValueString, next); + } + + switch (myCtx.getVersion().getVersion()) { + case DSTU2: + case DSTU2_HL7ORG: + + IPrimitiveType codeSystem = myCtx.newTerser().getSingleValueOrNull(next, "ValueSet.codeSystem.system", IPrimitiveType.class); + if (codeSystem != null && isNotBlank(codeSystem.getValueAsString())) { + theCodeSystems.put(codeSystem.getValueAsString(), next); + } + + break; + + default: + case DSTU2_1: + case DSTU3: + case R4: + case R5: + break; + } + } + + + } + } finally { + try { + if (reader != null) { + reader.close(); + } + inputStream.close(); + } catch (IOException e) { + ourLog.warn("Failure closing stream", e); + } + } + } else { + ourLog.warn("Unable to load resource: {}", theClasspath); + } + } + + private void loadStructureDefinitions(Map theCodeSystems, String theClasspath) { + ourLog.info("Loading structure definitions from classpath: {}", theClasspath); + try (InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath)) { + if (valuesetText != null) { + try (InputStreamReader reader = new InputStreamReader(valuesetText, Constants.CHARSET_UTF8)) { + + List resources = parseBundle(reader); + for (IBaseResource next : resources) { + + String nextType = getFhirContext().getResourceDefinition(next).getName(); + if ("StructureDefinition".equals(nextType)) { + + String url = getConformanceResourceUrl(next); + if (isNotBlank(url)) { + theCodeSystems.put(url, next); + } + + } + + } + } + } else { + ourLog.warn("Unable to load resource: {}", theClasspath); + } + } catch (IOException theE) { + ourLog.warn("Unable to load resource: {}", theClasspath); + } + } + + private String getConformanceResourceUrl(IBaseResource theResource) { + String urlValueString = null; + Optional urlValue = getFhirContext().getResourceDefinition(theResource).getChildByName("url").getAccessor().getFirstValueOrNull(theResource); + if (urlValue.isPresent()) { + IPrimitiveType urlValueType = (IPrimitiveType) urlValue.get(); + urlValueString = urlValueType.getValueAsString(); + } + return urlValueString; + } + + private List parseBundle(InputStreamReader theReader) { + IBaseResource parsedObject = getFhirContext().newXmlParser().parseResource(theReader); + if (parsedObject instanceof IBaseBundle) { + IBaseBundle bundle = (IBaseBundle) parsedObject; + return BundleUtil.toListOfResources(getFhirContext(), bundle); + } else { + return Collections.singletonList(parsedObject); + } + } + + static List toList(Map theMap) { + ArrayList retVal = new ArrayList<>(theMap.values()); + return (List) Collections.unmodifiableList(retVal); + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IContextValidationSupport.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IValidationSupport.java similarity index 50% rename from hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IContextValidationSupport.java rename to hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IValidationSupport.java index 0dabbd54e7f..fc5089e2163 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IContextValidationSupport.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IValidationSupport.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.context.support; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,14 @@ package ca.uhn.fhir.context.support; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.util.ParametersUtil; +import org.apache.commons.lang3.Validate; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -42,33 +44,63 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * various functions that can be provided by validation and terminology * services. *

+ * This interface is invoked directly by internal parts of the HAPI FHIR API, including the + * Validator and the FHIRPath evaluator. It is used to supply artifacts required for validation + * (e.g. StructureDefinition resources, ValueSet resources, etc.) and also to provide + * terminology functions such as code validation, ValueSet expansion, etc. + *

+ *

* Implementations are not required to implement all of the functions * in this interface; in fact it is expected that most won't. Any * methods which are not implemented may simply return null - * and calling code is expected to be able to handle this. + * and calling code is expected to be able to handle this. Generally, a + * series of implementations of this interface will be joined together using + * the + * ValidationSupportChain + * class. *

+ *

+ * See Validation Support Modules + * for information on how to assemble and configure implementations of this interface. See also + * the org.hl7.fhir.common.hapi.validation.support + * package summary + * in the hapi-fhir-validation module for many implementations of this interface. + *

+ * + * @since 5.0.0 */ -public interface IContextValidationSupport { +public interface IValidationSupport { + String URL_PREFIX_VALUE_SET = "http://hl7.org/fhir/ValueSet/"; + /** * Expands the given portion of a ValueSet * - * @param theInclude The portion to include - * @return The expansion + * @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 + * 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 null), contains options controlling the expansion + * @param theValueSetToExpand The valueset that should be expanded + * @return The expansion, or null */ - EVS_OUT expandValueSet(FhirContext theContext, EVS_IN theInclude); + default ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, @Nullable ValueSetExpansionOptions theExpansionOptions, @Nonnull IBaseResource theValueSetToExpand) { + return null; + } /** * Load and return all conformance resources associated with this * validation support module. This method may return null if it doesn't * make sense for a given module. */ - List fetchAllConformanceResources(FhirContext theContext); + default List fetchAllConformanceResources() { + return null; + } /** * Load and return all possible structure definitions */ - List fetchAllStructureDefinitions(FhirContext theContext); + default List fetchAllStructureDefinitions() { + return null; + } /** * Fetch a code system by ID @@ -76,70 +108,146 @@ public interface IContextValidationSupport * @param theSystem The code system * @return The valueset (must not be null, but can be an empty ValueSet) */ - CST fetchCodeSystem(FhirContext theContext, String theSystem); + default IBaseResource fetchCodeSystem(String theSystem) { + return null; + } /** * Loads a resource needed by the validation (a StructureDefinition, or a * ValueSet) * - * @param theContext The HAPI FHIR Context object current in use by the validator - * @param theClass The type of the resource to load - * @param theUri The resource URI + * @param theClass The type of the resource to load + * @param theUri The resource URI * @return Returns the resource, or null if no resource with the * given URI can be found */ - T fetchResource(FhirContext theContext, Class theClass, String theUri); + default T fetchResource(Class theClass, String theUri) { + Validate.notNull(theClass, "theClass must not be null or blank"); + Validate.notBlank(theUri, "theUri must not be null or blank"); - SDT fetchStructureDefinition(FhirContext theCtx, String theUrl); + switch (getFhirContext().getResourceDefinition(theClass).getName()) { + case "StructureDefinition": + return theClass.cast(fetchStructureDefinition(theUri)); + case "ValueSet": + return theClass.cast(fetchValueSet(theUri)); + case "CodeSystem": + return theClass.cast(fetchCodeSystem(theUri)); + } + + if (theUri.startsWith(URL_PREFIX_VALUE_SET)) { + return theClass.cast(fetchValueSet(theUri)); + } + + return null; + } + + default IBaseResource fetchStructureDefinition(String theUrl) { + return null; + } /** * Returns true if codes in the given code system can be expanded * or validated * - * @param theSystem The URI for the code system, e.g. "http://loinc.org" + * @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 + * 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. "http://loinc.org" * @return Returns true if codes in the given code system can be * validated */ - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); + default boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + return false; + } /** * Fetch the given ValueSet by URL */ - IBaseResource fetchValueSet(FhirContext theContext, String theValueSetUrl); + default IBaseResource fetchValueSet(String theValueSetUrl) { + return null; + } /** * Validates that the given code exists and if possible returns a display * name. This method is called to check codes which are found in "example" * binding fields (e.g. Observation.code in the default profile. * - * @param theCodeSystem The code system, e.g. "http://loinc.org" - * @param theCode The code, e.g. "1234-5" - * @param theDisplay The display name, if it should also be 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 + * 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. "http://loinc.org" + * @param theCode The code, e.g. "1234-5" + * @param theDisplay The display name, if it should also be validated * @return Returns a validation result object */ - CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl); + default CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + return null; + } /** * Validates that the given code exists and if possible returns a display * name. This method is called to check codes which are found in "example" * binding fields (e.g. Observation.code in the default profile. * - * @param theCodeSystem The code system, e.g. "http://loinc.org" - * @param theCode The code, e.g. "1234-5" - * @param theDisplay The display name, if it should also be validated - * @param theValueSet The ValueSet to validate against. Must not be null, and must be a ValueSet resource. + * @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 + * 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. "http://loinc.org" + * @param theCode The code, e.g. "1234-5" + * @param theDisplay The display name, if it should also be validated + * @param theValueSet The ValueSet to validate against. Must not be null, and must be a ValueSet resource. * @return Returns a validation result object, or null if this validation support module can not handle this kind of request */ - default CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { return null; } + default CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { + return null; + } /** * Look up a code using the system and code value * - * @param theContext The FHIR context - * @param theSystem The CodeSystem URL - * @param theCode The code + * @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 + * 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 */ - LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode); + default LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return null; + } + + /** + * Returns true 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 + * 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) { + 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 + * 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) { + return null; + } + + /** + * Returns the FHIR Context associated with this module + */ + FhirContext getFhirContext(); + + /** + * This method clears any temporary caches within the validation support. It is mainly intended for unit tests, + * but could be used in non-test scenarios as well. + */ + default void invalidateCaches() { + // nothing + } + class ConceptDesignation { private String myLanguage; @@ -257,59 +365,83 @@ public interface IContextValidationSupport } } + enum IssueSeverity { + /** + * The issue caused the action to fail, and no further checking could be performed. + */ + FATAL, + /** + * The issue is sufficiently important to cause the action to fail. + */ + ERROR, + /** + * The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired. + */ + WARNING, + /** + * The issue has no relation to the degree of success of the action. + */ + INFORMATION + } + class CodeValidationResult { - private IBase myDefinition; + private String myCode; private String myMessage; - private Enum mySeverity; + private IssueSeverity mySeverity; private String myCodeSystemName; private String myCodeSystemVersion; private List myProperties; private String myDisplay; - public CodeValidationResult(IBase theDefinition) { - this.myDefinition = theDefinition; - } - - public CodeValidationResult(Enum theSeverity, String message) { - this.mySeverity = theSeverity; - this.myMessage = message; - } - - public CodeValidationResult(Enum theSeverity, String theMessage, IBase theDefinition, String theDisplay) { - this.mySeverity = theSeverity; - this.myMessage = theMessage; - this.myDefinition = theDefinition; - this.myDisplay = theDisplay; + public CodeValidationResult() { + super(); } public String getDisplay() { return myDisplay; } - public IBase asConceptDefinition() { - return myDefinition; + public CodeValidationResult setDisplay(String theDisplay) { + myDisplay = theDisplay; + return this; + } + + public String getCode() { + return myCode; + } + + public CodeValidationResult setCode(String theCode) { + myCode = theCode; + return this; } String getCodeSystemName() { return myCodeSystemName; } - public void setCodeSystemName(String theCodeSystemName) { + public CodeValidationResult setCodeSystemName(String theCodeSystemName) { myCodeSystemName = theCodeSystemName; + return this; } public String getCodeSystemVersion() { return myCodeSystemVersion; } - public void setCodeSystemVersion(String theCodeSystemVersion) { + public CodeValidationResult setCodeSystemVersion(String theCodeSystemVersion) { myCodeSystemVersion = theCodeSystemVersion; + return this; } public String getMessage() { return myMessage; } + public CodeValidationResult setMessage(String theMessage) { + myMessage = theMessage; + return this; + } + public List getProperties() { return myProperties; } @@ -318,12 +450,17 @@ public interface IContextValidationSupport myProperties = theProperties; } - public Enum getSeverity() { + public IssueSeverity getSeverity() { return mySeverity; } + public CodeValidationResult setSeverity(IssueSeverity theSeverity) { + mySeverity = theSeverity; + return this; + } + public boolean isOk() { - return myDefinition != null; + return isNotBlank(myCode); } public LookupCodeResult asLookupCodeResult(String theSearchedForSystem, String theSearchedForCode) { @@ -339,6 +476,49 @@ public interface IContextValidationSupport return retVal; } + /** + * Convenience method that returns {@link #getSeverity()} as an IssueSeverity code string + */ + public String getSeverityCode() { + String retVal = null; + if (getSeverity() != null) { + retVal = getSeverity().name().toLowerCase(); + } + return retVal; + } + + /** + * Sets an issue severity as a string code. Value must be the name of + * one of the enum values in {@link IssueSeverity}. Value is case-insensitive. + */ + public CodeValidationResult setSeverityCode(@Nonnull String theIssueSeverity) { + setSeverity(IssueSeverity.valueOf(theIssueSeverity.toUpperCase())); + return this; + } + } + + class ValueSetExpansionOutcome { + + private final IBaseResource myValueSet; + private final String myError; + + public ValueSetExpansionOutcome(IBaseResource theValueSet, String theError) { + myValueSet = theValueSet; + myError = theError; + } + + public ValueSetExpansionOutcome(IBaseResource theValueSet) { + myValueSet = theValueSet; + myError = null; + } + + public String getError() { + return myError; + } + + public IBaseResource getValueSet() { + return myValueSet; + } } class LookupCodeResult { @@ -350,7 +530,7 @@ public interface IContextValidationSupport private boolean myFound; private String mySearchedForCode; private String mySearchedForSystem; - private List myProperties; + private List myProperties; private List myDesignations; /** @@ -367,7 +547,7 @@ public interface IContextValidationSupport return myProperties; } - public void setProperties(List theProperties) { + public void setProperties(List theProperties) { myProperties = theProperties; } @@ -466,7 +646,7 @@ public interface IContextValidationSupport .collect(Collectors.toSet()); } - for (IContextValidationSupport.BaseConceptProperty next : myProperties) { + for (IValidationSupport.BaseConceptProperty next : myProperties) { if (!properties.isEmpty()) { if (!properties.contains(next.getPropertyName())) { @@ -477,11 +657,11 @@ public interface IContextValidationSupport IBase property = ParametersUtil.addParameterToParameters(theContext, retVal, "property"); ParametersUtil.addPartCode(theContext, property, "code", next.getPropertyName()); - if (next instanceof IContextValidationSupport.StringConceptProperty) { - IContextValidationSupport.StringConceptProperty prop = (IContextValidationSupport.StringConceptProperty) next; + if (next instanceof IValidationSupport.StringConceptProperty) { + IValidationSupport.StringConceptProperty prop = (IValidationSupport.StringConceptProperty) next; ParametersUtil.addPartString(theContext, property, "value", prop.getValue()); - } else if (next instanceof IContextValidationSupport.CodingConceptProperty) { - IContextValidationSupport.CodingConceptProperty prop = (IContextValidationSupport.CodingConceptProperty) next; + } else if (next instanceof IValidationSupport.CodingConceptProperty) { + IValidationSupport.CodingConceptProperty prop = (IValidationSupport.CodingConceptProperty) next; ParametersUtil.addPartCoding(theContext, property, "value", prop.getCodeSystem(), prop.getCode(), prop.getDisplay()); } else { throw new IllegalStateException("Don't know how to handle " + next.getClass()); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ValueSetExpansionOptions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ValueSetExpansionOptions.java new file mode 100644 index 00000000000..c7667cc1fad --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/ValueSetExpansionOptions.java @@ -0,0 +1,96 @@ +package ca.uhn.fhir.context.support; + +/*- + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import org.apache.commons.lang3.Validate; + +/** + * Options for ValueSet expansion + * + * @see IValidationSupport + */ +public class ValueSetExpansionOptions { + + private boolean myFailOnMissingCodeSystem = true; + private int myCount = 1000; + private int myOffset = 0; + + /** + * The number of codes to return. + *

+ * Default is 1000 + *

+ */ + public int getCount() { + return myCount; + } + + /** + * The number of codes to return. + *

+ * Default is 1000 + *

+ */ + public ValueSetExpansionOptions setCount(int theCount) { + Validate.isTrue(theCount >= 0, "theCount must be >= 0"); + myCount = theCount; + return this; + } + + /** + * The code index to start at (i.e the individual code index, not the page number) + */ + public int getOffset() { + return myOffset; + } + + /** + * The code index to start at (i.e the individual code index, not the page number) + */ + public ValueSetExpansionOptions setOffset(int theOffset) { + Validate.isTrue(theOffset >= 0, "theOffset must be >= 0"); + myOffset = theOffset; + return this; + } + + /** + * Should the expansion fail if a codesystem is referenced by the valueset, but + * it can not be found? + *

+ * Default is true + *

+ */ + public boolean isFailOnMissingCodeSystem() { + return myFailOnMissingCodeSystem; + } + + /** + * Should the expansion fail if a codesystem is referenced by the valueset, but + * it can not be found? + *

+ * Default is true + *

+ */ + public ValueSetExpansionOptions setFailOnMissingCodeSystem(boolean theFailOnMissingCodeSystem) { + myFailOnMissingCodeSystem = theFailOnMissingCodeSystem; + return this; + } +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java index 540a21110be..8cd3e96f0a6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.fluentpath; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java index 895ec8602ae..8d225b20c27 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.fluentpath; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/i18n/HapiLocalizer.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/i18n/HapiLocalizer.java index 1eb9a69c8aa..a215eca90e2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/i18n/HapiLocalizer.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/i18n/HapiLocalizer.java @@ -14,7 +14,7 @@ import static org.apache.commons.lang3.StringUtils.*; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ public class HapiLocalizer { private List myBundle = new ArrayList<>(); private final Map myHardcodedMessages = new HashMap<>(); private String[] myBundleNames; + private Locale myLocale = Locale.getDefault(); public HapiLocalizer() { this(HapiLocalizer.class.getPackage().getName() + ".hapi-messages"); @@ -164,7 +165,11 @@ public class HapiLocalizer { } } - /** + public Locale getLocale() { + return myLocale; + } + + /** * This global setting causes the localizer to fail if any attempts * are made to retrieve a key that does not exist. This method is primarily for * unit tests. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Hook.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Hook.java index a7fc24d3757..8a77920728e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Hook.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Hook.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java index 16b496155cf..bdd2f68e21d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java index 16fc057a9bf..78c0d69457c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorBroadcaster.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorBroadcaster.java index 46a6cf5ba5e..4be20851911 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorBroadcaster.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorBroadcaster.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorService.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorService.java index 4797f2ef1c2..04a6d513bbc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorService.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IInterceptorService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Interceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Interceptor.java index 913befcc480..bb0f3c38e42 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Interceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Interceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index a0ce28bb50b..634ccade76e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java index 1651249900e..0c01735b266 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.interceptor.executor; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java index cfec9223855..67b8fe00e12 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java index eec333181a7..ae8c04795ce 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java index ea8f21e734d..b9a1ad372ef 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java index b76c8891d42..451f49b7533 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IBoundCodeableConcept.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IBoundCodeableConcept.java index 0ef57e7b0fe..a0a8ce61d78 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IBoundCodeableConcept.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IBoundCodeableConcept.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeDatatype.java index 8c312517800..98cb24aed81 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeDatatype.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeDatatype.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.ICompositeType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java index a0e0ff5694f..cb970fb89b4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java index cbcd82471bb..706832bf226 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseDatatype; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IElement.java index 1061da20e35..ac28f9123b6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IElement.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBase; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IExtension.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IExtension.java index 17594fa59a4..5e8d73545c7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IExtension.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IExtension.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java index fd09abd31d9..f3e8c02542d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import java.util.Date; import org.hl7.fhir.instance.model.api.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.rest.api.IVersionSpecificBundleFactory; @@ -41,8 +40,6 @@ public interface IFhirVersion { IFluentPath createFluentPathExecutor(FhirContext theFhirContext); - IContextValidationSupport createValidationSupport(); - IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase); Class getContainedType(); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java index db1f3a47c30..c2780d17c14 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IModelJson.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IModelJson.java new file mode 100644 index 00000000000..8211fe1d838 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IModelJson.java @@ -0,0 +1,29 @@ +package ca.uhn.fhir.model.api; + +/*- + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) +public interface IModelJson { +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IPrimitiveDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IPrimitiveDatatype.java index 1136ae1e685..a6aef429182 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IPrimitiveDatatype.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IPrimitiveDatatype.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterAnd.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterAnd.java index a1b85377fbc..a354f175072 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterAnd.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterAnd.java @@ -6,7 +6,7 @@ import java.io.Serializable; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterOr.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterOr.java index 5b8d46d7be1..d9c6c43bb44 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterOr.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterOr.java @@ -6,7 +6,7 @@ import java.io.Serializable; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterType.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterType.java index 78a5c516436..e70df3c6019 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterType.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IQueryParameterType.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.context.FhirContext; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java index 9b541e74875..1d5097aaab2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseMetaType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java index 03a52e50669..66354b6e244 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IStreamingDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IStreamingDatatype.java index 8e2429eb6d1..517c75df461 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IStreamingDatatype.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IStreamingDatatype.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java index adf1c6fa05f..30b823ab7a3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IValueSetEnumBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IValueSetEnumBinder.java index ae48d7d35c9..412741e61ff 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IValueSetEnumBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IValueSetEnumBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java index 4f5d2ad1abb..416fd685e07 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java @@ -11,7 +11,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java index de0fd705212..80d091215e1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java index 36aa527a369..907736dfc14 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java index fa8d1976eae..ebf1ded50bb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TemporalPrecisionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TemporalPrecisionEnum.java index 42e27e2a7ae..1714062b3c1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TemporalPrecisionEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TemporalPrecisionEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Binding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Binding.java index 97c5122138f..4a9b42fd21b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Binding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Binding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Block.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Block.java index ffe9d0cac58..6fd0e2214d1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Block.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Block.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java index 8f087c7de3d..4d39ed07e78 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ChildOrder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ChildOrder.java index 68501ba4884..c0b7a3573d0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ChildOrder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ChildOrder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Compartment.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Compartment.java index 421cf3226a3..a86480c94e5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Compartment.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Compartment.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/DatatypeDef.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/DatatypeDef.java index 0cdf4dc4014..2e2ebb250d7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/DatatypeDef.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/DatatypeDef.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Description.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Description.java index 2c8dbd740ea..49c41610d9f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Description.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Description.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Extension.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Extension.java index cfcd0a949e8..b18ab4e2d31 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Extension.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Extension.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java index 7fc055779cc..9a3ad00e97b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java index 6a411604cd0..331aa321d8d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SimpleSetter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SimpleSetter.java index 0aa275130c8..20a0fcde5d6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SimpleSetter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SimpleSetter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.api.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java index 627615709eb..93d47d98d24 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.composite; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseContainedDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseContainedDt.java index 96dbdff2110..e6e62b524c9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseContainedDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseContainedDt.java @@ -10,7 +10,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseHumanNameDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseHumanNameDt.java index bce6c405b02..37791944948 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseHumanNameDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseHumanNameDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.composite; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseIdentifierDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseIdentifierDt.java index d225a9c2c68..d962534ac4a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseIdentifierDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseIdentifierDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.composite; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseNarrativeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseNarrativeDt.java index 17839f524fb..e9c538c72f2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseNarrativeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseNarrativeDt.java @@ -11,7 +11,7 @@ import ca.uhn.fhir.model.primitive.XhtmlDt; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseQuantityDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseQuantityDt.java index 01415bae41e..4ff46dc9947 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseQuantityDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseQuantityDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.composite; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java index d5c36c6875d..aceb66961e6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.composite; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseConformance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseConformance.java index a09dcdbdeb9..5596011a299 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseConformance.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseConformance.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.resource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseOperationOutcome.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseOperationOutcome.java index fe94db7aa5a..d74c596c524 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseOperationOutcome.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseOperationOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.resource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseSecurityEvent.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseSecurityEvent.java index 6761f13ca19..6081329a765 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseSecurityEvent.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseSecurityEvent.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.resource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/ResourceMetadataMap.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/ResourceMetadataMap.java index c1bda29ed8b..7d0ed1aa89a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/ResourceMetadataMap.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/ResourceMetadataMap.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.base.resource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/Base64BinaryDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/Base64BinaryDt.java index 56c8f573042..2f2448679c7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/Base64BinaryDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/Base64BinaryDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java index 09cac9f6575..50468eb0c55 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BooleanDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BooleanDt.java index 83ca5e39255..327ba8b144a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BooleanDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BooleanDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeDt.java index 8116d49fe0f..4244a384940 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeDt.java @@ -8,7 +8,7 @@ import java.io.ObjectOutput; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java index 76586cc0184..74147855f86 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateDt.java index fae2a42358b..3210d104845 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateDt.java @@ -6,7 +6,7 @@ import java.util.Calendar; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java index f7197199fc2..28e52b2eaf0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java index 89b9efccfd3..419fa4060d8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java index 1e58340c09b..85d62762b63 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java @@ -23,7 +23,7 @@ import static org.apache.commons.lang3.StringUtils.*; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java index e8a60f7f078..ab0e2f75e09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java index b712c0ed658..da22728923b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java index 1bcfe393f65..b85dd728891 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/OidDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/OidDt.java index be40e98c158..9247b68e15b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/OidDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/OidDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java index 77d572c4ce7..fb2b4ae905e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java index 6dd444c601e..d089909b96c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/TimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/TimeDt.java index e7e1438821a..ef6f8130a5c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/TimeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/TimeDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java index 6af13fa7490..d4d47b94851 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UriDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UriDt.java index f22e422889f..56372687492 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UriDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UriDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/XhtmlDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/XhtmlDt.java index e14b0cdd608..e02376a9d10 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/XhtmlDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/XhtmlDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.primitive; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java index 67182ec363c..129d5fc575d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.model.valueset; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java index 4d188e2c339..be8c24199f4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.model.valueset; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java index fb9d5f29703..a68fb61e331 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.model.valueset; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/view/ViewGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/view/ViewGenerator.java index 6459357f1d7..7b086996021 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/view/ViewGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/view/ViewGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.view; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java index 5ccbb890af8..288eeb4088a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java index eb4d81feb91..1b483e804c5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java index 5aa68fe20cc..f08145495b6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java index 1bcdfcf8251..48132c0884b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java index ac305c59d22..f8a4193cf16 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplate.java index 65cab867a13..c91a86664fe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplateManifest.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplateManifest.java index 1e376656287..0ce7a46adaf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplateManifest.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/INarrativeTemplateManifest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplate.java index 29694972420..c6b5e86ae55 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplateManifest.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplateManifest.java index 8a6798e0f04..60c65a9300f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplateManifest.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplateManifest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -155,18 +155,6 @@ public class NarrativeTemplateManifest implements INarrativeTemplateManifest { .map(t -> t.trim()) .filter(t -> isNotBlank(t)) .forEach(t -> nextTemplate.addAppliesToDatatype(t)); - } else if (nextKey.endsWith(".class")) { - String className = file.getProperty(nextKey); - Class clazz; - try { - clazz = (Class) Class.forName(className); - } catch (ClassNotFoundException e) { - ourLog.debug("Unknown datatype class '{}' identified in manifest", name); - clazz = null; - } - if (clazz != null) { - nextTemplate.addAppliesToResourceClass(clazz); - } } else if (nextKey.endsWith(".style")) { String templateTypeName = file.getProperty(nextKey).toUpperCase(); TemplateTypeEnum templateType = TemplateTypeEnum.valueOf(templateTypeName); @@ -183,7 +171,9 @@ public class NarrativeTemplateManifest implements INarrativeTemplateManifest { } else if (nextKey.endsWith(".title")) { ourLog.debug("Ignoring title property as narrative generator no longer generates titles: {}", nextKey); } else { - throw new ConfigurationException("Invalid property name: " + nextKey); + throw new ConfigurationException("Invalid property name: " + nextKey + + " - the key must end in one of the expected extensions " + + "'.profile', '.resourceType', '.dataType', '.style', '.contextPath', '.narrative', '.title'"); } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NullNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NullNarrativeGenerator.java index d889552f97e..d43c3251f2f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NullNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NullNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/TemplateTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/TemplateTypeEnum.java index c1d9e5f1b91..846f01c80c8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/TemplateTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/TemplateTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/ThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/ThymeleafNarrativeGenerator.java index b4743c6d887..d0759ce9c6c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/ThymeleafNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/ThymeleafNarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.narrative2; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java index 4a2a2919ba6..7f2bc3d3a2d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/DataFormatException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/DataFormatException.java index 6ea6a1f4c0e..fef907687d4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/DataFormatException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/DataFormatException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ErrorHandlerAdapter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ErrorHandlerAdapter.java index 2906664cc17..8b5f57a2fce 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ErrorHandlerAdapter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ErrorHandlerAdapter.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IJsonLikeParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IJsonLikeParser.java index 67662112910..441a76a3fa9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IJsonLikeParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IJsonLikeParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParser.java index fa5be1593b9..1529a9815c4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParserErrorHandler.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParserErrorHandler.java index b36df50cb70..a5a5c54589d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParserErrorHandler.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/IParserErrorHandler.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index ebb6ef016b0..10b8609356a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,20 +22,29 @@ package ca.uhn.fhir.parser; import ca.uhn.fhir.context.*; import ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum; -import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.ExtensionDt; +import ca.uhn.fhir.model.api.IPrimitiveDatatype; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.Tag; +import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.base.composite.BaseCodingDt; import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.narrative.INarrativeGenerator; -import ca.uhn.fhir.parser.json.*; +import ca.uhn.fhir.parser.json.JsonLikeArray; +import ca.uhn.fhir.parser.json.JsonLikeObject; +import ca.uhn.fhir.parser.json.JsonLikeStructure; +import ca.uhn.fhir.parser.json.JsonLikeValue; import ca.uhn.fhir.parser.json.JsonLikeValue.ScalarType; import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; +import ca.uhn.fhir.parser.json.JsonLikeWriter; +import ca.uhn.fhir.parser.json.jackson.JacksonStructure; import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.util.ElementUtil; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.text.WordUtils; @@ -45,11 +54,17 @@ import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; import static ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum.ID_DATATYPE; import static ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum.PRIMITIVE_DATATYPE; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; /** * This class is the FHIR JSON parser/encoder. Users should not interact with this class directly, but should use @@ -147,10 +162,9 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { theEventWriter.beginObject(arrayName); } - private JsonLikeWriter createJsonWriter(Writer theWriter) { - JsonLikeStructure jsonStructure = new GsonStructure(); - JsonLikeWriter retVal = jsonStructure.getJsonLikeWriter(theWriter); - return retVal; + private JsonLikeWriter createJsonWriter(Writer theWriter) throws IOException { + JsonLikeStructure jsonStructure = new JacksonStructure(); + return jsonStructure.getJsonLikeWriter(theWriter); } public void doEncodeResourceToJsonLikeWriter(IBaseResource theResource, JsonLikeWriter theEventWriter, EncodeContext theEncodeContext) throws IOException { @@ -168,11 +182,12 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { protected void doEncodeResourceToWriter(IBaseResource theResource, Writer theWriter, EncodeContext theEncodeContext) throws IOException { JsonLikeWriter eventWriter = createJsonWriter(theWriter); doEncodeResourceToJsonLikeWriter(theResource, eventWriter, theEncodeContext); + eventWriter.close(); } @Override public T doParseResource(Class theResourceType, Reader theReader) { - JsonLikeStructure jsonStructure = new GsonStructure(); + JsonLikeStructure jsonStructure = new JacksonStructure(); jsonStructure.load(theReader); T retVal = doParseResource(theResourceType, jsonStructure); @@ -233,13 +248,21 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { } // check for the common case first - String value types - if (value.getValue() instanceof String) { + Object valueObj = value.getValue(); + if (valueObj instanceof String) { if (theChildName != null) { theEventWriter.write(theChildName, valueStr); } else { theEventWriter.write(valueStr); } break; + } else if (valueObj instanceof Long) { + if (theChildName != null) { + theEventWriter.write(theChildName, (long)valueObj); + } else { + theEventWriter.write((long)valueObj); + } + break; } if (value instanceof IBaseIntegerDatatype) { @@ -410,10 +433,10 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { String currentChildName = null; boolean inArray = false; - ArrayList> extensions = new ArrayList>(0); - ArrayList> modifierExtensions = new ArrayList>(0); - ArrayList> comments = new ArrayList>(0); - ArrayList ids = new ArrayList(0); + ArrayList> extensions = new ArrayList<>(0); + ArrayList> modifierExtensions = new ArrayList<>(0); + ArrayList> comments = new ArrayList<>(0); + ArrayList ids = new ArrayList<>(0); int valueIdx = 0; for (IBase nextValue : values) { @@ -487,7 +510,8 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { if (inArray) { theEventWriter.endArray(); } - if (nextChild.getMax() > 1 || nextChild.getMax() == Child.MAX_UNLIMITED) { + BaseRuntimeChildDefinition replacedParentDefinition = nextChild.getReplacedParentDefinition(); + if (isMultipleCardinality(nextChild.getMax()) || (replacedParentDefinition != null && isMultipleCardinality(replacedParentDefinition.getMax()))) { beginArray(theEventWriter, nextChildSpecificName); inArray = true; encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childDef, null, theContainedResource, nextChildElem, force, theEncodeContext); @@ -581,6 +605,10 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { } } + private boolean isMultipleCardinality(int maxCardinality) { + return maxCardinality > 1 || maxCardinality == Child.MAX_UNLIMITED; + } + private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theNextValue, JsonLikeWriter theEventWriter, boolean theContainedResource, CompositeChildElement theParent, EncodeContext theEncodeContext) throws IOException, DataFormatException { writeCommentsPreAndPost(theNextValue, theEventWriter); @@ -1094,7 +1122,8 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { } else { // must be a SCALAR theState.enteringNewElement(null, theName); - theState.attributeValue("value", theJsonVal.getAsString()); + String asString = theJsonVal.getAsString(); + theState.attributeValue("value", asString); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName); theState.endingElement(); } @@ -1363,11 +1392,6 @@ public class JsonParser extends BaseParser implements IJsonLikeParser { } } - public static Gson newGson() { - Gson gson = new GsonBuilder().disableHtmlEscaping().create(); - return gson; - } - private static void write(JsonLikeWriter theWriter, String theName, String theValue) throws IOException { theWriter.write(theName, theValue); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/LenientErrorHandler.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/LenientErrorHandler.java index da086a4fdf5..a43a429508c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/LenientErrorHandler.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/LenientErrorHandler.java @@ -10,7 +10,7 @@ import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParseLocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParseLocation.java index df8fcbecf72..f8451143806 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParseLocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParseLocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index a40266923fc..b5eb3ec6137 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,16 +22,25 @@ package ca.uhn.fhir.parser; import ca.uhn.fhir.context.*; import ca.uhn.fhir.context.BaseRuntimeChildDefinition.IMutator; -import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.ExtensionDt; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IIdentifiableElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.Tag; +import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.ResourceMetadataMap; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.parser.json.JsonLikeValue.ScalarType; import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; -import ca.uhn.fhir.util.*; +import ca.uhn.fhir.util.BundleUtil; +import ca.uhn.fhir.util.FhirTerser; +import ca.uhn.fhir.util.ReflectionUtil; +import ca.uhn.fhir.util.XmlUtil; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.tuple.Pair; @@ -39,9 +48,17 @@ import org.hl7.fhir.instance.model.api.*; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; class ParserState { @@ -54,6 +71,8 @@ class ParserState { private T myObject; private IBase myPreviousElement; private BaseState myState; + private List myGlobalResources = new ArrayList<>(); + private List myGlobalReferences = new ArrayList<>(); private ParserState(IParser theParser, FhirContext theContext, boolean theJsonMode, IParserErrorHandler theErrorHandler) { myParser = theParser; @@ -130,7 +149,6 @@ class ParserState { } } - public void string(String theData) { myState.string(theData); } @@ -145,6 +163,60 @@ class ParserState { } } + public IBase newInstance(RuntimeChildDeclaredExtensionDefinition theDefinition) { + return theDefinition.newInstance(); + } + + public ICompositeType newCompositeInstance(PreResourceState thePreResourceState, BaseRuntimeChildDefinition theChild, BaseRuntimeElementCompositeDefinition theCompositeTarget) { + ICompositeType retVal = (ICompositeType) theCompositeTarget.newInstance(theChild.getInstanceConstructorArguments()); + if (retVal instanceof IBaseReference) { + IBaseReference ref = (IBaseReference) retVal; + myGlobalReferences.add(ref); + thePreResourceState.getLocalReferences().add(ref); + } + return retVal; + } + + public ICompositeType newCompositeTypeInstance(PreResourceState thePreResourceState, BaseRuntimeElementCompositeDefinition theCompositeTarget) { + ICompositeType retVal = (ICompositeType) theCompositeTarget.newInstance(); + if (retVal instanceof IBaseReference) { + IBaseReference ref = (IBaseReference) retVal; + myGlobalReferences.add(ref); + thePreResourceState.getLocalReferences().add(ref); + } + return retVal; + } + + public IPrimitiveType newPrimitiveInstance(RuntimeChildDeclaredExtensionDefinition theDefinition, RuntimePrimitiveDatatypeDefinition thePrimitiveTarget) { + return thePrimitiveTarget.newInstance(theDefinition.getInstanceConstructorArguments()); + } + + public IPrimitiveType getPrimitiveInstance(BaseRuntimeChildDefinition theChild, RuntimePrimitiveDatatypeDefinition thePrimitiveTarget) { + return thePrimitiveTarget.newInstance(theChild.getInstanceConstructorArguments()); + } + + public IBaseXhtml newInstance(RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition theXhtmlTarget) { + return theXhtmlTarget.newInstance(); + } + + public XhtmlDt newInstance(RuntimePrimitiveDatatypeNarrativeDefinition theXhtmlTarget) { + return theXhtmlTarget.newInstance(); + } + + public IPrimitiveType newInstance(RuntimePrimitiveDatatypeDefinition thePrimitiveTarget) { + return thePrimitiveTarget.newInstance(); + } + + public IBaseResource newInstance(RuntimeResourceDefinition theDef) { + IBaseResource retVal = theDef.newInstance(); + myGlobalResources.add(retVal); + return retVal; + } + + public IBase newInstance(RuntimeResourceBlockDefinition theBlockTarget) { + return theBlockTarget.newInstance(); + } + private abstract class BaseState { private PreResourceState myPreResourceState; @@ -256,7 +328,7 @@ class ParserState { private class ContainedResourcesStateHapi extends PreResourceState { public ContainedResourcesStateHapi(PreResourceState thePreResourcesState) { - super(thePreResourcesState, ((IResource) thePreResourcesState.myInstance).getStructureFhirVersionEnum()); + super(thePreResourcesState, thePreResourcesState.myInstance.getStructureFhirVersionEnum()); } @Override @@ -290,7 +362,6 @@ class ParserState { @SuppressWarnings("unchecked") List containedResources = (List) preResCurrentElement.getContained().getContainedResources(); containedResources.add(res); - } } @@ -374,7 +445,7 @@ class ParserState { switch (target.getChildType()) { case COMPOSITE_DATATYPE: { BaseRuntimeElementCompositeDefinition compositeTarget = (BaseRuntimeElementCompositeDefinition) target; - ICompositeType newChildInstance = (ICompositeType) compositeTarget.newInstance(myDefinition.getInstanceConstructorArguments()); + ICompositeType newChildInstance = newCompositeInstance(getPreResourceState(), myDefinition, compositeTarget); myDefinition.getMutator().addValue(myParentInstance, newChildInstance); ElementCompositeState newState = new ElementCompositeState(myPreResourceState, theLocalPart, compositeTarget, newChildInstance); push(newState); @@ -383,7 +454,7 @@ class ParserState { case ID_DATATYPE: case PRIMITIVE_DATATYPE: { RuntimePrimitiveDatatypeDefinition primitiveTarget = (RuntimePrimitiveDatatypeDefinition) target; - IPrimitiveType newChildInstance = primitiveTarget.newInstance(myDefinition.getInstanceConstructorArguments()); + IPrimitiveType newChildInstance = newPrimitiveInstance(myDefinition, primitiveTarget); myDefinition.getMutator().addValue(myParentInstance, newChildInstance); PrimitiveState newState = new PrimitiveState(getPreResourceState(), newChildInstance); push(newState); @@ -404,7 +475,7 @@ class ParserState { RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getChildExtensionForUrl(theUrlAttr); if (declaredExtension != null) { if (myChildInstance == null) { - myChildInstance = myDefinition.newInstance(); + myChildInstance = newInstance(myDefinition); myDefinition.getMutator().addValue(myParentInstance, myChildInstance); } BaseState newState = new DeclaredExtensionState(getPreResourceState(), declaredExtension, myChildInstance); @@ -414,6 +485,7 @@ class ParserState { } } + @Override protected IBase getCurrentElement() { return myParentInstance; @@ -501,7 +573,7 @@ class ParserState { switch (target.getChildType()) { case COMPOSITE_DATATYPE: { BaseRuntimeElementCompositeDefinition compositeTarget = (BaseRuntimeElementCompositeDefinition) target; - ICompositeType newChildInstance = (ICompositeType) compositeTarget.newInstance(child.getInstanceConstructorArguments()); + ICompositeType newChildInstance = newCompositeInstance(getPreResourceState(), child, compositeTarget); child.getMutator().addValue(myInstance, newChildInstance); ParserState.ElementCompositeState newState = new ElementCompositeState(getPreResourceState(), theChildName, compositeTarget, newChildInstance); push(newState); @@ -511,7 +583,7 @@ class ParserState { case PRIMITIVE_DATATYPE: { RuntimePrimitiveDatatypeDefinition primitiveTarget = (RuntimePrimitiveDatatypeDefinition) target; IPrimitiveType newChildInstance; - newChildInstance = primitiveTarget.newInstance(child.getInstanceConstructorArguments()); + newChildInstance = getPrimitiveInstance(child, primitiveTarget); child.getMutator().addValue(myInstance, newChildInstance); PrimitiveState newState = new PrimitiveState(getPreResourceState(), newChildInstance); push(newState); @@ -519,7 +591,7 @@ class ParserState { } case RESOURCE_BLOCK: { RuntimeResourceBlockDefinition blockTarget = (RuntimeResourceBlockDefinition) target; - IBase newBlockInstance = blockTarget.newInstance(); + IBase newBlockInstance = newInstance(blockTarget); child.getMutator().addValue(myInstance, newBlockInstance); ElementCompositeState newState = new ElementCompositeState(getPreResourceState(), theChildName, blockTarget, newBlockInstance); push(newState); @@ -527,7 +599,7 @@ class ParserState { } case PRIMITIVE_XHTML: { RuntimePrimitiveDatatypeNarrativeDefinition xhtmlTarget = (RuntimePrimitiveDatatypeNarrativeDefinition) target; - XhtmlDt newDt = xhtmlTarget.newInstance(); + XhtmlDt newDt = newInstance(xhtmlTarget); child.getMutator().addValue(myInstance, newDt); XhtmlState state = new XhtmlState(getPreResourceState(), newDt, true); push(state); @@ -535,7 +607,7 @@ class ParserState { } case PRIMITIVE_XHTML_HL7ORG: { RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition xhtmlTarget = (RuntimePrimitiveDatatypeXhtmlHl7OrgDefinition) target; - IBaseXhtml newDt = xhtmlTarget.newInstance(); + IBaseXhtml newDt = newInstance(xhtmlTarget); child.getMutator().addValue(myInstance, newDt); XhtmlStateHl7Org state = new XhtmlStateHl7Org(getPreResourceState(), newDt); push(state); @@ -669,7 +741,7 @@ class ParserState { switch (target.getChildType()) { case COMPOSITE_DATATYPE: { BaseRuntimeElementCompositeDefinition compositeTarget = (BaseRuntimeElementCompositeDefinition) target; - ICompositeType newChildInstance = (ICompositeType) compositeTarget.newInstance(); + ICompositeType newChildInstance = newCompositeTypeInstance(getPreResourceState(), compositeTarget); myExtension.setValue(newChildInstance); ElementCompositeState newState = new ElementCompositeState(getPreResourceState(), theLocalPart, compositeTarget, newChildInstance); push(newState); @@ -678,7 +750,7 @@ class ParserState { case ID_DATATYPE: case PRIMITIVE_DATATYPE: { RuntimePrimitiveDatatypeDefinition primitiveTarget = (RuntimePrimitiveDatatypeDefinition) target; - IPrimitiveType newChildInstance = primitiveTarget.newInstance(); + IPrimitiveType newChildInstance = newInstance(primitiveTarget); myExtension.setValue(newChildInstance); PrimitiveState newState = new PrimitiveState(getPreResourceState(), newChildInstance); push(newState); @@ -847,10 +919,10 @@ class ParserState { private abstract class PreResourceState extends BaseState { private Map myContainedResources; + private List myLocalReferences = new ArrayList<>(); private IBaseResource myInstance; private FhirVersionEnum myParentVersion; private Class myResourceType; - PreResourceState(Class theResourceType) { super(null); myResourceType = theResourceType; @@ -869,6 +941,10 @@ class ParserState { myContainedResources = thePreResourcesState.getContainedResources(); } + public List getLocalReferences() { + return myLocalReferences; + } + @Override public void endingElement() throws DataFormatException { stitchBundleCrossReferences(); @@ -905,10 +981,10 @@ class ParserState { if (!definition.getName().equals(theLocalPart) && definition.getName().equalsIgnoreCase(theLocalPart)) { throw new DataFormatException("Unknown resource type '" + theLocalPart + "': Resource names are case sensitive, found similar name: '" + definition.getName() + "'"); } - myInstance = def.newInstance(); + myInstance = newInstance(def); if (myInstance instanceof IResource) { - push(new ResourceStateHapi(getRootPreResourceState(), def, (IResource) myInstance)); + push(new ResourceStateHapi(getRootPreResourceState(), def, (IResource) myInstance, myContainedResources)); } else { push(new ResourceStateHl7Org(getRootPreResourceState(), def, myInstance)); } @@ -996,8 +1072,7 @@ class ParserState { /* * Stitch together resource references */ - List resources = t.getAllPopulatedChildElementsOfType(myInstance, IBaseResource.class); - for (IBaseResource next : resources) { + for (IBaseResource next : myGlobalResources) { IIdType id = next.getIdElement(); if (id != null && id.isEmpty() == false) { String resName = myContext.getResourceDefinition(next).getName(); @@ -1006,15 +1081,12 @@ class ParserState { } } - for (IBaseResource next : resources) { - List refs = myContext.newTerser().getAllPopulatedChildElementsOfType(next, IBaseReference.class); - for (IBaseReference nextRef : refs) { - if (nextRef.isEmpty() == false && nextRef.getReferenceElement() != null) { - IIdType unqualifiedVersionless = nextRef.getReferenceElement().toUnqualifiedVersionless(); - IBaseResource target = idToResource.get(unqualifiedVersionless.getValueAsString()); - if (target != null) { - nextRef.setResource(target); - } + for (IBaseReference nextRef : myGlobalReferences) { + if (nextRef.isEmpty() == false && nextRef.getReferenceElement() != null) { + IIdType unqualifiedVersionless = nextRef.getReferenceElement().toUnqualifiedVersionless(); + IBaseResource target = idToResource.get(unqualifiedVersionless.getValueAsString()); + if (target != null) { + nextRef.setResource(target); } } } @@ -1035,43 +1107,21 @@ class ParserState { } void weaveContainedResources() { - FhirTerser terser = myContext.newTerser(); - terser.visit(myInstance, new IModelVisitor() { - - @Override - public void acceptElement(IBaseResource theResource, IBase theElement, List thePathToElement, BaseRuntimeChildDefinition theChildDefinition, - BaseRuntimeElementDefinition theDefinition) { - if (theElement instanceof BaseResourceReferenceDt) { - BaseResourceReferenceDt nextRef = (BaseResourceReferenceDt) theElement; - String ref = nextRef.getReference().getValue(); - if (isNotBlank(ref)) { - if (ref.startsWith("#")) { - IResource target = (IResource) myContainedResources.get(ref); - if (target != null) { - ourLog.debug("Resource contains local ref {} in field {}", ref, thePathToElement); - nextRef.setResource(target); - } else { - myErrorHandler.unknownReference(null, ref); - } - } - } - } else if (theElement instanceof IBaseReference) { - IBaseReference nextRef = (IBaseReference) theElement; - String ref = nextRef.getReferenceElement().getValue(); - if (isNotBlank(ref)) { - if (ref.startsWith("#")) { - IBaseResource target = myContainedResources.get(ref); - if (target != null) { - ourLog.debug("Resource contains local ref {} in field {}", ref, thePathToElement); - nextRef.setResource(target); - } else { - myErrorHandler.unknownReference(null, ref); - } - } + for (IBaseReference nextRef : myLocalReferences) { + String ref = nextRef.getReferenceElement().getValue(); + if (isNotBlank(ref)) { + if (ref.startsWith("#")) { + IBaseResource target = myContainedResources.get(ref); + if (target != null) { + ourLog.debug("Resource contains local ref {}", ref); + nextRef.setResource(target); + } else { + myErrorHandler.unknownReference(null, ref); } } } - }); + } + } @Override @@ -1284,7 +1334,7 @@ class ParserState { private IResource myInstance; - public ResourceStateHapi(PreResourceState thePreResourceState, BaseRuntimeElementCompositeDefinition theDef, IResource theInstance) { + public ResourceStateHapi(PreResourceState thePreResourceState, BaseRuntimeElementCompositeDefinition theDef, IResource theInstance, Map theContainedResources) { super(thePreResourceState, theDef.getName(), theDef, theInstance); myInstance = theInstance; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/RDFParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/RDFParser.java index cd344287887..551fc818583 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/RDFParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/RDFParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/StrictErrorHandler.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/StrictErrorHandler.java index 295fd3d98ed..433b3f0cbf5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/StrictErrorHandler.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/StrictErrorHandler.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index f224dd1bb6d..2ed7221cc16 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -181,9 +181,6 @@ public class XmlParser extends BaseParser { heldComments.clear(); } parserState.endingElement(); -// if (parserState.isComplete()) { -// return parserState.getObject(); -// } break; } case XMLStreamConstants.CHARACTERS: { @@ -707,6 +704,12 @@ public class XmlParser extends BaseParser { theEventWriter.writeStartElement(prefix, se.getName().getLocalPart(), namespaceURI); theEventWriter.writeNamespace(prefix, namespaceURI); } +// for (Iterator iter= se.getAttributes(); iter.hasNext(); ) { +// Attribute next = iter.next(); +// if ("lang".equals(next.getName().getLocalPart())) { +// theEventWriter.writeAttribute("", "", next.getName().getLocalPart(), next.getValue()); +// } +// } firstElement = false; } else { if (isBlank(se.getName().getPrefix())) { @@ -723,10 +726,10 @@ public class XmlParser extends BaseParser { } else { theEventWriter.writeStartElement(se.getName().getPrefix(), se.getName().getLocalPart(), se.getName().getNamespaceURI()); } - for (Iterator attrIter = se.getAttributes(); attrIter.hasNext(); ) { - Attribute next = (Attribute) attrIter.next(); - theEventWriter.writeAttribute(next.getName().getLocalPart(), next.getValue()); - } + } + for (Iterator attrIter = se.getAttributes(); attrIter.hasNext(); ) { + Attribute next = (Attribute) attrIter.next(); + theEventWriter.writeAttribute(next.getName().getLocalPart(), next.getValue()); } break; case XMLStreamConstants.DTD: diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonStructure.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonStructure.java deleted file mode 100644 index a439becc441..00000000000 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonStructure.java +++ /dev/null @@ -1,379 +0,0 @@ -package ca.uhn.fhir.parser.json; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.io.PushbackReader; -import java.io.Reader; -import java.io.Writer; -import java.util.AbstractSet; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import ca.uhn.fhir.parser.DataFormatException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSyntaxException; - -public class GsonStructure implements JsonLikeStructure { - - private enum ROOT_TYPE {OBJECT, ARRAY}; - private ROOT_TYPE rootType = null; - private JsonElement nativeRoot = null; - private JsonLikeValue jsonLikeRoot = null; - private GsonWriter jsonLikeWriter = null; - - public GsonStructure() { - super(); - } - - public void setNativeObject (JsonObject json) { - this.rootType = ROOT_TYPE.OBJECT; - this.nativeRoot = json; - } - public void setNativeArray (JsonArray json) { - this.rootType = ROOT_TYPE.ARRAY; - this.nativeRoot = json; - } - - @Override - public JsonLikeStructure getInstance() { - return new GsonStructure(); - } - - @Override - public void load(Reader theReader) throws DataFormatException { - this.load(theReader, false); - } - - @Override - public void load(Reader theReader, boolean allowArray) throws DataFormatException { - PushbackReader pbr = new PushbackReader(theReader); - int nextInt; - try { - while(true) { - nextInt = pbr.read(); - if (nextInt == -1) { - throw new DataFormatException("Did not find any content to parse"); - } - if (nextInt == '{') { - pbr.unread(nextInt); - break; - } - if (Character.isWhitespace(nextInt)) { - continue; - } - if (allowArray) { - if (nextInt == '[') { - pbr.unread(nextInt); - break; - } - throw new DataFormatException("Content does not appear to be FHIR JSON, first non-whitespace character was: '" + (char)nextInt + "' (must be '{' or '[')"); - } - throw new DataFormatException("Content does not appear to be FHIR JSON, first non-whitespace character was: '" + (char)nextInt + "' (must be '{')"); - } - - Gson gson = new GsonBuilder().disableHtmlEscaping().create(); - if (nextInt == '{') { - JsonObject root = gson.fromJson(pbr, JsonObject.class); - setNativeObject(root); - } else if (nextInt == '[') { - JsonArray root = gson.fromJson(pbr, JsonArray.class); - setNativeArray(root); - } - } catch (JsonSyntaxException e) { - if (e.getMessage().startsWith("Unexpected char 39")) { - throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage() + " - This may indicate that single quotes are being used as JSON escapes where double quotes are required", e); - } - throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage(), e); - } catch (Exception e) { - throw new DataFormatException("Failed to parse JSON content, error was: " + e.getMessage(), e); - } - } - - @Override - public JsonLikeWriter getJsonLikeWriter (Writer writer) { - if (null == jsonLikeWriter) { - jsonLikeWriter = new GsonWriter(writer); - } - return jsonLikeWriter; - } - - @Override - public JsonLikeWriter getJsonLikeWriter () { - if (null == jsonLikeWriter) { - jsonLikeWriter = new GsonWriter(); - } - return jsonLikeWriter; - } - - @Override - public JsonLikeObject getRootObject() throws DataFormatException { - if (rootType == ROOT_TYPE.OBJECT) { - if (null == jsonLikeRoot) { - jsonLikeRoot = new GsonJsonObject((JsonObject)nativeRoot); - } - return jsonLikeRoot.getAsObject(); - } - throw new DataFormatException("Content must be a valid JSON Object. It must start with '{'."); - } - - @Override - public JsonLikeArray getRootArray() throws DataFormatException { - if (rootType == ROOT_TYPE.ARRAY) { - if (null == jsonLikeRoot) { - jsonLikeRoot = new GsonJsonArray((JsonArray)nativeRoot); - } - return jsonLikeRoot.getAsArray(); - } - throw new DataFormatException("Content must be a valid JSON Array. It must start with '['."); - } - - private static class GsonJsonObject extends JsonLikeObject { - private JsonObject nativeObject; - private Set keySet = null; - private Map jsonLikeMap = new LinkedHashMap(); - - public GsonJsonObject (JsonObject json) { - this.nativeObject = json; - } - - @Override - public Object getValue() { - return null; - } - - @Override - public Set keySet() { - if (null == keySet) { - Set> entrySet = nativeObject.entrySet(); - keySet = new EntryOrderedSet(entrySet.size()); - for (Entry entry : entrySet) { - keySet.add(entry.getKey()); - } - } - return keySet; - } - - @Override - public JsonLikeValue get(String key) { - JsonLikeValue result = null; - if (jsonLikeMap.containsKey(key)) { - result = jsonLikeMap.get(key); - } else { - JsonElement child = nativeObject.get(key); - if (child != null) { - result = new GsonJsonValue(child); - } - jsonLikeMap.put(key, result); - } - return result; - } - } - - private static class GsonJsonArray extends JsonLikeArray { - private JsonArray nativeArray; - private Map jsonLikeMap = new LinkedHashMap(); - - public GsonJsonArray (JsonArray json) { - this.nativeArray = json; - } - - @Override - public Object getValue() { - return null; - } - - @Override - public int size() { - return nativeArray.size(); - } - - @Override - public JsonLikeValue get(int index) { - Integer key = Integer.valueOf(index); - JsonLikeValue result = null; - if (jsonLikeMap.containsKey(key)) { - result = jsonLikeMap.get(key); - } else { - JsonElement child = nativeArray.get(index); - if (child != null) { - result = new GsonJsonValue(child); - } - jsonLikeMap.put(key, result); - } - return result; - } - } - - private static class GsonJsonValue extends JsonLikeValue { - private JsonElement nativeValue; - private JsonLikeObject jsonLikeObject = null; - private JsonLikeArray jsonLikeArray = null; - - public GsonJsonValue (JsonElement json) { - this.nativeValue = json; - } - - @Override - public Object getValue() { - if (nativeValue != null && nativeValue.isJsonPrimitive()) { - if (((JsonPrimitive)nativeValue).isNumber()) { - return nativeValue.getAsNumber(); - } - if (((JsonPrimitive)nativeValue).isBoolean()) { - return Boolean.valueOf(nativeValue.getAsBoolean()); - } - return nativeValue.getAsString(); - } - return null; - } - - @Override - public ValueType getJsonType() { - if (null == nativeValue || nativeValue.isJsonNull()) { - return ValueType.NULL; - } - if (nativeValue.isJsonObject()) { - return ValueType.OBJECT; - } - if (nativeValue.isJsonArray()) { - return ValueType.ARRAY; - } - if (nativeValue.isJsonPrimitive()) { - return ValueType.SCALAR; - } - return null; - } - - @Override - public ScalarType getDataType() { - if (nativeValue != null && nativeValue.isJsonPrimitive()) { - if (((JsonPrimitive)nativeValue).isNumber()) { - return ScalarType.NUMBER; - } - if (((JsonPrimitive)nativeValue).isString()) { - return ScalarType.STRING; - } - if (((JsonPrimitive)nativeValue).isBoolean()) { - return ScalarType.BOOLEAN; - } - } - return null; - } - - @Override - public JsonLikeArray getAsArray() { - if (nativeValue != null && nativeValue.isJsonArray()) { - if (null == jsonLikeArray) { - jsonLikeArray = new GsonJsonArray((JsonArray)nativeValue); - } - } - return jsonLikeArray; - } - - @Override - public JsonLikeObject getAsObject() { - if (nativeValue != null && nativeValue.isJsonObject()) { - if (null == jsonLikeObject) { - jsonLikeObject = new GsonJsonObject((JsonObject)nativeValue); - } - } - return jsonLikeObject; - } - - @Override - public Number getAsNumber() { - return nativeValue != null ? nativeValue.getAsNumber() : null; - } - - @Override - public String getAsString() { - return nativeValue != null ? nativeValue.getAsString() : null; - } - - @Override - public boolean getAsBoolean() { - if (nativeValue != null && nativeValue.isJsonPrimitive() && ((JsonPrimitive)nativeValue).isBoolean()) { - return nativeValue.getAsBoolean(); - } - return super.getAsBoolean(); - } - } - - private static class EntryOrderedSet extends AbstractSet { - private transient ArrayList data = null; - - public EntryOrderedSet (int initialCapacity) { - data = new ArrayList(initialCapacity); - } - @SuppressWarnings("unused") - public EntryOrderedSet () { - data = new ArrayList(); - } - - @Override - public int size() { - return data.size(); - } - - @Override - public boolean contains(Object o) { - return data.contains(o); - } - - @SuppressWarnings("unused") // not really.. just not here - public T get(int index) { - return data.get(index); - } - - @Override - public boolean add(T element) { - if (data.contains(element)) { - return false; - } - return data.add(element); - } - - @Override - public boolean remove(Object o) { - return data.remove(o); - } - - @Override - public void clear() { - data.clear(); - } - - @Override - public Iterator iterator() { - return data.iterator(); - } - - } -} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonWriter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonWriter.java deleted file mode 100644 index 0f884875e8b..00000000000 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/GsonWriter.java +++ /dev/null @@ -1,263 +0,0 @@ -package ca.uhn.fhir.parser.json; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.io.IOException; -import java.io.Writer; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Stack; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.gson.stream.JsonWriter; - -public class GsonWriter extends JsonLikeWriter { - private static final Logger log = LoggerFactory.getLogger(GsonWriter.class); - - private JsonWriter eventWriter; - private enum BlockType { - NONE, OBJECT, ARRAY - } - private BlockType blockType = BlockType.NONE; - private Stack blockStack = new Stack(); - - public GsonWriter () { - super(); - } - public GsonWriter (Writer writer) { - setWriter(writer); - } - - @Override - public JsonLikeWriter init() throws IOException { - eventWriter = new JsonWriter(getWriter()); - eventWriter.setSerializeNulls(true); - if (isPrettyPrint()) { - eventWriter.setIndent(" "); - } - blockType = BlockType.NONE; - blockStack.clear(); - return this; - } - - @Override - public JsonLikeWriter flush() throws IOException { - if (blockType != BlockType.NONE) { - log.error("JsonLikeStreamWriter.flush() called but JSON document is not finished"); - } - eventWriter.flush(); - getWriter().flush(); - return this; - } - - @Override - public void close() throws IOException { - eventWriter.close(); - getWriter().close(); - } - - @Override - public JsonLikeWriter beginObject() throws IOException { - blockStack.push(blockType); - blockType = BlockType.OBJECT; - eventWriter.beginObject(); - return this; - } - - @Override - public JsonLikeWriter beginArray() throws IOException { - blockStack.push(blockType); - blockType = BlockType.ARRAY; - eventWriter.beginArray(); - return this; - } - - @Override - public JsonLikeWriter beginObject(String name) throws IOException { - blockStack.push(blockType); - blockType = BlockType.OBJECT; - eventWriter.name(name); - eventWriter.beginObject(); - return this; - } - - @Override - public JsonLikeWriter beginArray(String name) throws IOException { - blockStack.push(blockType); - blockType = BlockType.ARRAY; - eventWriter.name(name); - eventWriter.beginArray(); - return this; - } - - @Override - public JsonLikeWriter write(String value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(BigInteger value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(BigDecimal value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(long value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(double value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(Boolean value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(boolean value) throws IOException { - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter writeNull() throws IOException { - eventWriter.nullValue(); - return this; - } - - @Override - public JsonLikeWriter write(String name, String value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(String name, BigInteger value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - @Override - public JsonLikeWriter write(String name, BigDecimal value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(String name, long value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(String name, double value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(String name, Boolean value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter write(String name, boolean value) throws IOException { - eventWriter.name(name); - eventWriter.value(value); - return this; - } - - @Override - public JsonLikeWriter writeNull(String name) throws IOException { - eventWriter.name(name); - eventWriter.nullValue(); - return this; - } - - @Override - public JsonLikeWriter endObject() throws IOException { - if (blockType == BlockType.NONE) { - log.error("JsonLikeStreamWriter.endObject(); called with no active JSON document"); - } else { - if (blockType != BlockType.OBJECT) { - log.error("JsonLikeStreamWriter.endObject(); called outside a JSON object. (Use endArray() instead?)"); - eventWriter.endArray(); - } else { - eventWriter.endObject(); - } - blockType = blockStack.pop(); - } - return this; - } - - @Override - public JsonLikeWriter endArray() throws IOException { - if (blockType == BlockType.NONE) { - log.error("JsonLikeStreamWriter.endArray(); called with no active JSON document"); - } else { - if (blockType != BlockType.ARRAY) { - log.error("JsonLikeStreamWriter.endArray(); called outside a JSON array. (Use endObject() instead?)"); - eventWriter.endObject(); - } else { - eventWriter.endArray(); - } - blockType = blockStack.pop(); - } - return this; - } - - @Override - public JsonLikeWriter endBlock() throws IOException { - if (blockType == BlockType.NONE) { - log.error("JsonLikeStreamWriter.endBlock(); called with no active JSON document"); - } else { - if (blockType == BlockType.ARRAY) { - eventWriter.endArray(); - } else { - eventWriter.endObject(); - } - blockType = blockStack.pop(); - } - return this; - } - -} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeArray.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeArray.java index 0c16328a62c..4eee86557a8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeArray.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeArray.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.parser.json; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeObject.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeObject.java index 052201c3fce..fd3d3bea64b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeObject.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeObject.java @@ -6,7 +6,7 @@ import java.util.Set; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,20 +53,4 @@ public abstract class JsonLikeObject extends JsonLikeValue { public abstract JsonLikeValue get (String key); - public String getString (String key) { - JsonLikeValue value = this.get(key); - if (null == value) { - throw new NullPointerException("Json object missing element named \""+key+"\""); - } - return value.getAsString(); - } - - public String getString (String key, String defaultValue) { - String result = defaultValue; - JsonLikeValue value = this.get(key); - if (value != null) { - result = value.getAsString(); - } - return result; - } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeStructure.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeStructure.java index 7d496744819..a171d0c75bb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeStructure.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeStructure.java @@ -2,7 +2,7 @@ * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,34 +19,38 @@ */ package ca.uhn.fhir.parser.json; +import ca.uhn.fhir.parser.DataFormatException; + +import java.io.IOException; import java.io.Reader; import java.io.Writer; -import ca.uhn.fhir.parser.DataFormatException; - /** - * This interface is the generic representation of any sort of data + * This interface is the generic representation of any sort of data * structure that looks and smells like JSON. These data structures * can be abstractly viewed as a or List * whose members are other Maps, Lists, or scalars (Strings, Numbers, Boolean) - * + * * @author Bill.Denton */ public interface JsonLikeStructure { - public JsonLikeStructure getInstance(); - + JsonLikeStructure getInstance(); + /** * Parse the JSON document into the Json-like structure * so that it can be navigated. - * + * * @param theReader a Reader that will - * process the JSON input stream + * process the JSON input stream * @throws DataFormatException when invalid JSON is received */ - public void load (Reader theReader) throws DataFormatException; - public void load (Reader theReader, boolean allowArray) throws DataFormatException; - public JsonLikeObject getRootObject () throws DataFormatException; - public JsonLikeArray getRootArray () throws DataFormatException; - public JsonLikeWriter getJsonLikeWriter (); - public JsonLikeWriter getJsonLikeWriter (Writer writer); + void load(Reader theReader) throws DataFormatException; + + void load(Reader theReader, boolean allowArray) throws DataFormatException; + + JsonLikeObject getRootObject() throws DataFormatException; + + JsonLikeWriter getJsonLikeWriter(); + + JsonLikeWriter getJsonLikeWriter(Writer writer) throws IOException; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeValue.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeValue.java index 1ebcc0da3a5..cea17a8d7ba 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeValue.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeValue.java @@ -2,7 +2,7 @@ * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeWriter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeWriter.java index 692ace2dc4c..9e4f8576746 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeWriter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/JsonLikeWriter.java @@ -9,7 +9,7 @@ import java.math.BigInteger; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,55 +29,73 @@ public abstract class JsonLikeWriter { private boolean prettyPrint; private Writer writer; - - public void setPrettyPrint (boolean tf) { - prettyPrint = tf; - } - public boolean isPrettyPrint () { - return prettyPrint; - } - - public void setWriter (Writer writer) { - this.writer = writer; - } - public Writer getWriter () { - return writer; - } - - public abstract JsonLikeWriter init () throws IOException; - public abstract JsonLikeWriter flush () throws IOException; - public abstract void close () throws IOException; - - public abstract JsonLikeWriter beginObject () throws IOException; - public abstract JsonLikeWriter beginArray () throws IOException; - public abstract JsonLikeWriter beginObject (String name) throws IOException; - public abstract JsonLikeWriter beginArray (String name) throws IOException; - - public abstract JsonLikeWriter write (String value) throws IOException; - public abstract JsonLikeWriter write (BigInteger value) throws IOException; - public abstract JsonLikeWriter write (BigDecimal value) throws IOException; - public abstract JsonLikeWriter write (long value) throws IOException; - public abstract JsonLikeWriter write (double value) throws IOException; - public abstract JsonLikeWriter write (Boolean value) throws IOException; - public abstract JsonLikeWriter write (boolean value) throws IOException; - public abstract JsonLikeWriter writeNull () throws IOException; - - public abstract JsonLikeWriter write (String name, String value) throws IOException; - public abstract JsonLikeWriter write (String name, BigInteger value) throws IOException; - public abstract JsonLikeWriter write (String name, BigDecimal value) throws IOException; - public abstract JsonLikeWriter write (String name, long value) throws IOException; - public abstract JsonLikeWriter write (String name, double value) throws IOException; - public abstract JsonLikeWriter write (String name, Boolean value) throws IOException; - public abstract JsonLikeWriter write (String name, boolean value) throws IOException; - public abstract JsonLikeWriter writeNull (String name) throws IOException; - - public abstract JsonLikeWriter endObject () throws IOException; - public abstract JsonLikeWriter endArray () throws IOException; - public abstract JsonLikeWriter endBlock () throws IOException; - public JsonLikeWriter() { super(); } + public boolean isPrettyPrint() { + return prettyPrint; + } + + public void setPrettyPrint(boolean tf) { + prettyPrint = tf; + } + + public Writer getWriter() { + return writer; + } + + public void setWriter(Writer writer) { + this.writer = writer; + } + + public abstract JsonLikeWriter init() throws IOException; + + public abstract JsonLikeWriter flush() throws IOException; + + public abstract void close() throws IOException; + + public abstract JsonLikeWriter beginObject() throws IOException; + + public abstract JsonLikeWriter beginObject(String name) throws IOException; + + public abstract JsonLikeWriter beginArray(String name) throws IOException; + + public abstract JsonLikeWriter write(String value) throws IOException; + + public abstract JsonLikeWriter write(BigInteger value) throws IOException; + + public abstract JsonLikeWriter write(BigDecimal value) throws IOException; + + public abstract JsonLikeWriter write(long value) throws IOException; + + public abstract JsonLikeWriter write(double value) throws IOException; + + public abstract JsonLikeWriter write(Boolean value) throws IOException; + + public abstract JsonLikeWriter write(boolean value) throws IOException; + + public abstract JsonLikeWriter writeNull() throws IOException; + + public abstract JsonLikeWriter write(String name, String value) throws IOException; + + public abstract JsonLikeWriter write(String name, BigInteger value) throws IOException; + + public abstract JsonLikeWriter write(String name, BigDecimal value) throws IOException; + + public abstract JsonLikeWriter write(String name, long value) throws IOException; + + public abstract JsonLikeWriter write(String name, double value) throws IOException; + + public abstract JsonLikeWriter write(String name, Boolean value) throws IOException; + + public abstract JsonLikeWriter write(String name, boolean value) throws IOException; + + public abstract JsonLikeWriter endObject() throws IOException; + + public abstract JsonLikeWriter endArray() throws IOException; + + public abstract JsonLikeWriter endBlock() throws IOException; + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java new file mode 100644 index 00000000000..d22ac026796 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java @@ -0,0 +1,372 @@ +package ca.uhn.fhir.parser.json.jackson; + +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.parser.json.JsonLikeArray; +import ca.uhn.fhir.parser.json.JsonLikeObject; +import ca.uhn.fhir.parser.json.JsonLikeStructure; +import ca.uhn.fhir.parser.json.JsonLikeValue; +import ca.uhn.fhir.parser.json.JsonLikeWriter; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.DecimalNode; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.apache.jena.tdb.setup.BuilderStdDB; + +import java.io.IOException; +import java.io.PushbackReader; +import java.io.Reader; +import java.io.Writer; +import java.math.BigDecimal; +import java.util.AbstractSet; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +public class JacksonStructure implements JsonLikeStructure { + + private static final ObjectMapper OBJECT_MAPPER = createObjectMapper(); + private JacksonWriter jacksonWriter; + private ROOT_TYPE rootType = null; + private JsonNode nativeRoot = null; + private JsonNode jsonLikeRoot = null; + + public void setNativeObject(ObjectNode objectNode) { + this.rootType = ROOT_TYPE.OBJECT; + this.nativeRoot = objectNode; + } + + public void setNativeArray(ArrayNode arrayNode) { + this.rootType = ROOT_TYPE.ARRAY; + this.nativeRoot = arrayNode; + } + + @Override + public JsonLikeStructure getInstance() { + return new JacksonStructure(); + } + + @Override + public void load(Reader theReader) throws DataFormatException { + this.load(theReader, false); + } + + @Override + public void load(Reader theReader, boolean allowArray) throws DataFormatException { + PushbackReader pbr = new PushbackReader(theReader); + int nextInt; + try { + while (true) { + nextInt = pbr.read(); + if (nextInt == -1) { + throw new DataFormatException("Did not find any content to parse"); + } + if (nextInt == '{') { + pbr.unread(nextInt); + break; + } + if (Character.isWhitespace(nextInt)) { + continue; + } + if (allowArray) { + if (nextInt == '[') { + pbr.unread(nextInt); + break; + } + throw new DataFormatException("Content does not appear to be FHIR JSON, first non-whitespace character was: '" + (char) nextInt + "' (must be '{' or '[')"); + } + throw new DataFormatException("Content does not appear to be FHIR JSON, first non-whitespace character was: '" + (char) nextInt + "' (must be '{')"); + } + + if (nextInt == '{') { + setNativeObject((ObjectNode) OBJECT_MAPPER.readTree(pbr)); + } else { + setNativeArray((ArrayNode) OBJECT_MAPPER.readTree(pbr)); + } + } catch (Exception e) { + if (e.getMessage().startsWith("Unexpected char 39")) { + throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage() + " - " + + "This may indicate that single quotes are being used as JSON escapes where double quotes are required", e); + } + throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage(), e); + } + } + + @Override + public JsonLikeWriter getJsonLikeWriter(Writer writer) throws IOException { + if (null == jacksonWriter) { + jacksonWriter = new JacksonWriter(OBJECT_MAPPER.getFactory(), writer); + } + + return jacksonWriter; + } + + @Override + public JsonLikeWriter getJsonLikeWriter() { + if (null == jacksonWriter) { + jacksonWriter = new JacksonWriter(); + } + return jacksonWriter; + } + + @Override + public JsonLikeObject getRootObject() throws DataFormatException { + if (rootType == ROOT_TYPE.OBJECT) { + if (null == jsonLikeRoot) { + jsonLikeRoot = nativeRoot; + } + + return new JacksonJsonObject((ObjectNode) jsonLikeRoot); + } + + throw new DataFormatException("Content must be a valid JSON Object. It must start with '{'."); + } + + private enum ROOT_TYPE {OBJECT, ARRAY} + + private static class JacksonJsonObject extends JsonLikeObject { + private final ObjectNode nativeObject; + private final Map jsonLikeMap = new LinkedHashMap<>(); + private Set keySet = null; + + public JacksonJsonObject(ObjectNode json) { + this.nativeObject = json; + } + + @Override + public Object getValue() { + return null; + } + + @Override + public Set keySet() { + if (null == keySet) { + final Iterable> iterable = nativeObject::fields; + keySet = StreamSupport.stream(iterable.spliterator(), false) + .map(Map.Entry::getKey) + .collect(Collectors.toCollection(EntryOrderedSet::new)); + } + + return keySet; + } + + @Override + public JsonLikeValue get(String key) { + JsonLikeValue result = null; + if (jsonLikeMap.containsKey(key)) { + result = jsonLikeMap.get(key); + } else { + JsonNode child = nativeObject.get(key); + if (child != null) { + result = new JacksonJsonValue(child); + } + jsonLikeMap.put(key, result); + } + return result; + } + } + + private static class EntryOrderedSet extends AbstractSet { + private final transient ArrayList data; + + public EntryOrderedSet() { + data = new ArrayList<>(); + } + + @Override + public int size() { + return data.size(); + } + + @Override + public boolean contains(Object o) { + return data.contains(o); + } + + public T get(int index) { + return data.get(index); + } + + @Override + public boolean add(T element) { + if (data.contains(element)) { + return false; + } + return data.add(element); + } + + @Override + public boolean remove(Object o) { + return data.remove(o); + } + + @Override + public void clear() { + data.clear(); + } + + @Override + public Iterator iterator() { + return data.iterator(); + } + } + + private static class JacksonJsonArray extends JsonLikeArray { + private final ArrayNode nativeArray; + private final Map jsonLikeMap = new LinkedHashMap(); + + public JacksonJsonArray(ArrayNode json) { + this.nativeArray = json; + } + + @Override + public Object getValue() { + return null; + } + + @Override + public int size() { + return nativeArray.size(); + } + + @Override + public JsonLikeValue get(int index) { + Integer key = index; + JsonLikeValue result = null; + if (jsonLikeMap.containsKey(key)) { + result = jsonLikeMap.get(key); + } else { + JsonNode child = nativeArray.get(index); + if (child != null) { + result = new JacksonJsonValue(child); + } + jsonLikeMap.put(key, result); + } + return result; + } + } + + private static class JacksonJsonValue extends JsonLikeValue { + private final JsonNode nativeValue; + private JsonLikeObject jsonLikeObject = null; + private JsonLikeArray jsonLikeArray = null; + + public JacksonJsonValue(JsonNode jsonNode) { + this.nativeValue = jsonNode; + } + + @Override + public Object getValue() { + if (nativeValue != null && nativeValue.isValueNode()) { + if (nativeValue.isNumber()) { + return nativeValue.numberValue(); + } + + if (nativeValue.isBoolean()) { + return nativeValue.booleanValue(); + } + + return nativeValue.asText(); + } + return null; + } + + @Override + public ValueType getJsonType() { + if (null == nativeValue || nativeValue.isNull()) { + return ValueType.NULL; + } + if (nativeValue.isObject()) { + return ValueType.OBJECT; + } + if (nativeValue.isArray()) { + return ValueType.ARRAY; + } + if (nativeValue.isValueNode()) { + return ValueType.SCALAR; + } + return null; + } + + @Override + public ScalarType getDataType() { + if (nativeValue != null && nativeValue.isValueNode()) { + if (nativeValue.isNumber()) { + return ScalarType.NUMBER; + } + if (nativeValue.isTextual()) { + return ScalarType.STRING; + } + if (nativeValue.isBoolean()) { + return ScalarType.BOOLEAN; + } + } + return null; + } + + @Override + public JsonLikeArray getAsArray() { + if (nativeValue != null && nativeValue.isArray()) { + if (null == jsonLikeArray) { + jsonLikeArray = new JacksonJsonArray((ArrayNode) nativeValue); + } + } + return jsonLikeArray; + } + + @Override + public JsonLikeObject getAsObject() { + if (nativeValue != null && nativeValue.isObject()) { + if (null == jsonLikeObject) { + jsonLikeObject = new JacksonJsonObject((ObjectNode) nativeValue); + } + } + return jsonLikeObject; + } + + @Override + public Number getAsNumber() { + return nativeValue != null ? nativeValue.numberValue() : null; + } + + @Override + public String getAsString() { + if (nativeValue != null) { + if (nativeValue instanceof DecimalNode) { + BigDecimal value = nativeValue.decimalValue(); + return value.toPlainString(); + } + return nativeValue.asText(); + } + return null; + } + + @Override + public boolean getAsBoolean() { + if (nativeValue != null && nativeValue.isValueNode() && nativeValue.isBoolean()) { + return nativeValue.asBoolean(); + } + return super.getAsBoolean(); + } + } + + private static ObjectMapper createObjectMapper() { + ObjectMapper retVal = new ObjectMapper(); + retVal = retVal.setNodeFactory(new JsonNodeFactory(true)); + retVal = retVal.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); + retVal = retVal.enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS); + retVal = retVal.disable(JsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION); + retVal = retVal.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET); + retVal = retVal.disable(JsonParser.Feature.AUTO_CLOSE_SOURCE); + retVal = retVal.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); + return retVal; + } +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java new file mode 100644 index 00000000000..54c40e36e9c --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java @@ -0,0 +1,197 @@ +package ca.uhn.fhir.parser.json.jackson; + +import ca.uhn.fhir.parser.json.JsonLikeWriter; +import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.PrettyPrinter; +import com.fasterxml.jackson.core.util.DefaultIndenter; +import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; +import com.fasterxml.jackson.core.util.Separators; + +import java.io.IOException; +import java.io.Writer; +import java.math.BigDecimal; +import java.math.BigInteger; + +public class JacksonWriter extends JsonLikeWriter { + + private JsonGenerator myJsonGenerator; + + public JacksonWriter(JsonFactory theJsonFactory, Writer theWriter) throws IOException { + myJsonGenerator = theJsonFactory.createGenerator(theWriter); + setWriter(theWriter); + } + + public JacksonWriter() { + } + + @Override + public JsonLikeWriter init() { + if (isPrettyPrint()) { + DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter() { + + /** + * Objects should serialize as + *
+				 * {
+				 *    "key": "value"
+				 * }
+				 * 
+ * in order to be consistent with Gson behaviour, instead of the jackson default + *
+				 * {
+				 *    "key" : "value"
+				 * }
+				 * 
+ */ + @Override + public DefaultPrettyPrinter withSeparators(Separators separators) { + _separators = separators; + _objectFieldValueSeparatorWithSpaces = separators.getObjectFieldValueSeparator() + " "; + return this; + } + + }; + prettyPrinter = prettyPrinter.withObjectIndenter(new DefaultIndenter(" ", "\n")); + + myJsonGenerator.setPrettyPrinter(prettyPrinter); + } + return this; + } + + @Override + public JsonLikeWriter flush() { + return this; + } + + @Override + public void close() throws IOException { + myJsonGenerator.close(); + } + + @Override + public JsonLikeWriter beginObject() throws IOException { + myJsonGenerator.writeStartObject(); + return this; + } + + @Override + public JsonLikeWriter beginObject(String name) throws IOException { + myJsonGenerator.writeObjectFieldStart(name); + return this; + } + + @Override + public JsonLikeWriter beginArray(String name) throws IOException { + myJsonGenerator.writeArrayFieldStart(name); + return this; + } + + @Override + public JsonLikeWriter write(String value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(BigInteger value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(BigDecimal value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(long value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(double value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(Boolean value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter write(boolean value) throws IOException { + myJsonGenerator.writeObject(value); + return this; + } + + @Override + public JsonLikeWriter writeNull() throws IOException { + myJsonGenerator.writeNull(); + return this; + } + + @Override + public JsonLikeWriter write(String name, String value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, BigInteger value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, BigDecimal value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, long value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, double value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, Boolean value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, boolean value) throws IOException { + myJsonGenerator.writeObjectField(name, value); + return this; + } + + @Override + public JsonLikeWriter endObject() throws IOException { + myJsonGenerator.writeEndObject(); + return this; + } + + @Override + public JsonLikeWriter endArray() throws IOException { + myJsonGenerator.writeEndArray(); + return this; + } + + @Override + public JsonLikeWriter endBlock() throws IOException { + myJsonGenerator.writeEndObject(); + return this; + } +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/AddTags.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/AddTags.java index 8f54e5801e7..ef69d805e90 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/AddTags.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/AddTags.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/At.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/At.java index ae494aec7ea..aa242a44019 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/At.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/At.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalUrlParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalUrlParam.java index 1f9918e6c54..85e9055c7bf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalUrlParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalUrlParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Count.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Count.java index 550667ca9e7..e91b75bc7c9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Count.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Count.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Create.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Create.java index a40821ce96b..7e3a0ea5704 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Create.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Create.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Delete.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Delete.java index bae27c7d250..7043cd91340 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Delete.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Delete.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/DeleteTags.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/DeleteTags.java index 193cd69a7e7..1fd25cf7628 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/DeleteTags.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/DeleteTags.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Destroy.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Destroy.java index 2ae3906c366..ff501e25b69 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Destroy.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Destroy.java @@ -9,7 +9,7 @@ import java.lang.annotation.Target; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Elements.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Elements.java index 1e9905910d4..3c7694a652e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Elements.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Elements.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GetPage.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GetPage.java index d3d3af2e055..823c83cd874 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GetPage.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GetPage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQL.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQL.java index 3391a8eac3d..b3535a2ff43 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQL.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQL.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQLQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQLQuery.java index 72f917e26fb..71b427c4c51 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQLQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/GraphQLQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/History.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/History.java index 875fc5a9d1c..e4ccd62cda7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/History.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/History.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IdParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IdParam.java index b6941f8133a..b29a09d998b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IdParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IdParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IncludeParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IncludeParam.java index 3840fe3555a..b9a07d153ae 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IncludeParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/IncludeParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Initialize.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Initialize.java index e2d74870161..d0b2cf25ef1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Initialize.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Initialize.java @@ -9,7 +9,7 @@ import java.lang.annotation.Target; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Metadata.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Metadata.java index 07f2f169174..61c43547dc0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Metadata.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Metadata.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java index 914278280f6..0d1aefecdb4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OperationParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OperationParam.java index 139b73e411f..3660f143e9e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OperationParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OperationParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OptionalParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OptionalParam.java index 6576e12ed93..f69ae979d2a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OptionalParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/OptionalParam.java @@ -6,7 +6,7 @@ import java.lang.annotation.ElementType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/PageIdParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/PageIdParam.java index 5279c98bf16..a5037118cf2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/PageIdParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/PageIdParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Patch.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Patch.java index cc5dc97a702..2043b8f4dcd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Patch.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Patch.java @@ -6,7 +6,7 @@ import java.lang.annotation.ElementType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RawParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RawParam.java index fbd47da60f2..3c9036c9df3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RawParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RawParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Read.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Read.java index c30be8b4a82..8e114c71bcf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Read.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Read.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RequiredParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RequiredParam.java index 8700f2d8b59..fad82249551 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RequiredParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/RequiredParam.java @@ -6,7 +6,7 @@ import java.lang.annotation.ElementType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ResourceParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ResourceParam.java index 1c00de68b18..7b4a6581ea0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ResourceParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ResourceParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Search.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Search.java index b16dabcdaee..e93a6544e06 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Search.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Search.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ServerBase.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ServerBase.java index 0b188b08074..fda13f247f3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ServerBase.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ServerBase.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Since.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Since.java index 949ba1854c8..13fab449a4d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Since.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Since.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java index 50adf17441d..a62b9bf429c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Transaction.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Transaction.java index a2450147127..1a741387e7b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Transaction.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Transaction.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/TransactionParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/TransactionParam.java index f8a1f9509a1..a8cef4d2a82 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/TransactionParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/TransactionParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Update.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Update.java index 64e6a75947d..e29abf94dee 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Update.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Update.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Validate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Validate.java index 648a329a63b..41f2d6d7d7f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Validate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Validate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.annotation; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/CacheControlDirective.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/CacheControlDirective.java index 2e63877539a..82c91578d27 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/CacheControlDirective.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/CacheControlDirective.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java index 8f540033908..50aec5b8393 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,14 @@ package ca.uhn.fhir.rest.api; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; public class Constants { @@ -252,7 +259,6 @@ public class Constants { *

*/ public static final String EXT_META_SOURCE = "http://hapifhir.io/fhir/StructureDefinition/resource-meta-source"; - public static final String CODESYSTEM_VALIDATE_NOT_NEEDED = UUID.randomUUID().toString(); static { CHARSET_UTF8 = StandardCharsets.UTF_8; @@ -354,16 +360,7 @@ public class Constants { CORS_ALLWED_METHODS = Collections.unmodifiableSet(corsAllowedMethods); } - public static boolean codeSystemNotNeeded(String theCodeSystem) { - return Constants.CODESYSTEM_VALIDATE_NOT_NEEDED.equals(theCodeSystem); - } - - public static String codeSystemWithDefaultDescription(String theSystem) { - if (codeSystemNotNeeded(theSystem)) { - return "(none)"; - } else { - return theSystem; - } + return defaultIfBlank(theSystem, "(none)"); } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/EncodingEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/EncodingEnum.java index 5e3f99fa9c4..99ca946c5c2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/EncodingEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/EncodingEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/IVersionSpecificBundleFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/IVersionSpecificBundleFactory.java index 2be14d372ec..750b73904cc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/IVersionSpecificBundleFactory.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/IVersionSpecificBundleFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java index fb8bb8a5e4e..391fc85b1a3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PatchTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PatchTypeEnum.java index 3452087c776..4e6d843496e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PatchTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PatchTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferHeader.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferHeader.java index 5e5e10168b0..831149c2d05 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferHeader.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferHeader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferReturnEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferReturnEnum.java index a1860b6aa4f..e1c40527fb3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferReturnEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PreferReturnEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/QualifiedParamList.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/QualifiedParamList.java index 65db09c0116..1cd295dca66 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/QualifiedParamList.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/QualifiedParamList.java @@ -13,7 +13,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestFormatParamStyleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestFormatParamStyleEnum.java index 41de5d18825..cf80d4b8b73 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestFormatParamStyleEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestFormatParamStyleEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestTypeEnum.java index 15151d60b5e..be9c7280276 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RequestTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java index 78efc134294..0908500e532 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestSearchParameterTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestSearchParameterTypeEnum.java index 1da52a194c6..9ec13cc7b6e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestSearchParameterTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestSearchParameterTypeEnum.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchStyleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchStyleEnum.java index a1f949f90cf..06c43929db7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchStyleEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchStyleEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchTotalModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchTotalModeEnum.java index 07fc05d7310..b502d04546c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchTotalModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SearchTotalModeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java index 4514cdabe4d..5bfa59e212d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java index 39ef4c37322..969829a1514 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java @@ -6,7 +6,7 @@ import java.io.Serializable; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SummaryEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SummaryEnum.java index 51a6a33896d..088a512aa14 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SummaryEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SummaryEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/ValidationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/ValidationModeEnum.java index f57cd9df9f9..19336aff377 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/ValidationModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/ValidationModeEnum.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.Validate; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/Header.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/Header.java index 4ec8db6f082..089ef7111f3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/Header.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/Header.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/HttpClientUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/HttpClientUtil.java index 962a39de52a..affd3aef9ab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/HttpClientUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/HttpClientUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IBasicClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IBasicClient.java index 27991ec9a37..a4da2909077 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IBasicClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IBasicClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IClientInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IClientInterceptor.java index 75d37f69ed5..b44cf49d150 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IClientInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IClientInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IGenericClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IGenericClient.java index 9478b9d0d1a..22397579aff 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IGenericClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IGenericClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpClient.java index 7ebe7e6ba91..defab8f2f44 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpRequest.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpRequest.java index 6ac45ac0c24..417c467e3b5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpRequest.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpResponse.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpResponse.java index 161e6ba9db1..575a3c49b1e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpResponse.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java index bff3e4c3da4..8679b308fa6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java @@ -13,7 +13,7 @@ import javax.annotation.Nonnull; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClientFactory.java index 094a01569b7..82eff20fb3a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClientFactory.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClientFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/ServerValidationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/ServerValidationModeEnum.java index 8c1f141c519..1bd10b71d17 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/ServerValidationModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/ServerValidationModeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java index cc6f84082ff..c102aded4e5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java index 36da207abc9..3eda0390d7d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java index 79c5ee90501..37eea4e05e7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java index 2efaf2f00cd..7ea05cb683b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/BaseClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/BaseClientParam.java index b50f60b8c6c..a29f420889f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/BaseClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/BaseClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeClientParam.java index 655584b4ee5..ec155756a3c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java index bb0e7d1c550..b292bf30bf5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/DateClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/DateClientParam.java index df492afabd2..7a0d36ccb3f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/DateClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/DateClientParam.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseOn.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseOn.java index 89144a969c7..185a0465a8f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseOn.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseOn.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,14 @@ public interface IBaseOn { * Perform the operation across all versions of all resources of the given type on the server */ T onType(Class theResourceType); - + + /** + * Perform the operation across all versions of all resources of the given type on the server + * + * @param theResourceType The resource type name, e.g. "ValueSet" + */ + T onType(String theResourceType); + /** * Perform the operation across all versions of a specific resource (by ID and type) on the server. * Note that theId must be populated with both a resource type and a resource ID at diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java index 6afb4fe2708..4bb4b9b169b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java @@ -9,7 +9,7 @@ import java.util.Map; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IClientExecutable.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IClientExecutable.java index d83a54c7777..ba1c9c26bbd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IClientExecutable.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IClientExecutable.java @@ -12,7 +12,7 @@ import java.util.List; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICompositeWithLeft.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICompositeWithLeft.java index 80779f9099e..09947c1095a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICompositeWithLeft.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICompositeWithLeft.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreate.java index 16c85326bb6..d7a62e0560f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreate.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java index ea53ca9e005..e9893013ada 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java index 9f534b98b43..c8845eb52fc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java index cb23f864a6f..2354102896c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterion.java index 7029e8a7940..7ad50018122 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterion.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterionInternal.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterionInternal.java index 1d4b267ef23..806c99dc8e0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterionInternal.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICriterionInternal.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.context.FhirContext; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java index a8a0c5f45d0..7df3fbb17ce 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java @@ -7,7 +7,7 @@ import org.hl7.fhir.instance.model.api.IIdType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteTyped.java index 232488c8d9a..049b1fef51c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java index fe9e1363871..d68e6e04d1b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java index c47803ea1b5..688ad602b72 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceTyped.java index aaf11e97785..022c596e1f2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceUntyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceUntyped.java index c8c42d08b22..1e9ba5bf9b8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceUntyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IFetchConformanceUntyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPage.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPage.java index 1576fd46650..4f5b509a604 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPage.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java index 8dcc5c889c9..413852293cd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageUntyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageUntyped.java index 332eff0d277..7f8759638c0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageUntyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageUntyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistory.java index 4c71f182324..49f51cc7228 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistory.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryTyped.java index b6a822f4ff7..dcf72faf888 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryUntyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryUntyped.java index a93a59163e2..707ca14ab64 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryUntyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IHistoryUntyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMeta.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMeta.java index ba82e87cf74..4d7a69627c7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMeta.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMeta.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseMetaType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteSourced.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteSourced.java index 3a15d4a77c0..b376eb4d547 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteSourced.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteSourced.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteUnsourced.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteUnsourced.java index 86bab533004..9366fe642e1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteUnsourced.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaAddOrDeleteUnsourced.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaGetUnsourced.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaGetUnsourced.java index 147542a7f4e..9605a39d517 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaGetUnsourced.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IMetaGetUnsourced.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperation.java index efd97934f9d..c77f27e4141 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperation.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IIdType; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationOn.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationOn.java index c9ceb3baef0..c911f5c33a5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationOn.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationOn.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsg.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsg.java index 70ebbc7d957..9bc3826785b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsg.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsg.java @@ -9,7 +9,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsgMode.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsgMode.java index fb482421e31..c89252b1c9b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsgMode.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationProcessMsgMode.java @@ -11,7 +11,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationTyped.java index 2cd84cb259c..dc4135143c3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUnnamed.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUnnamed.java index ed780779df5..07f1861d266 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUnnamed.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUnnamed.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntyped.java index c11695d251b..5c295098490 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntyped.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBase; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInput.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInput.java index f590860bc74..753ab3a1b58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInput.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInput.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInputAndPartialOutput.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInputAndPartialOutput.java index c8269dea897..8825c531b61 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInputAndPartialOutput.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IOperationUntypedWithInputAndPartialOutput.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IParam.java index 9f6167d74c4..e7fcdd5f4a8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatch.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatch.java index 0bf19a857c1..d87eeb94cf8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatch.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatch.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchExecutable.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchExecutable.java index e8d2dab15ec..4c30f3f911a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchExecutable.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchExecutable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithBody.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithBody.java index a1652407712..a0360515df2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithBody.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithBody.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQuery.java index bf526a92aff..1cb5bd8adf7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQueryTyped.java index f4927d7e51f..813f1855d32 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IPatchWithQueryTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java index 8a056a84e35..73f2f1ced75 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java @@ -16,7 +16,7 @@ import java.util.Map; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IRead.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IRead.java index e9a36f7bac7..f5865542ebe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IRead.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IRead.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadExecutable.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadExecutable.java index 0b18eb85d6d..a58374f28f4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadExecutable.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadExecutable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadIfNoneMatch.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadIfNoneMatch.java index 2f14d0bc08c..1a4f18458c1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadIfNoneMatch.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadIfNoneMatch.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadTyped.java index 9585c8f7ff1..11abf7ca626 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IReadTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ISort.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ISort.java index 2b2f1998590..afbc5e75788 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ISort.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ISort.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java index 26a57f21807..b68f66ac3bd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java index 043802daded..0a37c112bd4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUntypedQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUntypedQuery.java index 8f93b4c76b7..55d08f4158e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUntypedQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUntypedQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdate.java index 8babe13f595..fada3e6c3bf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateExecutable.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateExecutable.java index 2aa778d9742..ca09a9e1a99 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateExecutable.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateExecutable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java index 7b61b4eb822..64247ff5a8f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java index 21747b0fd7b..8389c49713e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java index 3c767db3df0..5368727dfce 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidate.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidate.java index 0675fd9fc35..dcda781a946 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidate.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidateUntyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidateUntyped.java index 42a6a9100b8..84816a9842d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidateUntyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IValidateUntyped.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/NumberClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/NumberClientParam.java index c634b1329f4..c0d68e96b7a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/NumberClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/NumberClientParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.rest.param.ParamPrefixEnum; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java index 148c57d65e1..2c9337cb860 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityCriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityCriterion.java index 8b9edd2d57f..e6681af90cd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityCriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityCriterion.java @@ -10,7 +10,7 @@ import ca.uhn.fhir.rest.param.ParameterUtil; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ReferenceClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ReferenceClientParam.java index 5f94027ba0d..9072da0c4f9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ReferenceClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ReferenceClientParam.java @@ -13,7 +13,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/SpecialClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/SpecialClientParam.java index 4399c565b47..315be2583b4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/SpecialClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/SpecialClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringClientParam.java index 5c2b0206931..2eb6b8086e8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringCriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringCriterion.java index a9e6a042a5f..f5b1fede325 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringCriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/StringCriterion.java @@ -14,7 +14,7 @@ import ca.uhn.fhir.rest.param.ParameterUtil; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java index a9bcfd25b27..cebdd94e8f9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java @@ -13,7 +13,7 @@ import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenCriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenCriterion.java index 230f8733170..90fa0044e9a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenCriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenCriterion.java @@ -9,7 +9,7 @@ import java.util.Collection; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/UriClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/UriClientParam.java index 30fa58accc9..73ede13757c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/UriClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/UriClientParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.gclient; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java index fcb50e4c461..20cd0aafe06 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseOrListParam.java index 583eb98b088..201022a1994 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseOrListParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParam.java index 5ae08e1c325..498a0765b2f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParam.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.context.FhirContext; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParamWithPrefix.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParamWithPrefix.java index d96c5920378..7da5b620f9f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParamWithPrefix.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseParamWithPrefix.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java index 38834fe87bb..f4ac7bbb9dd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java index 6244aa7a19d..ece7f592d47 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java index 0dc794ef1f5..6309eb5489c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java index 62570d27d29..4e9e8754f4c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java index 1d68333d58f..9005b19a1f6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateParam.java index a9270f64f2e..29fd37dc034 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java index 8c164c37510..f36e4dd82f0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java @@ -19,7 +19,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -215,6 +215,15 @@ public class DateRangeParam implements IQueryParameterAnd { * This lower bound is assumed to have a ge * (greater than or equals) modifier. *

+ *

+ * Note: An operation can take a DateRangeParam. If only a single date is provided, + * it will still result in a DateRangeParam where the lower and upper bounds + * are the same value. As such, even though the prefixes for the lower and + * upper bounds default to ge and le respectively, + * the resulting prefix is effectively eq where only a single + * date is provided - as required by the FHIR specificiation (i.e. "If no + * prefix is present, the prefix eq is assumed"). + *

*/ public DateRangeParam setLowerBound(String theLowerBound) { setLowerBound(new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound)); @@ -281,7 +290,7 @@ public class DateRangeParam implements IQueryParameterAnd { case LESSTHAN_OR_EQUALS: case ENDS_BEFORE: case NOT_EQUAL: - throw new IllegalStateException("Unvalid lower bound comparator: " + myLowerBound.getPrefix()); + throw new IllegalStateException("Invalid lower bound comparator: " + myLowerBound.getPrefix()); } } return retVal; @@ -298,6 +307,15 @@ public class DateRangeParam implements IQueryParameterAnd { * This upper bound is assumed to have a le * (less than or equals) modifier. *

+ *

+ * Note: An operation can take a DateRangeParam. If only a single date is provided, + * it will still result in a DateRangeParam where the lower and upper bounds + * are the same value. As such, even though the prefixes for the lower and + * upper bounds default to ge and le respectively, + * the resulting prefix is effectively eq where only a single + * date is provided - as required by the FHIR specificiation (i.e. "If no + * prefix is present, the prefix eq is assumed"). + *

*/ public DateRangeParam setUpperBound(String theUpperBound) { setUpperBound(new DateParam(LESSTHAN_OR_EQUALS, theUpperBound)); @@ -339,7 +357,7 @@ public class DateRangeParam implements IQueryParameterAnd { case APPROXIMATE: case NOT_EQUAL: case STARTS_AFTER: - throw new IllegalStateException("Unvalid upper bound comparator: " + myUpperBound.getPrefix()); + throw new IllegalStateException("Invalid upper bound comparator: " + myUpperBound.getPrefix()); } } return retVal; @@ -467,7 +485,7 @@ public class DateRangeParam implements IQueryParameterAnd { continue; } if (paramList.size() > 1) { - throw new InvalidRequestException("DateRange parameter does not suppport OR queries"); + throw new InvalidRequestException("DateRange parameter does not support OR queries"); } String param = paramList.get(0); @@ -520,6 +538,15 @@ public class DateRangeParam implements IQueryParameterAnd { return b.toString(); } + /** + * Note: An operation can take a DateRangeParam. If only a single date is provided, + * it will still result in a DateRangeParam where the lower and upper bounds + * are the same value. As such, even though the prefixes for the lower and + * upper bounds default to ge and le respectively, + * the resulting prefix is effectively eq where only a single + * date is provided - as required by the FHIR specificiation (i.e. "If no + * prefix is present, the prefix eq is assumed"). + */ private void validateAndSet(DateParam lowerBound, DateParam upperBound) { if (hasBound(lowerBound) && hasBound(upperBound)) { if (lowerBound.getValue().getTime() > upperBound.getValue().getTime()) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasAndListParam.java index 07c2bd71a30..a0d184960f3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasOrListParam.java index cf5551627c8..edb9a43836d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import ca.uhn.fhir.util.CoverageIgnore; */ -public class HasOrListParam extends BaseOrListParam { +public class HasOrListParam extends BaseOrListParam { @CoverageIgnore @Override diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasParam.java index b855dc3d400..91447c7f003 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/HasParam.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.defaultString; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java index 8df5696b57b..a1ba35c8a8d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java index 99ce92c054a..636d0e7afcd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java index 4b920aa4f9a..54f320f6dac 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java index 2e0b252079e..3dc08ef5d1c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParamPrefixEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParamPrefixEnum.java index 6781457ed3b..d46d47b5943 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParamPrefixEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParamPrefixEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java index 19b825ddca4..5407ac8bd14 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java @@ -29,7 +29,7 @@ import java.util.stream.Collectors; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,45 +62,50 @@ public class ParameterUtil { */ public static IQueryParameterAnd parseQueryParams(FhirContext theContext, RestSearchParameterTypeEnum paramType, String theUnqualifiedParamName, List theParameters) { - QueryParameterAndBinder binder = null; + QueryParameterAndBinder binder; switch (paramType) { case COMPOSITE: throw new UnsupportedOperationException(); case DATE: binder = new QueryParameterAndBinder(DateAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case NUMBER: binder = new QueryParameterAndBinder(NumberAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case QUANTITY: binder = new QueryParameterAndBinder(QuantityAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case REFERENCE: binder = new QueryParameterAndBinder(ReferenceAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case STRING: binder = new QueryParameterAndBinder(StringAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case TOKEN: binder = new QueryParameterAndBinder(TokenAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case URI: binder = new QueryParameterAndBinder(UriAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; case HAS: binder = new QueryParameterAndBinder(HasAndListParam.class, - Collections.>emptyList()); + Collections.emptyList()); break; + case SPECIAL: + binder = new QueryParameterAndBinder(SpecialAndListParam.class, + Collections.emptyList()); + break; + default: + throw new IllegalArgumentException("Parameter '" + theUnqualifiedParamName + "' has type " + paramType + " which is currently not supported."); } - // FIXME null access return binder.parse(theContext, theUnqualifiedParamName, theParameters); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifierDetails.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifierDetails.java index bb76f60ba36..ad95dea0b58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifierDetails.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifierDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java index b227200171d..cb7ebee7a58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java index 2a224d1fc04..bf5dfea3982 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java index e7ecdd41099..4f306a4f130 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java index 2d190fc182e..211b83f3ab6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java index e9b94f69a90..c6d5d6a2d92 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java index e018fb94cff..7e59d6d08eb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -200,6 +200,13 @@ public class ReferenceParam extends BaseParam /*implements IQueryParameterType*/ return myValue; } + /** + * Note that the parameter to this method must be a resource reference, e.g + * 123 or Patient/123 or http://example.com/fhir/Patient/123 + * or something like this. This is not appropriate for cases where a chain is being used and + * the value is for a different type of parameter (e.g. a token). In that case, use one of the + * setter constructors. + */ public ReferenceParam setValue(String theValue) { IdDt id = new IdDt(theValue); String qualifier= null; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialAndListParam.java index 2707c62ad9e..92561de1a87 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialOrListParam.java index 59400825184..1f31bf7f6dd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java index 910fe340dad..32a11a11867 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java index a99fa10f158..2522bbf1b8a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java index 635a400c459..9bfee868058 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringParam.java index 254f375bd4b..8f11fe37e99 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java index 550f6345504..af94e3cb264 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java @@ -6,7 +6,7 @@ import org.apache.commons.lang3.Validate; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java index 63e4f8e0a2f..86df604d182 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java @@ -11,7 +11,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java index 490406c424c..0b18187d75d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParamModifier.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParamModifier.java index d2a4ba0f60a..06b32562afb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParamModifier.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParamModifier.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java index ec995ea3768..21e1d9e87aa 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java index 8fc044c8217..046e938ed5c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java index c1ad7ba114c..025a17b23cf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParamQualifierEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParamQualifierEnum.java index faadcc7be25..497fe61b20d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParamQualifierEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParamQualifierEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseBinder.java index 6cbdf1ca27a..9f9bc31a343 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseJavaPrimitiveBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseJavaPrimitiveBinder.java index 86ada96b68e..b166334158f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseJavaPrimitiveBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/BaseJavaPrimitiveBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CalendarBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CalendarBinder.java index f8f42c31cee..00ca0ebebe3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CalendarBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CalendarBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CollectionBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CollectionBinder.java index 2f6e2c7eed1..ca6bf40b316 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CollectionBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/CollectionBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/DateBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/DateBinder.java index b0153f15baf..08eb1e6e15c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/DateBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/DateBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/FhirPrimitiveBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/FhirPrimitiveBinder.java index 848fd963114..ee7e5a45f9f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/FhirPrimitiveBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/FhirPrimitiveBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/IParamBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/IParamBinder.java index ba5a83f62a9..38a7ba6fa76 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/IParamBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/IParamBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterAndBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterAndBinder.java index 7d2cedfa1cb..9a9a9582fb8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterAndBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterAndBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterOrBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterOrBinder.java index d1a146e8bb7..9f8ae708b7e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterOrBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterOrBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterTypeBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterTypeBinder.java index 5b5718263c8..718b24436d8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterTypeBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/QueryParameterTypeBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/StringBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/StringBinder.java index 9d5b92d4ec6..28fe5d1de71 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/StringBinder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/binder/StringBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.param.binder; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java index 9f28004e118..497afb978ab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java index f2dc1106dde..0c46602e57a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java @@ -11,7 +11,7 @@ import java.util.*; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java index 8e8a3ada51d..d30381cccb2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java index d8bdc5a4c22..9ad310cb072 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java index eb64c7632e2..8261f45a64a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/MethodNotAllowedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/MethodNotAllowedException.java index 9cc23781d39..3b836b00c35 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/MethodNotAllowedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/MethodNotAllowedException.java @@ -12,7 +12,7 @@ import ca.uhn.fhir.rest.api.RequestTypeEnum; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java index 07964008ae3..5ba1c3fcf06 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java index f092980420c..0fecda907b6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PayloadTooLargeException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PayloadTooLargeException.java index 1d419884c8f..fc88903da13 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PayloadTooLargeException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PayloadTooLargeException.java @@ -8,7 +8,7 @@ import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java index a1c20fb7411..7a9fdd5eee6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java index 28235b61d33..9b1c3c085d6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java index 4f227444d59..b59fd4072fd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java index cc67be1c465..caf0529f272 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java index 21a21e771a2..56bd7bcb471 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java index 3df82ff8f40..3c19774cff3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java index 6e8a71b4b77..8d0903dc67a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.exceptions; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/store/IAuditDataStore.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/store/IAuditDataStore.java index 343cfaf2d2d..ea53ca77f53 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/store/IAuditDataStore.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/store/IAuditDataStore.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.model.base.resource.BaseSecurityEvent; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ArrayUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ArrayUtil.java index 5418319d99e..5d08cfb10c2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ArrayUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ArrayUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AsyncUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AsyncUtil.java index 18abbc3cb86..b05c6ed9987 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AsyncUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AsyncUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AttachmentUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AttachmentUtil.java index db516ec2a72..6ad01b5b9e1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AttachmentUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/AttachmentUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,8 @@ public class AttachmentUtil { BaseRuntimeChildDefinition entryChild = getChild(theContext, theAttachment, "size"); if (theLength == null) { entryChild.getMutator().setValue(theAttachment, null); + } else if (theContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.R5)){ + entryChild.getMutator().setValue(theAttachment, newPrimitive(theContext, "integer64", (long)theLength)); } else { entryChild.getMutator().setValue(theAttachment, newPrimitive(theContext, "unsignedInt", theLength)); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BinaryUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BinaryUtil.java index e0e252dfa1a..20a2b9956c2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BinaryUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BinaryUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java index 896057ebe4a..2c948d6e558 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java @@ -22,7 +22,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CollectionUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CollectionUtil.java index 01f9b4aacf0..5628e0cea17 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CollectionUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CollectionUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CountingAndLimitingInputStream.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CountingAndLimitingInputStream.java index eab3f794d66..e755a772bcd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CountingAndLimitingInputStream.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CountingAndLimitingInputStream.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java index 4c1e7df544e..d89dbcab45f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DatatypeUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DatatypeUtil.java index 7c6df30194f..665596606b8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DatatypeUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DatatypeUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java index 0e2c5577e6a..f99ea685652 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java index 10e71e17005..798da672753 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,24 +76,6 @@ public class ElementUtil { return true; } - /* - public static void validateAllElementsAreOfTypeOrThrowClassCastExceptionForModelSetter(List theList, Class theType) { - if (theList == null) { - return; - } - for (T next : theList) { - if (next != null && theType.isAssignableFrom(next.getClass()) == false) { - StringBuilder b = new StringBuilder(); - b.append("Failed to set invalid value, found element in list of type "); - b.append(next.getClass().getSimpleName()); - b.append(" but expected "); - b.append(theType.getName()); - throw new ClassCastException(b.toString()); - } - } - } - */ - public static boolean isEmpty(List theElements) { if (theElements == null) { return true; @@ -141,8 +123,7 @@ public class ElementUtil { //@SuppressWarnings("unchecked") private static void addElement(ArrayList retVal, IElement next, Class theType) { - //FIXME There seems to be an error on theType == null => if (theType != null|| theType.isAssignableFrom - if (theType == null|| theType.isAssignableFrom(next.getClass())) { + if (theType != null && theType.isAssignableFrom(next.getClass())) { retVal.add(theType.cast(next)); } if (next instanceof ICompositeElement) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java index aa0d8912f39..36996af5798 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java index 2aa0d6ef7cf..786b92afd43 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java @@ -23,7 +23,7 @@ import static org.apache.commons.lang3.StringUtils.*; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -160,7 +160,7 @@ public class FhirTerser { public List getAllPopulatedChildElementsOfType(IBaseResource theResource, final Class theType) { final ArrayList retVal = new ArrayList<>(); BaseRuntimeElementCompositeDefinition def = myContext.getResourceDefinition(theResource); - visit(new IdentityHashMap<>(), theResource, theResource, null, null, def, new IModelVisitor() { + visit(newMap(), theResource, theResource, null, null, def, new IModelVisitor() { @SuppressWarnings("unchecked") @Override public void acceptElement(IBaseResource theOuterResource, IBase theElement, List thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition theDefinition) { @@ -179,7 +179,7 @@ public class FhirTerser { public List getAllResourceReferences(final IBaseResource theResource) { final ArrayList retVal = new ArrayList<>(); BaseRuntimeElementCompositeDefinition def = myContext.getResourceDefinition(theResource); - visit(new IdentityHashMap<>(), theResource, theResource, null, null, def, new IModelVisitor() { + visit(newMap(), theResource, theResource, null, null, def, new IModelVisitor() { @Override public void acceptElement(IBaseResource theOuterResource, IBase theElement, List thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition theDefinition) { if (theElement == null || theElement.isEmpty()) { @@ -793,7 +793,11 @@ public class FhirTerser { */ public void visit(IBaseResource theResource, IModelVisitor theVisitor) { BaseRuntimeElementCompositeDefinition def = myContext.getResourceDefinition(theResource); - visit(new IdentityHashMap<>(), theResource, theResource, null, null, def, theVisitor); + visit(newMap(), theResource, theResource, null, null, def, theVisitor); + } + + public Map newMap() { + return new IdentityHashMap<>(); } /** @@ -814,7 +818,7 @@ public class FhirTerser { visit(theResource, null, def, theVisitor, new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); } - private void visit(IdentityHashMap theStack, IBaseResource theResource, IBase theElement, List thePathToElement, BaseRuntimeChildDefinition theChildDefinition, + private void visit(Map theStack, IBaseResource theResource, IBase theElement, List thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition theDefinition, IModelVisitor theCallback) { List pathToElement = addNameToList(thePathToElement, theChildDefinition); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FileUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FileUtil.java index 2f5e7b06603..c4683e318dc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FileUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FileUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ICallable.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ICallable.java index e4d92532e04..62def3b9380 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ICallable.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ICallable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java index c37fa3960b3..02ca03bd574 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor2.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor2.java index 8f4d25547e0..d36c8d84e07 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor2.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/LogUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/LogUtil.java index 2c6f4268a03..19dca0ed58a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/LogUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/LogUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/MetaUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/MetaUtil.java index fb438fef49f..cd6c9384906 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/MetaUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/MetaUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/NonPrettyPrintWriterWrapper.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/NonPrettyPrintWriterWrapper.java index a91a028c3e7..78d386e41c0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/NonPrettyPrintWriterWrapper.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/NonPrettyPrintWriterWrapper.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ObjectUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ObjectUtil.java index 65b89c2760f..419ef826b7c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ObjectUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ObjectUtil.java @@ -6,7 +6,7 @@ import org.apache.commons.lang3.StringUtils; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java index b51d9a2be5e..f2ed32cf958 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java index 4ec185a8fd9..f4db4b682c2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PrettyPrintWriterWrapper.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PrettyPrintWriterWrapper.java index 7584335bb5c..27d3425a369 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PrettyPrintWriterWrapper.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PrettyPrintWriterWrapper.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java index 20ab85b24b2..c33524dfddf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,31 +19,37 @@ package ca.uhn.fhir.util; * limitations under the License. * #L% */ -import java.lang.reflect.*; + +import ca.uhn.fhir.context.ConfigurationException; +import org.apache.commons.lang3.Validate; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; import java.util.LinkedHashSet; import java.util.List; import java.util.concurrent.ConcurrentHashMap; -import org.apache.commons.lang3.Validate; - -import ca.uhn.fhir.context.ConfigurationException; -import ca.uhn.fhir.context.support.IContextValidationSupport; - public class ReflectionUtil { - private static final ConcurrentHashMap ourFhirServerVersions = new ConcurrentHashMap(); + private static final ConcurrentHashMap ourFhirServerVersions = new ConcurrentHashMap<>(); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ReflectionUtil.class); + public static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; + public static final Class[] EMPTY_CLASS_ARRAY = new Class[0]; public static LinkedHashSet getDeclaredMethods(Class theClazz) { - LinkedHashSet retVal = new LinkedHashSet(); + LinkedHashSet retVal = new LinkedHashSet<>(); for (Method next : theClazz.getDeclaredMethods()) { try { Method method = theClazz.getMethod(next.getName(), next.getParameterTypes()); retVal.add(method); - } catch (NoSuchMethodException e) { - retVal.add(next); - } catch (SecurityException e) { + } catch (NoSuchMethodException | SecurityException e) { retVal.add(next); } } @@ -93,7 +99,7 @@ public class ReflectionUtil { return getGenericCollectionTypeOf(collectionType.getActualTypeArguments()[0]); } - @SuppressWarnings({ "rawtypes" }) + @SuppressWarnings({"rawtypes"}) private static Class getGenericCollectionTypeOf(Type theType) { Class type; if (ParameterizedType.class.isAssignableFrom(theType.getClass())) { @@ -140,43 +146,38 @@ public class ReflectionUtil { public static Object newInstanceOfFhirServerType(String theType) { String errorMessage = "Unable to instantiate server framework. Please make sure that hapi-fhir-server library is on your classpath!"; String wantedType = "ca.uhn.fhir.rest.api.server.IFhirVersionServer"; - return newInstanceOfType(theType, errorMessage, wantedType); + return newInstanceOfType(theType, theType, errorMessage, wantedType, new Class[0], new Object[0]); } - @SuppressWarnings("unchecked") - public static ca.uhn.fhir.context.support.IContextValidationSupport newInstanceOfFhirProfileValidationSupport( - String theType) { - String errorMessage = "Unable to instantiate validation support! Please make sure that hapi-fhir-validation and the appropriate structures JAR are on your classpath!"; - String wantedType = "ca.uhn.fhir.context.support.IContextValidationSupport"; - Object fhirServerVersion = newInstanceOfType(theType, errorMessage, wantedType); - return (IContextValidationSupport) fhirServerVersion; - } - - private static Object newInstanceOfType(String theType, String errorMessage, String wantedType) { - Object fhirServerVersion = ourFhirServerVersions.get(theType); + private static Object newInstanceOfType(String theKey, String theType, String errorMessage, String wantedType, Class[] theParameterArgTypes, Object[] theConstructorArgs) { + Object fhirServerVersion = ourFhirServerVersions.get(theKey); if (fhirServerVersion == null) { try { Class type = Class.forName(theType); Class serverType = Class.forName(wantedType); Validate.isTrue(serverType.isAssignableFrom(type)); - fhirServerVersion = type.newInstance(); + fhirServerVersion = type.getConstructor(theParameterArgTypes).newInstance(theConstructorArgs); } catch (Exception e) { throw new ConfigurationException(errorMessage, e); } - ourFhirServerVersions.put(theType, fhirServerVersion); + ourFhirServerVersions.put(theKey, fhirServerVersion); } return fhirServerVersion; } - @SuppressWarnings("unchecked") public static T newInstanceOrReturnNull(String theClassName, Class theType) { + return newInstanceOrReturnNull(theClassName, theType, EMPTY_CLASS_ARRAY, EMPTY_OBJECT_ARRAY); + } + + @SuppressWarnings("unchecked") + public static T newInstanceOrReturnNull(String theClassName, Class theType, Class[] theArgTypes, Object[] theArgs) { try { Class clazz = Class.forName(theClassName); if (!theType.isAssignableFrom(clazz)) { throw new ConfigurationException(theClassName + " is not assignable to " + theType); } - return (T) clazz.newInstance(); + return (T) clazz.getConstructor(theArgTypes).newInstance(theArgs); } catch (ConfigurationException e) { throw e; } catch (Exception e) { @@ -185,4 +186,12 @@ public class ReflectionUtil { } } + public static boolean typeExists(String theName) { + try { + Class.forName(theName); + return true; + } catch (ClassNotFoundException theE) { + return false; + } + } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ResourceReferenceInfo.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ResourceReferenceInfo.java index e02def86f52..aaf5b7f2afc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ResourceReferenceInfo.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ResourceReferenceInfo.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SearchParameterUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SearchParameterUtil.java index 3d64f283b7f..5195d194c3c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SearchParameterUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SearchParameterUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java index 53ca7e3efb3..ff0d4a091ff 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java @@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SubscriptionUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SubscriptionUtil.java index df2fb672129..24d73a76532 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SubscriptionUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/SubscriptionUtil.java @@ -15,7 +15,7 @@ import java.util.List; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TestUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TestUtil.java index d0c037d942a..19f7d26b434 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TestUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TestUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +112,8 @@ public class TestUtil { * environment */ public static void randomizeLocale() { - Locale[] availableLocales = {Locale.CANADA, Locale.GERMANY, Locale.TAIWAN}; +// Locale[] availableLocales = {Locale.CANADA, Locale.GERMANY, Locale.TAIWAN}; + Locale[] availableLocales = {Locale.US}; Locale.setDefault(availableLocales[(int) (Math.random() * availableLocales.length)]); ourLog.info("Tests are running in locale: " + Locale.getDefault().getDisplayName()); if (Math.random() < 0.5) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlPathTokenizer.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlPathTokenizer.java index 63971c471d9..d3ec1f6d47b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlPathTokenizer.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlPathTokenizer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java index f1d2d855bab..c6c4877ed6b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java @@ -25,7 +25,7 @@ import static org.apache.commons.lang3.StringUtils.*; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ValidateUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ValidateUtil.java index 2826f6db314..461a53b591e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ValidateUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ValidateUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java index 6e088eaa330..5c6b7b9e4ea 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.util; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,9 @@ public enum VersionEnum { V4_0_0, V4_0_3, V4_1_0, - V4_2_0; + V4_2_0, + V4_3_0, // 4.3.0 was renamed to 5.0.0 during the cycle + V5_0_0; public static VersionEnum latestVersion() { VersionEnum[] values = VersionEnum.values(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/VersionIndependentConcept.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionIndependentConcept.java similarity index 83% rename from hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/VersionIndependentConcept.java rename to hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionIndependentConcept.java index a1409bd88b9..abd9643c8e7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/VersionIndependentConcept.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionIndependentConcept.java @@ -1,10 +1,10 @@ -package ca.uhn.fhir.jpa.term; +package ca.uhn.fhir.util; /* * #%L - * HAPI FHIR JPA Server + * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package ca.uhn.fhir.jpa.term; * #L% */ +import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.CompareToBuilder; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; @@ -28,20 +29,30 @@ public class VersionIndependentConcept implements Comparable { + } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseMetaType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseMetaType.java index 8ddb333e125..25c064b1900 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseMetaType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseMetaType.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseOperationOutcome.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseOperationOutcome.java index f68a37d414d..ced96886403 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseOperationOutcome.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseOperationOutcome.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseParameters.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseParameters.java index 4477faef94a..da83e3326df 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseParameters.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseParameters.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseReference.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseReference.java index ef0e0357091..ea662f49b32 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseReference.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseReference.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,4 +34,9 @@ public interface IBaseReference extends ICompositeType { IBase setDisplay(String theValue); IPrimitiveType getDisplayElement(); + + default boolean hasIdentifier() { + return false; + } + } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseResource.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseResource.java index f2756c4f242..06713ccd31b 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseResource.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseResource.java @@ -13,7 +13,7 @@ import ca.uhn.fhir.model.api.Include; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseXhtml.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseXhtml.java index 4d08aa50e38..629859048b0 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseXhtml.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseXhtml.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICompositeType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICompositeType.java index c1df4e86923..8950ee89f57 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICompositeType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICompositeType.java @@ -5,7 +5,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java index c87ad81810c..bdc78257b9b 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java index c5a3fb261db..633a37242c1 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java @@ -6,7 +6,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java index 82aab076ec4..7167acb6819 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java @@ -4,7 +4,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IPrimitiveType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IPrimitiveType.java index 52e032d587f..089aba760e7 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IPrimitiveType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IPrimitiveType.java @@ -5,7 +5,7 @@ package org.hl7.fhir.instance.model.api; * #%L * HAPI FHIR - Core Library * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties index 16ba7a08737..c5b3696974e 100644 --- a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties +++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties @@ -83,6 +83,7 @@ ca.uhn.fhir.jpa.dao.BaseHapiFhirSystemDao.transactionMissingUrl=Unable to perfor ca.uhn.fhir.jpa.dao.BaseHapiFhirSystemDao.transactionInvalidUrl=Unable to perform {0}, URL provided is invalid: {1} ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao.cantValidateWithNoResource=No resource supplied for $validate operation (resource is required unless mode is \"delete\") +ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao.deleteBlockedBecauseDisabled=Resource deletion is not permitted on this server ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao.duplicateCreateForcedId=Can not create entity with ID[{0}], a resource with this ID already exists ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao.failedToCreateWithInvalidId=Can not process entity with ID[{0}], this is not a valid FHIR ID ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao.incorrectResourceType=Incorrect resource type detected for endpoint, found {0} but expected {1} diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/json/JsonLikeStructureTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/json/JsonLikeStructureTest.java index bc120a0e2c6..3b71f8a8840 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/json/JsonLikeStructureTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/json/JsonLikeStructureTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertNotNull; import java.io.StringReader; +import ca.uhn.fhir.parser.json.jackson.JacksonStructure; import org.junit.Test; public class JsonLikeStructureTest { @@ -39,7 +40,7 @@ public class JsonLikeStructureTest { @Test public void testStructureLoading() { StringReader reader = new StringReader(TEST_STRUCTURELOADING_DATA); - JsonLikeStructure jsonStructure = new GsonStructure(); + JsonLikeStructure jsonStructure = new JacksonStructure(); jsonStructure.load(reader); JsonLikeObject rootObject = jsonStructure.getRootObject(); @@ -70,7 +71,7 @@ public class JsonLikeStructureTest { @Test public void testJsonAndDataTypes() { StringReader reader = new StringReader(TEST_JSONTYPES_DATA); - JsonLikeStructure jsonStructure = new GsonStructure(); + JsonLikeStructure jsonStructure = new JacksonStructure(); jsonStructure.load(reader); JsonLikeObject rootObject = jsonStructure.getRootObject(); diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/DateRangeParamTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/DateRangeParamTest.java index 72b03f5b4c9..eb79adb23bf 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/DateRangeParamTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/DateRangeParamTest.java @@ -1,19 +1,18 @@ package ca.uhn.fhir.rest.param; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.List; - import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.api.QualifiedParamList; - import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mockito; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.assertTrue; + @RunWith(JUnit4.class) public class DateRangeParamTest { private FhirContext fhirContext; diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/QualifierDetailsTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/QualifierDetailsTest.java new file mode 100644 index 00000000000..d63b545b74e --- /dev/null +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/QualifierDetailsTest.java @@ -0,0 +1,21 @@ +package ca.uhn.fhir.rest.param; + +import com.google.common.collect.Sets; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class QualifierDetailsTest { + + @Test + public void testBlacklist() { + + QualifierDetails details = new QualifierDetails(); + details.setColonQualifier(":Patient"); + assertFalse(details.passes(null, Sets.newHashSet(":Patient"))); + assertTrue(details.passes(null, Sets.newHashSet(":Observation"))); + + } + + +} diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/util/ReflectionUtilTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/util/ReflectionUtilTest.java index 5742f042135..4ec95c037cc 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/util/ReflectionUtilTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/util/ReflectionUtilTest.java @@ -45,4 +45,10 @@ public class ReflectionUtilTest { assertEquals("Failed to instantiate java.util.List", e.getMessage()); } } + + @Test + public void testTypeExists() { + assertFalse(ReflectionUtil.typeExists("ca.Foo")); + assertTrue(ReflectionUtil.typeExists(String.class.getName())); + } } diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 7911327e69d..2ea38dd0165 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -3,14 +3,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index 53f125ac491..00886f64918 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/AbstractImportExportCsvConceptMapCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/AbstractImportExportCsvConceptMapCommand.java index f78c9ad161d..2cfdd8cdae7 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/AbstractImportExportCsvConceptMapCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/AbstractImportExportCsvConceptMapCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java index f38f52096f7..c74dc9c69bd 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java index 59d94b0b9be..33c36cc8bdb 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java index 3594d922dc4..55b6e3d48a5 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java index 89b3cd36301..2dea0b0585a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java index 415dbaa375d..3f2f6cfc23e 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java index 6fff0d0051c..89a9db47432 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,8 +44,8 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.io.FileUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; import org.hl7.fhir.dstu3.model.Bundle.BundleType; import org.hl7.fhir.dstu3.model.Bundle.HTTPVerb; @@ -54,9 +54,18 @@ import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseResource; -import java.io.*; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -152,7 +161,7 @@ public class ExampleDataUploader extends BaseCommand { bundle.setType(BundleType.TRANSACTION); FhirValidator val = ctx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(new DefaultProfileValidationSupport())); + val.registerValidatorModule(new FhirInstanceValidator(new DefaultProfileValidationSupport(ctx))); ZipInputStream zis = new ZipInputStream(FileUtils.openInputStream(inputFile)); byte[] buffer = new byte[2048]; @@ -236,7 +245,7 @@ public class ExampleDataUploader extends BaseCommand { bundle.setType(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION); FhirValidator val = ctx.newValidator(); - val.registerValidatorModule(new org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator(new org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport())); + val.registerValidatorModule(new FhirInstanceValidator(new DefaultProfileValidationSupport(ctx))); ZipInputStream zis = new ZipInputStream(FileUtils.openInputStream(inputFile)); byte[] buffer = new byte[2048]; @@ -615,7 +624,6 @@ public class ExampleDataUploader extends BaseCommand { } String specUrl; - switch (ctx.getVersion().getVersion()) { case DSTU2: specUrl = "http://hl7.org/fhir/dstu2/examples-json.zip"; diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExportConceptMapToCsvCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExportConceptMapToCsvCommand.java index 110e60e011d..1fc92fc6595 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExportConceptMapToCsvCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExportConceptMapToCsvCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import org.apache.commons.cli.Options; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVPrinter; import org.apache.commons.csv.QuoteMode; -import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.ConceptMap; @@ -43,6 +42,7 @@ import java.util.List; import java.util.concurrent.ExecutionException; import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.hl7.fhir.convertors.conv30_40.ConceptMap30_40.convertConceptMap; public class ExportConceptMapToCsvCommand extends AbstractImportExportCsvConceptMapCommand { // TODO: Don't use qualified names for loggers in HAPI CLI. @@ -114,7 +114,7 @@ public class ExportConceptMapToCsvCommand extends AbstractImportExportCsvConcept private void convertConceptMapToCsv(org.hl7.fhir.dstu3.model.ConceptMap theConceptMap) throws ExecutionException { try { - convertConceptMapToCsv(VersionConvertor_30_40.convertConceptMap(theConceptMap)); + convertConceptMapToCsv(convertConceptMap(theConceptMap)); } catch (FHIRException fe) { throw new ExecutionException(fe); } diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java index 13165207d09..ddfe1226d71 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java index db25491eec1..17ca4c9b26c 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,13 @@ package ca.uhn.fhir.cli; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.igpacks.parser.IgPackParserDstu3; import ca.uhn.fhir.rest.client.api.IGenericClient; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.StructureDefinition; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; @@ -96,7 +96,7 @@ public class IgPackUploader extends BaseCommand { } catch (FileNotFoundException e) { throw new CommandFailureException(e); } - Iterable conformanceResources = ig.fetchAllConformanceResources(ctx); + Iterable conformanceResources = ig.fetchAllConformanceResources(); for (IBaseResource nextResource : conformanceResources) { String nextResourceUrl = ((IPrimitiveType)ctx.newTerser().getSingleValueOrNull(nextResource, "url")).getValueAsString(); ourLog.info("Uploading resource: {}", nextResourceUrl); diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ImportCsvToConceptMapCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ImportCsvToConceptMapCommand.java index f5f1b0f70a2..a795af5510a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ImportCsvToConceptMapCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ImportCsvToConceptMapCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import org.apache.commons.cli.Options; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; -import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; @@ -45,7 +44,10 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutionException; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.hl7.fhir.convertors.conv30_40.ConceptMap30_40.convertConceptMap; public class ImportCsvToConceptMapCommand extends AbstractImportExportCsvConceptMapCommand { // TODO: Don't use qualified names for loggers in HAPI CLI. @@ -154,7 +156,7 @@ public class ImportCsvToConceptMapCommand extends AbstractImportExportCsvConcept private org.hl7.fhir.dstu3.model.ConceptMap convertCsvToConceptMapDstu3() throws ExecutionException { try { - return VersionConvertor_30_40.convertConceptMap(convertCsvToConceptMapR4()); + return convertConceptMap(convertCsvToConceptMapR4()); } catch (FHIRException fe) { throw new ExecutionException(fe); } @@ -174,7 +176,7 @@ public class ImportCsvToConceptMapCommand extends AbstractImportExportCsvConcept .withFirstRecordAsHeader() .withIgnoreHeaderCase() .withIgnoreEmptyLines() - .withTrim()); + .withTrim()) ) { retVal.setUrl(conceptMapUrl); diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java index 434ed4dbef2..52b9df7659a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,20 +20,12 @@ package ca.uhn.fhir.cli; * #L% */ -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; -import org.hl7.fhir.dstu2.model.StructureDefinition; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; - -import java.util.ArrayList; -import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseResource; public class LoadingValidationSupportDstu2 implements IValidationSupport { @@ -43,22 +35,7 @@ public class LoadingValidationSupportDstu2 implements IValidationSupport { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(LoadingValidationSupportDstu2.class); @Override - public List allStructures() { - return new ArrayList<>(); - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public ValueSet fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { + public T fetchResource(Class theClass, String theUri) { String resName = myCtx.getResourceDefinition(theClass).getName(); ourLog.info("Attempting to fetch {} at URL: {}", resName, theUri); @@ -76,13 +53,13 @@ public class LoadingValidationSupportDstu2 implements IValidationSupport { } @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { return false; } @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { - return null; + public FhirContext getFhirContext() { + return myCtx; } } diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java index e425f78187c..25847c89348 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,20 +21,12 @@ package ca.uhn.fhir.cli; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.dstu3.model.ValueSet; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.instance.model.api.IBaseResource; -import java.util.Collections; -import java.util.List; - public class LoadingValidationSupportDstu3 implements IValidationSupport { private FhirContext myCtx = FhirContext.forDstu3(); @@ -43,27 +35,7 @@ public class LoadingValidationSupportDstu3 implements IValidationSupport { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(LoadingValidationSupportDstu3.class); @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { + public T fetchResource(Class theClass, String theUri) { String resName = myCtx.getResourceDefinition(theClass).getName(); ourLog.info("Attempting to fetch {} at URL: {}", resName, theUri); @@ -81,33 +53,8 @@ public class LoadingValidationSupportDstu3 implements IValidationSupport { } @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); + public FhirContext getFhirContext() { + return myCtx; } } diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java index 01610a3f376..4416770676c 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,51 +21,19 @@ package ca.uhn.fhir.cli; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; -import java.util.Collections; -import java.util.List; - -public class LoadingValidationSupportR4 implements org.hl7.fhir.r4.hapi.ctx.IValidationSupport { +public class LoadingValidationSupportR4 implements IValidationSupport { // TODO: Don't use qualified names for loggers in HAPI CLI. private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(LoadingValidationSupportR4.class); private FhirContext myCtx = FhirContext.forR4(); @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { + public T fetchResource(Class theClass, String theUri) { String resName = myCtx.getResourceDefinition(theClass).getName(); ourLog.info("Attempting to fetch {} at URL: {}", resName, theUri); @@ -83,28 +51,9 @@ public class LoadingValidationSupportR4 implements org.hl7.fhir.r4.hapi.ctx.IVal } @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; + public FhirContext getFhirContext() { + return myCtx; } - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSet) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } } diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java index 10bf6784762..0ad0a398ca8 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ToggleSearchParametersCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ToggleSearchParametersCommand.java index fbfdcf0e82b..3e5b24cf0b3 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ToggleSearchParametersCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ToggleSearchParametersCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java index 2cfddadbbdc..6e2fe5f6e8f 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java index 8207748d352..efc48664636 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ package ca.uhn.fhir.cli; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.igpacks.parser.IgPackParserDstu2; import ca.uhn.fhir.igpacks.parser.IgPackParserDstu3; import ca.uhn.fhir.parser.DataFormatException; @@ -28,17 +30,18 @@ import ca.uhn.fhir.parser.LenientErrorHandler; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; -import com.helger.commons.io.file.FileHelper; import com.google.common.base.Charsets; -import org.apache.commons.cli.*; +import com.helger.commons.io.file.FileHelper; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.text.WordUtils; import org.fusesource.jansi.Ansi.Color; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.dstu3.model.StructureDefinition; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IBaseResource; import java.io.File; @@ -46,7 +49,10 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.leftPad; import static org.fusesource.jansi.Ansi.ansi; public class ValidateCommand extends BaseCommand { @@ -151,43 +157,37 @@ public class ValidateCommand extends BaseCommand { if (theCommandLine.hasOption("p")) { switch (ctx.getVersion().getVersion()) { case DSTU2: { - org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator instanceValidator = new org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator(); - val.registerValidatorModule(instanceValidator); - org.hl7.fhir.instance.hapi.validation.ValidationSupportChain validationSupport = new org.hl7.fhir.instance.hapi.validation.ValidationSupportChain( - new org.hl7.fhir.instance.hapi.validation.DefaultProfileValidationSupport()); + ValidationSupportChain validationSupport = new ValidationSupportChain( + new DefaultProfileValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx)); if (igPack != null) { FhirContext hl7orgCtx = FhirContext.forDstu2Hl7Org(); hl7orgCtx.setParserErrorHandler(new LenientErrorHandler(false)); IgPackParserDstu2 parser = new IgPackParserDstu2(hl7orgCtx); - org.hl7.fhir.instance.hapi.validation.IValidationSupport igValidationSupport = parser.parseIg(igPack, igpackFilename); + IValidationSupport igValidationSupport = parser.parseIg(igPack, igpackFilename); validationSupport.addValidationSupport(igValidationSupport); } - if (localProfileResource != null) { - org.hl7.fhir.dstu2.model.StructureDefinition convertedSd = FhirContext.forDstu2Hl7Org().newXmlParser().parseResource(org.hl7.fhir.dstu2.model.StructureDefinition.class, ctx.newXmlParser().encodeResourceToString(localProfileResource)); - instanceValidator.setStructureDefintion(convertedSd); - } if (theCommandLine.hasOption("r")) { - validationSupport.addValidationSupport(new LoadingValidationSupportDstu2()); + validationSupport.addValidationSupport((IValidationSupport) new LoadingValidationSupportDstu2()); } - instanceValidator.setValidationSupport(validationSupport); + FhirInstanceValidator instanceValidator; + instanceValidator = new FhirInstanceValidator(validationSupport); + val.registerValidatorModule(instanceValidator); + break; } case DSTU3: { - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); + FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ctx); val.registerValidatorModule(instanceValidator); - ValidationSupportChain validationSupport = new ValidationSupportChain(new DefaultProfileValidationSupport()); + ValidationSupportChain validationSupport = new ValidationSupportChain(new DefaultProfileValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx)); if (igPack != null) { IgPackParserDstu3 parser = new IgPackParserDstu3(getFhirContext()); IValidationSupport igValidationSupport = parser.parseIg(igPack, igpackFilename); validationSupport.addValidationSupport(igValidationSupport); } - if (localProfileResource != null) { - instanceValidator.setStructureDefintion((StructureDefinition) localProfileResource); - } if (theCommandLine.hasOption("r")) { - validationSupport.addValidationSupport(new LoadingValidationSupportDstu3()); + validationSupport.addValidationSupport((IValidationSupport) new LoadingValidationSupportDstu3()); } instanceValidator.setValidationSupport(validationSupport); break; diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java index 364ba3adc4d..96941a2ec4a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java index 4f84c35b053..7338e7241f3 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cli; * #%L * HAPI FHIR - Command Line Client - API * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/UploadTerminologyCommandTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/UploadTerminologyCommandTest.java index 0cf9e2b5069..2ed94ab0b9b 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/UploadTerminologyCommandTest.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/UploadTerminologyCommandTest.java @@ -118,7 +118,7 @@ public class UploadTerminologyCommandTest extends BaseTest { assertEquals(1, listOfDescriptors.size()); assertEquals("concepts.csv", listOfDescriptors.get(0).getFilename()); String uploadFile = IOUtils.toString(listOfDescriptors.get(0).getInputStream(), Charsets.UTF_8); - assertThat(uploadFile, containsString("CODE,Display")); + assertThat(uploadFile, uploadFile, containsString("\"CODE\",\"Display\"")); } @Test diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateCommandTest.java similarity index 72% rename from hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateCommandTest.java index 082e3254850..1e6bbd71baa 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateCommandTest.java @@ -6,8 +6,8 @@ import org.junit.Test; import static org.junit.Assert.fail; -public class ValidateTest { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidateTest.class); +public class ValidateCommandTest { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidateCommandTest.class); @Before public void before() { @@ -16,7 +16,7 @@ public class ValidateTest { @Test public void testValidateLocalProfile() { - String resourcePath = ValidateTest.class.getResource("/patient-uslab-example1.xml").getFile(); + String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1.xml").getFile(); ourLog.info(resourcePath); App.main(new String[] { @@ -29,7 +29,7 @@ public class ValidateTest { @Test @Ignore public void testValidateUsingIgPackSucceedingDstu2() { - String resourcePath = ValidateTest.class.getResource("/argo-dstu2-observation-good.json").getFile(); + String resourcePath = ValidateCommandTest.class.getResource("/argo-dstu2-observation-good.json").getFile(); ourLog.info(resourcePath); App.main(new String[] { @@ -42,7 +42,7 @@ public class ValidateTest { @Test public void testValidateUsingIgPackFailingDstu2() { - String resourcePath = ValidateTest.class.getResource("/argo-dstu2-observation-bad.json").getFile(); + String resourcePath = ValidateCommandTest.class.getResource("/argo-dstu2-observation-bad.json").getFile(); ourLog.info(resourcePath); try { diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index c1d6985409a..8a2909e342e 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index 45108f849f7..3c58ce3131d 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/CommonConfig.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/CommonConfig.java index 9f928a55e1d..396b572ccb9 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/CommonConfig.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/CommonConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/ContextHolder.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/ContextHolder.java index ac49c36ca9d..cc6d90d990e 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/ContextHolder.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/ContextHolder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java index 3c6e817faa2..ecfcaee81d2 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java index 513b151d8c4..dab96ef9505 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java index a16f46e335c..ed0ce328490 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java index 9d4016113a2..3477274bb5e 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java index 2fce553f18b..6f63fdd5a0e 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.demo; * #%L * HAPI FHIR - Command Line Client - Server WAR * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 792990a296b..af4ea7b909a 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 615e60bbac8..8e81e188d76 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClient.java b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClient.java index c590d0b5209..4eb6deac90d 100644 --- a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClient.java +++ b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClient.java @@ -11,7 +11,7 @@ import org.hl7.fhir.instance.model.api.IBaseBinary; * #%L * HAPI FHIR OkHttp Client * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClientFactory.java b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClientFactory.java index e66b4db742e..f02c748e592 100644 --- a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClientFactory.java +++ b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulClientFactory.java @@ -10,7 +10,7 @@ import java.util.concurrent.TimeUnit; * #%L * HAPI FHIR OkHttp Client * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulRequest.java b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulRequest.java index ba08b22f9aa..8ef7d347f77 100644 --- a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulRequest.java +++ b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulRequest.java @@ -9,7 +9,7 @@ import java.util.Map; * #%L * HAPI FHIR OkHttp Client * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulResponse.java b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulResponse.java index 9f6fd70abe4..d2cd9b66375 100644 --- a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulResponse.java +++ b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/client/OkHttpRestfulResponse.java @@ -14,7 +14,7 @@ import ca.uhn.fhir.rest.api.Constants; * #%L * HAPI FHIR OkHttp Client * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/utils/UrlStringUtils.java b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/utils/UrlStringUtils.java index ff2242024bd..42a3603c8c5 100644 --- a/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/utils/UrlStringUtils.java +++ b/hapi-fhir-client-okhttp/src/main/java/ca/uhn/fhir/okhttp/utils/UrlStringUtils.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.okhttp.utils; * #%L * HAPI FHIR OkHttp Client * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 69e09a3a601..d0bebdfca81 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpClient.java index 036e72a2205..c44788918be 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpRequest.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpRequest.java index faffc926a92..fe45528578d 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpRequest.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpResponse.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpResponse.java index da0f1c17f17..142bf0b9bd4 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpResponse.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheHttpResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheRestfulClientFactory.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheRestfulClientFactory.java index dae5641c504..5e5030c8a71 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheRestfulClientFactory.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ApacheRestfulClientFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,13 +85,11 @@ public class ApacheRestfulClientFactory extends RestfulClientFactory { public HttpClient getNativeHttpClient() { if (myHttpClient == null) { - //FIXME potential resoource leak PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); connectionManager.setMaxTotal(getPoolMaxTotal()); connectionManager.setDefaultMaxPerRoute(getPoolMaxPerRoute()); - // @formatter:off //TODO: Use of a deprecated method should be resolved. RequestConfig defaultRequestConfig = RequestConfig.custom() @@ -114,7 +112,6 @@ public class ApacheRestfulClientFactory extends RestfulClientFactory { } myHttpClient = builder.build(); - // @formatter:on } @@ -128,7 +125,7 @@ public class ApacheRestfulClientFactory extends RestfulClientFactory { /** * Only allows to set an instance of type org.apache.http.client.HttpClient - * @see ca.uhn.fhir.rest.client.api.IRestfulClientFactory#setHttpClient(ca.uhn.fhir.rest.client.api.IHttpClient) + * @see ca.uhn.fhir.rest.client.api.IRestfulClientFactory#setHttpClient(Object) */ @Override public synchronized void setHttpClient(Object theHttpClient) { diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/BaseHttpClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/BaseHttpClient.java index 9e4bb30eed3..502cca318e9 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/BaseHttpClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/BaseHttpClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/GZipContentInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/GZipContentInterceptor.java index 15eea4ef779..f663a30e518 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/GZipContentInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/GZipContentInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ResourceEntity.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ResourceEntity.java index d2a80bec5fc..0fd81feff0d 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ResourceEntity.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/apache/ResourceEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.apache; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java index 82b5d196a5c..9d31bb4ea8a 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -375,6 +375,10 @@ public abstract class BaseClient implements IRestfulClient { } } + if (inputStreamToReturn == null) { + inputStreamToReturn = new ByteArrayInputStream(new byte[]{}); + } + return binding.invokeClient(mimeType, inputStreamToReturn, response.getStatus(), headers); } diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java index 4bc1d17c3d8..4b61dce3b4f 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpResponse.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpResponse.java index fd539a31c01..2aec736aad4 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpResponse.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandler.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandler.java index 51146cd0d47..3bc56468eb5 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandler.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandlerFactory.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandlerFactory.java index 51b75a2a440..9a93c907d80 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandlerFactory.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/ClientInvocationHandlerFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java index f357a627ec3..00141705ceb 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -815,6 +815,12 @@ public class GenericClient extends BaseClient implements IGenericClient { return this; } + @Override + public IHistoryUntyped onType(String theResourceType) { + myType = myContext.getResourceDefinition(theResourceType).getImplementingClass(); + return this; + } + @Override public IHistoryTyped since(Date theCutoff) { if (theCutoff != null) { @@ -1223,6 +1229,12 @@ public class GenericClient extends BaseClient implements IGenericClient { return this; } + @Override + public IOperationUnnamed onType(String theResourceType) { + myType = myContext.getResourceDefinition(theResourceType).getImplementingClass(); + return this; + } + @Override public IOperationProcessMsg processMessage() { myOperationName = Constants.EXTOP_PROCESS_MESSAGE; @@ -1796,11 +1808,8 @@ public class GenericClient extends BaseClient implements IGenericClient { if (rootSs == null) { rootSs = nextSortSpec; } else { - // FIXME lastSs is null never set - // TODO unused assignment lastSs.setChain(nextSortSpec); } - // TODO unused assignment lastSs = nextSortSpec; } if (rootSs != null) { diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/HttpBasicAuthInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/HttpBasicAuthInterceptor.java index 483911ace1e..247984b3c34 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/HttpBasicAuthInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/HttpBasicAuthInterceptor.java @@ -20,7 +20,7 @@ import ca.uhn.fhir.rest.client.api.IGenericClient; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java index 708b27bdef0..a1c70900eeb 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.impl; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java index 2a33b67ec1e..9f6a79b460d 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BasicAuthInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BasicAuthInterceptor.java index db148267f24..f5ca6a60a4a 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BasicAuthInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BasicAuthInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java index e3265e4a428..1bcfc174144 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CapturingInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CapturingInterceptor.java index e275603fb79..ce5aa1452cd 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CapturingInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CapturingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CookieInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CookieInterceptor.java index ac281e217e7..c53e8755ed8 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CookieInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/CookieInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/LoggingInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/LoggingInterceptor.java index a7952a8b6e2..202d587d6bd 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/LoggingInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/LoggingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/SimpleRequestHeaderInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/SimpleRequestHeaderInterceptor.java index 6f3cb84ec10..2c8b77233a6 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/SimpleRequestHeaderInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/SimpleRequestHeaderInterceptor.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/ThreadLocalCapturingInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/ThreadLocalCapturingInterceptor.java index c46cabb8c1b..1b7ade84d25 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/ThreadLocalCapturingInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/ThreadLocalCapturingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/UserInfoInterceptor.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/UserInfoInterceptor.java index 41c209ffd13..7f6ba854230 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/UserInfoInterceptor.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/UserInfoInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.interceptor; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/AtParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/AtParameter.java index 18471efed32..6e12d938f40 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/AtParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/AtParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseHttpClientInvocationWithContents.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseHttpClientInvocationWithContents.java index 802b35a9b04..95b99b94322 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseHttpClientInvocationWithContents.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseHttpClientInvocationWithContents.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseMethodBinding.java index 59893dce8f8..9757fb1375d 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBinding.java index 2172d95e325..0db8644acce 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java index 95c214f2e06..c4f6afb960b 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceParam.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceParam.java index a121e3ef88f..34bc1278b47 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceParam.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseOutcomeReturningMethodBindingWithResourceParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseQueryParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseQueryParameter.java index 44d8a39166a..293025f3df2 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseQueryParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseQueryParameter.java @@ -1,12 +1,25 @@ package ca.uhn.fhir.rest.client.method; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.rest.api.QualifiedParamList; +import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + import static org.apache.commons.lang3.StringUtils.isNotBlank; /* * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,20 +35,6 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #L% */ -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.QualifiedParamList; -import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; - public abstract class BaseQueryParameter implements IParameter { public abstract List encode(FhirContext theContext, Object theObject) throws InternalErrorException; @@ -44,12 +43,6 @@ public abstract class BaseQueryParameter implements IParameter { public abstract RestSearchParameterTypeEnum getParamType(); - /** - * Parameter should return true if {@link #parse(FhirContext, List)} should be called even if the query string - * contained no values for the given parameter - */ - public abstract boolean handlesMissing(); - @Override public void initializeTypes(Method theMethod, Class> theOuterCollectionType, Class> theInnerCollectionType, Class theParameterType) { // ignore for now @@ -57,8 +50,6 @@ public abstract class BaseQueryParameter implements IParameter { public abstract boolean isRequired(); - public abstract Object parse(FhirContext theContext, List theString) throws InternalErrorException, InvalidRequestException; - @Override public void translateClientArgumentIntoQueryArgument(FhirContext theContext, Object theSourceClientArgument, Map> theTargetQueryArguments, IBaseResource theTargetResource) throws InternalErrorException { if (theSourceClientArgument == null) { @@ -79,11 +70,7 @@ public abstract class BaseQueryParameter implements IParameter { String qualifier = nextParamEntry.getQualifier(); String paramName = isNotBlank(qualifier) ? getName() + qualifier : getName(); - List paramValues = theTargetQueryArguments.get(paramName); - if (paramValues == null) { - paramValues = new ArrayList<>(value.size()); - theTargetQueryArguments.put(paramName, paramValues); - } + List paramValues = theTargetQueryArguments.computeIfAbsent(paramName, k -> new ArrayList<>(value.size())); paramValues.add(b.toString()); } diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseResourceReturningMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseResourceReturningMethodBinding.java index 15b5c35cc97..771a123c0d4 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseResourceReturningMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/BaseResourceReturningMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConditionalParamBinder.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConditionalParamBinder.java index b4191e51100..da9a0a37d5b 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConditionalParamBinder.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConditionalParamBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConformanceMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConformanceMethodBinding.java index 4e934f599f2..b77b4bc60ee 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConformanceMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ConformanceMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CountParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CountParameter.java index a52cdb11a83..ad0b4c2e3ed 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CountParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CountParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CreateMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CreateMethodBinding.java index f5aadc7d8e7..3e41a58b9c0 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CreateMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/CreateMethodBinding.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/DeleteMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/DeleteMethodBinding.java index 6f322a8f0a5..00fb4112dd0 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/DeleteMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/DeleteMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ElementsParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ElementsParameter.java index fa65a462cfe..ff223710a51 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ElementsParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ElementsParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HistoryMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HistoryMethodBinding.java index e2c5f4dc9a0..3d485820d30 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HistoryMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HistoryMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpDeleteClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpDeleteClientInvocation.java index 4902c8d2c74..911856bdb9b 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpDeleteClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpDeleteClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpGetClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpGetClientInvocation.java index 0c3fc912451..5e3a5b71114 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpGetClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpGetClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPatchClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPatchClientInvocation.java index ea306ce95d3..ccb1a392919 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPatchClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPatchClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPostClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPostClientInvocation.java index 20e66ead4c1..bd689f1a4b1 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPostClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPostClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPutClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPutClientInvocation.java index 10b948e0b0f..dbee1d45288 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPutClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpPutClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpSimpleGetClientInvocation.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpSimpleGetClientInvocation.java index 8f246402eaf..2908f612ded 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpSimpleGetClientInvocation.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/HttpSimpleGetClientInvocation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandler.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandler.java index 71eddda2009..8f71e37c49c 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandler.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java index 9e023717f14..ac27608fa10 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IParameter.java index 619f8cc3eb0..0494a3755a6 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IRestfulHeader.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IRestfulHeader.java index b069c896773..ed87f53e4d2 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IRestfulHeader.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IRestfulHeader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IncludeParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IncludeParameter.java index 949816c5060..3326cc57558 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IncludeParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IncludeParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,16 +19,23 @@ package ca.uhn.fhir.rest.client.method; * limitations under the License. * #L% */ -import java.util.*; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.rest.annotation.IncludeParam; -import ca.uhn.fhir.rest.api.*; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.QualifiedParamList; +import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; class IncludeParameter extends BaseQueryParameter { @@ -37,11 +44,12 @@ class IncludeParameter extends BaseQueryParameter { private Class mySpecType; private boolean myReverse; + public IncludeParameter(IncludeParam theAnnotation, Class> theInstantiableCollectionType, Class theSpecType) { myInstantiableCollectionType = theInstantiableCollectionType; myReverse = theAnnotation.reverse(); if (theAnnotation.allow().length > 0) { - myAllow = new HashSet(); + myAllow = new HashSet<>(); for (String next : theAnnotation.allow()) { if (next != null) { myAllow.add(next); @@ -61,7 +69,7 @@ class IncludeParameter extends BaseQueryParameter { @SuppressWarnings("unchecked") @Override public List encode(FhirContext theContext, Object theObject) throws InternalErrorException { - ArrayList retVal = new ArrayList(); + ArrayList retVal = new ArrayList<>(); if (myInstantiableCollectionType == null) { if (mySpecType == Include.class) { @@ -105,58 +113,9 @@ class IncludeParameter extends BaseQueryParameter { return null; } - @Override - public boolean handlesMissing() { - return true; - } - @Override public boolean isRequired() { return false; } - @Override - public Object parse(FhirContext theContext, List theString) throws InternalErrorException, InvalidRequestException { - Collection retValCollection = null; - - if (myInstantiableCollectionType != null) { - try { - retValCollection = myInstantiableCollectionType.newInstance(); - } catch (Exception e) { - throw new InternalErrorException("Failed to instantiate " + myInstantiableCollectionType.getName(), e); - } - } - - for (QualifiedParamList nextParamList : theString) { - if (nextParamList.isEmpty()) { - continue; - } - if (nextParamList.size() > 1) { - throw new InvalidRequestException(theContext.getLocalizer().getMessage(IncludeParameter.class, "orIncludeInRequest")); - } - - boolean recurse = Constants.PARAM_INCLUDE_QUALIFIER_RECURSE.equals(nextParamList.getQualifier()); - - String value = nextParamList.get(0); - if (myAllow != null && !myAllow.isEmpty()) { - if (!myAllow.contains(value)) { - if (!myAllow.contains("*")) { - String msg = theContext.getLocalizer().getMessage(IncludeParameter.class, "invalidIncludeNameInRequest", value, new TreeSet(myAllow).toString(), getName()); - throw new InvalidRequestException(msg); - } - } - } - if (myInstantiableCollectionType == null) { - if (mySpecType == String.class) { - return value; - } - return new Include(value, recurse); - } - //FIXME null access - retValCollection.add(new Include(value, recurse)); - } - - return retValCollection; - } - } diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/MethodUtil.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/MethodUtil.java index 1a3bfec5fc9..5042bd0e810 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/MethodUtil.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/MethodUtil.java @@ -1,35 +1,57 @@ package ca.uhn.fhir.rest.client.method; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -import java.io.*; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.util.*; -import java.util.Map.Entry; - -import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.*; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.model.api.*; -import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.context.ConfigurationException; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.Include; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.annotation.*; -import ca.uhn.fhir.rest.api.*; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.PatchTypeEnum; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.SummaryEnum; +import ca.uhn.fhir.rest.api.ValidationModeEnum; import ca.uhn.fhir.rest.client.api.IHttpRequest; import ca.uhn.fhir.rest.client.method.OperationParameter.IOperationParamConverter; import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.param.binder.CollectionBinder; -import ca.uhn.fhir.util.*; +import ca.uhn.fhir.util.DateUtils; +import ca.uhn.fhir.util.ParametersUtil; +import ca.uhn.fhir.util.ReflectionUtil; +import ca.uhn.fhir.util.UrlUtil; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PushbackInputStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; /* * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +67,6 @@ import ca.uhn.fhir.util.*; * #L% */ -@SuppressWarnings("deprecation") public class MethodUtil { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(MethodUtil.class); @@ -288,33 +309,25 @@ public class MethodUtil { specType = parameterType; } - param = new IncludeParameter((IncludeParam) nextAnnotation, instantiableCollectionType, - specType); + param = new IncludeParameter((IncludeParam) nextAnnotation, instantiableCollectionType, specType); } else if (nextAnnotation instanceof ResourceParam) { if (IBaseResource.class.isAssignableFrom(parameterType)) { // good } else if (String.class.equals(parameterType)) { // good - } else if (byte[].class.equals(parameterType)) { - // good - } else if (EncodingEnum.class.equals(parameterType)) { - // good } else { StringBuilder b = new StringBuilder(); b.append("Method '"); b.append(theMethod.getName()); b.append("' is annotated with @"); b.append(ResourceParam.class.getSimpleName()); - b.append(" but has a type that is not an implemtation of "); + b.append(" but has a type that is not an implementation of "); b.append(IBaseResource.class.getCanonicalName()); - b.append(" or String or byte[]"); throw new ConfigurationException(b.toString()); } param = new ResourceParameter(parameterType); } else if (nextAnnotation instanceof IdParam) { param = new NullParameter(); - } else if (nextAnnotation instanceof ServerBase) { - param = new ServerBaseParamBinder(); } else if (nextAnnotation instanceof Elements) { param = new ElementsParameter(); } else if (nextAnnotation instanceof Since) { @@ -345,19 +358,6 @@ public class MethodUtil { } param = new OperationParameter(theContext, Constants.EXTOP_VALIDATE, Constants.EXTOP_VALIDATE_MODE, 0, 1).setConverter(new IOperationParamConverter() { - @Override - public Object incomingServer(Object theObject) { - if (isNotBlank(theObject.toString())) { - ValidationModeEnum retVal = ValidationModeEnum - .forCode(theObject.toString()); - if (retVal == null) { - OperationParameter.throwInvalidMode(theObject.toString()); - } - return retVal; - } - return null; - } - @Override public Object outgoingClient(Object theObject) { return ParametersUtil.createString(theContext, @@ -372,10 +372,6 @@ public class MethodUtil { } param = new OperationParameter(theContext, Constants.EXTOP_VALIDATE, Constants.EXTOP_VALIDATE_PROFILE, 0, 1).setConverter(new IOperationParamConverter() { - @Override - public Object incomingServer(Object theObject) { - return theObject.toString(); - } @Override public Object outgoingClient(Object theObject) { diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/NullParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/NullParameter.java index 3607f691583..00880617446 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/NullParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/NullParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationMethodBinding.java index 22d13e211f8..11bf910a1f2 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationParameter.java index c61306a6607..a56b01acc46 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/OperationParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -191,8 +191,6 @@ public class OperationParameter implements IParameter { interface IOperationParamConverter { - Object incomingServer(Object theObject); - Object outgoingClient(Object theObject); } @@ -203,13 +201,6 @@ public class OperationParameter implements IParameter { Validate.isTrue(mySearchParameterBinding != null); } - @Override - public Object incomingServer(Object theObject) { - IPrimitiveType obj = (IPrimitiveType) theObject; - List paramList = Collections.singletonList(QualifiedParamList.splitQueryStringByCommasIgnoreEscape(null, obj.getValueAsString())); - return mySearchParameterBinding.parse(myContext, paramList); - } - @Override public Object outgoingClient(Object theObject) { IQueryParameterType obj = (IQueryParameterType) theObject; diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PageMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PageMethodBinding.java index 2862e44eb44..6ce41188f15 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PageMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PageMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchMethodBinding.java index bb6b51d3e2b..d18cd1f946b 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchTypeParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchTypeParameter.java index c5ccd17cde4..3201c32bf10 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchTypeParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/PatchTypeParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/RawParamsParmeter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/RawParamsParmeter.java index f8a64828365..749e51444f8 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/RawParamsParmeter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/RawParamsParmeter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java index 724f0e72736..2cef2b42025 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ResourceParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ResourceParameter.java index 2b092c1dc70..c12e5aa0f30 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ResourceParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ResourceParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchMethodBinding.java index dda56f04edf..2649d487655 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchParameter.java index 9ba3c06df02..8c9d1dfbc3c 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SearchParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -156,26 +156,11 @@ public class SearchParameter extends BaseQueryParameter { return myType; } - @Override - public boolean handlesMissing() { - return false; - } - @Override public boolean isRequired() { return myRequired; } - /* - * (non-Javadoc) - * - * @see ca.uhn.fhir.rest.param.IParameter#parse(java.util.List) - */ - @Override - public Object parse(FhirContext theContext, List theString) throws InternalErrorException, InvalidRequestException { - return myParamBinder.parse(theContext, getName(), theString); - } - public void setChainlists(String[] theChainWhitelist) { myQualifierWhitelist = new HashSet<>(theChainWhitelist.length); myQualifierWhitelist.add(QUALIFIER_ANY_TYPE); diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ServerBaseParamBinder.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ServerBaseParamBinder.java deleted file mode 100644 index c5cbaf8c09e..00000000000 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ServerBaseParamBinder.java +++ /dev/null @@ -1,47 +0,0 @@ -package ca.uhn.fhir.rest.client.method; - -/* - * #%L - * HAPI FHIR - Client Framework - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.lang.reflect.Method; -import java.util.*; - -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; - -class ServerBaseParamBinder implements IParameter { - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServerBaseParamBinder.class); - - @Override - public void translateClientArgumentIntoQueryArgument(FhirContext theContext, Object theSourceClientArgument, Map> theTargetQueryArguments, IBaseResource theTargetResource) throws InternalErrorException { - /* - * Does nothing, since we just ignore serverbase arguments - */ - ourLog.trace("Ignoring server base argument: {}", theSourceClientArgument); - } - - @Override - public void initializeTypes(Method theMethod, Class> theOuterCollectionType, Class> theInnerCollectionType, Class theParameterType) { - // ignore for now - } - -} diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceOrAtParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceOrAtParameter.java index ae9010cfa10..3d0443464ab 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceOrAtParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceOrAtParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceParameter.java index cc910296ca6..41835374cba 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SinceParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SortParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SortParameter.java index e99b395a112..e8dea87a694 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SortParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SortParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SummaryEnumParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SummaryEnumParameter.java index 3e8053352eb..aabae7d3b80 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SummaryEnumParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/SummaryEnumParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionMethodBinding.java index f23f35f98dd..52b875a39cd 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionParameter.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionParameter.java index 66e780623c0..ad6fbe1eb78 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionParameter.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/TransactionParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/UpdateMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/UpdateMethodBinding.java index 57f68f5757e..c82354db7b7 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/UpdateMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/UpdateMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ValidateMethodBindingDstu2Plus.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ValidateMethodBindingDstu2Plus.java index 151cfa087b4..24a5fea1d38 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ValidateMethodBindingDstu2Plus.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ValidateMethodBindingDstu2Plus.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.client.method; * #%L * HAPI FHIR - Client Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index cfebc8a9f15..7b00bf29578 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/src/main/java/ca/uhn/hapi/converters/server/VersionedApiConverterInterceptor.java b/hapi-fhir-converter/src/main/java/ca/uhn/hapi/converters/server/VersionedApiConverterInterceptor.java index ebdae1f3e1d..7e2bb24d80c 100644 --- a/hapi-fhir-converter/src/main/java/ca/uhn/hapi/converters/server/VersionedApiConverterInterceptor.java +++ b/hapi-fhir-converter/src/main/java/ca/uhn/hapi/converters/server/VersionedApiConverterInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.converters.server; * #%L * HAPI FHIR - Converter * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,11 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; import org.hl7.fhir.converter.NullVersionConverterAdvisor30; import org.hl7.fhir.converter.NullVersionConverterAdvisor40; -import org.hl7.fhir.convertors.*; +import org.hl7.fhir.convertors.VersionConvertorAdvisor30; +import org.hl7.fhir.convertors.VersionConvertorAdvisor40; +import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.dstu3.model.Resource; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -40,7 +44,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.StringTokenizer; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; /** * This is an experimental interceptor! Use with caution as @@ -54,16 +60,12 @@ import static org.apache.commons.lang3.StringUtils.*; public class VersionedApiConverterInterceptor extends InterceptorAdapter { private final FhirContext myCtxDstu2; private final FhirContext myCtxDstu2Hl7Org; - private VersionConvertor_30_40 myVersionConvertor_30_40; - private VersionConvertor_10_40 myVersionConvertor_10_40; - private VersionConvertor_10_30 myVersionConvertor_10_30; + private final NullVersionConverterAdvisor40 advisor40; + private final NullVersionConverterAdvisor30 advisor30; public VersionedApiConverterInterceptor() { - myVersionConvertor_30_40 = new VersionConvertor_30_40(); - VersionConvertorAdvisor40 advisor40 = new NullVersionConverterAdvisor40(); - myVersionConvertor_10_40 = new VersionConvertor_10_40(advisor40); - VersionConvertorAdvisor30 advisor30 = new NullVersionConverterAdvisor30(); - myVersionConvertor_10_30 = new VersionConvertor_10_30(advisor30); + advisor40 = new NullVersionConverterAdvisor40(); + advisor30 = new NullVersionConverterAdvisor30(); myCtxDstu2 = FhirContext.forDstu2(); myCtxDstu2Hl7Org = FhirContext.forDstu2Hl7Org(); @@ -104,17 +106,17 @@ public class VersionedApiConverterInterceptor extends InterceptorAdapter { IBaseResource converted = null; try { if (wantVersion == FhirVersionEnum.R4 && haveVersion == FhirVersionEnum.DSTU3) { - converted = myVersionConvertor_30_40.convertResource(toDstu3(responseResource), true); + converted = VersionConvertor_30_40.convertResource(toDstu3(responseResource), true); } else if (wantVersion == FhirVersionEnum.DSTU3 && haveVersion == FhirVersionEnum.R4) { - converted = myVersionConvertor_30_40.convertResource(toR4(responseResource), true); + converted = VersionConvertor_30_40.convertResource(toR4(responseResource), true); } else if (wantVersion == FhirVersionEnum.DSTU2 && haveVersion == FhirVersionEnum.R4) { - converted = myVersionConvertor_10_40.convertResource(toR4(responseResource)); + converted = VersionConvertor_10_40.convertResource(toR4(responseResource), advisor40); } else if (wantVersion == FhirVersionEnum.R4 && haveVersion == FhirVersionEnum.DSTU2) { - converted = myVersionConvertor_10_40.convertResource(toDstu2(responseResource)); + converted = VersionConvertor_10_40.convertResource(toDstu2(responseResource), advisor40); } else if (wantVersion == FhirVersionEnum.DSTU2 && haveVersion == FhirVersionEnum.DSTU3) { - converted = myVersionConvertor_10_30.convertResource(toDstu3(responseResource)); + converted = VersionConvertor_10_30.convertResource(toDstu3(responseResource), advisor30); } else if (wantVersion == FhirVersionEnum.DSTU3 && haveVersion == FhirVersionEnum.DSTU2) { - converted = myVersionConvertor_10_30.convertResource(toDstu2(responseResource)); + converted = VersionConvertor_10_30.convertResource(toDstu2(responseResource), advisor30); } } catch (FHIRException e) { throw new InternalErrorException(e); diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor30.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor30.java index 4ef98100c83..e9623fd1e11 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor30.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor30.java @@ -4,7 +4,7 @@ package org.hl7.fhir.converter; * #%L * HAPI FHIR - Converter * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor40.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor40.java index 0d8daecb3ff..5b3cc0613b9 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor40.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor40.java @@ -4,7 +4,7 @@ package org.hl7.fhir.converter; * #%L * HAPI FHIR - Converter * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor50.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor50.java index 41b233f550f..33d703f7a88 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor50.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/converter/NullVersionConverterAdvisor50.java @@ -4,7 +4,7 @@ package org.hl7.fhir.converter; * #%L * HAPI FHIR - Converter * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,12 @@ import org.hl7.fhir.r5.model.Bundle; import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.ValueSet; +import java.util.IdentityHashMap; + public class NullVersionConverterAdvisor50 implements VersionConvertorAdvisor50 { + private IdentityHashMap myCodeSystems = new IdentityHashMap<>(); + @Override public boolean ignoreEntry(Bundle.BundleEntryComponent src) { return false; @@ -56,11 +60,11 @@ public class NullVersionConverterAdvisor50 implements VersionConvertorAdvisor50 @Override public void handleCodeSystem(CodeSystem tgtcs, ValueSet source) throws FHIRException { - + myCodeSystems.put(source, tgtcs); } @Override public CodeSystem getCodeSystem(ValueSet src) throws FHIRException { - return null; + return myCodeSystems.get(src); } } diff --git a/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_10_30Test.java b/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_10_30Test.java index be77cdb8515..a63a0d86344 100644 --- a/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_10_30Test.java +++ b/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_10_30Test.java @@ -16,13 +16,10 @@ public class VersionConvertor_10_30Test { @Test public void testConvert() throws FHIRException { - NullVersionConverterAdvisor30 advisor = new NullVersionConverterAdvisor30(); - VersionConvertor_10_30 converter = new VersionConvertor_10_30(advisor); - org.hl7.fhir.dstu2.model.Observation input = new org.hl7.fhir.dstu2.model.Observation(); input.setEncounter(new org.hl7.fhir.dstu2.model.Reference("Encounter/123")); - org.hl7.fhir.dstu3.model.Observation output = converter.convertObservation(input); + org.hl7.fhir.dstu3.model.Observation output = (Observation) VersionConvertor_10_30.convertResource(input); String context = output.getContext().getReference(); assertEquals("Encounter/123", context); @@ -31,9 +28,6 @@ public class VersionConvertor_10_30Test { @Test public void testConvertSpecimen() throws FHIRException { - NullVersionConverterAdvisor30 advisor = new NullVersionConverterAdvisor30(); - VersionConvertor_10_30 converter = new VersionConvertor_10_30(advisor); - Specimen spec = new Specimen(); CodeableConcept cc = new CodeableConcept(); Coding coding = new Coding(); @@ -58,7 +52,7 @@ public class VersionConvertor_10_30Test { Specimen.SpecimenContainerComponent specimenContainerComponent = new Specimen.SpecimenContainerComponent(); specimenContainerComponent.getExtension().add(new Extension().setUrl("some_url").setValue(new StringType("some_value"))); spec.setContainer(Collections.singletonList(specimenContainerComponent)); - Resource resource = converter.convertResource(spec); + Resource resource = VersionConvertor_10_30.convertResource(spec); } diff --git a/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_14_30Test.java b/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_14_30Test.java index 14fa9db116a..8914d474e01 100644 --- a/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_14_30Test.java +++ b/hapi-fhir-converter/src/test/java/org/hl7/fhir/converter/VersionConvertor_14_30Test.java @@ -3,6 +3,7 @@ package org.hl7.fhir.converter; import static org.junit.Assert.assertEquals; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu3.model.Questionnaire; import org.hl7.fhir.exceptions.FHIRException; import org.junit.Test; @@ -14,7 +15,7 @@ public class VersionConvertor_14_30Test { org.hl7.fhir.dstu2016may.model.Questionnaire input = new org.hl7.fhir.dstu2016may.model.Questionnaire(); input.setTitle("My title"); - org.hl7.fhir.dstu3.model.Questionnaire output = VersionConvertor_14_30.convertQuestionnaire(input); + org.hl7.fhir.dstu3.model.Questionnaire output = (Questionnaire) VersionConvertor_14_30.convertResource(input); String context = output.getTitle(); assertEquals("My title", context); diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 04bb687721d..872836b3024 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 83a317dfd90..532aec8560a 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -73,13 +73,13 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT compile ca.uhn.hapi.fhir hapi-fhir-jpaserver-subscription - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT compile @@ -96,7 +96,7 @@ ca.uhn.hapi.fhir hapi-fhir-testpage-overlay - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT classes diff --git a/hapi-fhir-docs/src/main/java/ChangelogMigrator.java b/hapi-fhir-docs/src/main/java/ChangelogMigrator.java index d3b94ca1a6c..44f01586fcd 100644 --- a/hapi-fhir-docs/src/main/java/ChangelogMigrator.java +++ b/hapi-fhir-docs/src/main/java/ChangelogMigrator.java @@ -2,7 +2,7 @@ * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizationInterceptors.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizationInterceptors.java index 8b93365dd42..c6a1da3a66b 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizationInterceptors.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizationInterceptors.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizingTesterUiClientFactory.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizingTesterUiClientFactory.java index 23fee8d5b54..7d3b31efca8 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizingTesterUiClientFactory.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/AuthorizingTesterUiClientFactory.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/BundleFetcher.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/BundleFetcher.java index df063e1991f..9a1a5f30857 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/BundleFetcher.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/BundleFetcher.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientExamples.java index 381e2ade07e..15a2def45ba 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientTransactionExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientTransactionExamples.java index 4013ede2208..eba05d2577a 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientTransactionExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ClientTransactionExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CompleteExampleClient.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CompleteExampleClient.java index 6f0166355d6..d3d414dc383 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CompleteExampleClient.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CompleteExampleClient.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConsentInterceptors.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConsentInterceptors.java index c3332c09b8e..e9a7ad7c333 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConsentInterceptors.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConsentInterceptors.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConverterExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConverterExamples.java index 82fa6a745b9..0da2042b969 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConverterExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ConverterExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,8 @@ package ca.uhn.hapi.fhir.docs; * #L% */ -import org.hl7.fhir.converter.NullVersionConverterAdvisor30; -import org.hl7.fhir.convertors.VersionConvertor_10_30; -import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.convertors.conv10_30.Observation10_30; +import org.hl7.fhir.convertors.conv14_30.Questionnaire14_30; import org.hl7.fhir.exceptions.FHIRException; public class ConverterExamples { @@ -30,16 +29,12 @@ public class ConverterExamples { @SuppressWarnings("unused") public void c1020() throws FHIRException { //START SNIPPET: 1020 - // Create a converter - NullVersionConverterAdvisor30 advisor = new NullVersionConverterAdvisor30(); - VersionConvertor_10_30 converter = new VersionConvertor_10_30(advisor); - // Create an input resource to convert org.hl7.fhir.dstu2.model.Observation input = new org.hl7.fhir.dstu2.model.Observation(); input.setEncounter(new org.hl7.fhir.dstu2.model.Reference("Encounter/123")); // Convert the resource - org.hl7.fhir.dstu3.model.Observation output = converter.convertObservation(input); + org.hl7.fhir.dstu3.model.Observation output = Observation10_30.convertObservation(input); String context = output.getContext().getReference(); //END SNIPPET: 1020 } @@ -52,7 +47,7 @@ public class ConverterExamples { input.setTitle("My title"); // Convert the resource - org.hl7.fhir.dstu3.model.Questionnaire output = VersionConvertor_14_30.convertQuestionnaire(input); + org.hl7.fhir.dstu3.model.Questionnaire output = Questionnaire14_30.convertQuestionnaire(input); String context = output.getTitle(); //END SNIPPET: 1420 } diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Copier.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Copier.java index fd068294b48..9f6fd993577 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Copier.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Copier.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CustomObservation.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CustomObservation.java index ab481daa1e7..6e60ba1e273 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CustomObservation.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/CustomObservation.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Dstu2Examples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Dstu2Examples.java index c0ca534dfe1..fb6e86a42c4 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Dstu2Examples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Dstu2Examples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleProviders.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleProviders.java index 3e92931cd0d..26659fc1c5c 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleProviders.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleProviders.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulClient.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulClient.java index f913aeee5f2..1fa324d2258 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulClient.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulClient.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulServlet.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulServlet.java index 5279846b8e7..1872c2e3436 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulServlet.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExampleRestfulServlet.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu2.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu2.java index be1f8e6124e..8754655401d 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu2.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +97,7 @@ List resourceExts = patient.getUndeclaredExtensionsByUrl("http://fo // Get all non-modifier extensions regardless of URL List nonModExts = patient.getUndeclaredExtensions(); -//Get all non-modifier extensions regardless of URL +// Get all modifier extensions regardless of URL List modExts = patient.getUndeclaredModifierExtensions(); //END SNIPPET: parseExtension diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu3.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu3.java index c4ee5b03777..959aebf3852 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu3.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ExtensionsDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -150,7 +150,7 @@ List resourceExts = patient.getExtensionsByUrl("http://fooextensions. // Get all non-modifier extensions regardless of URL List nonModExts = patient.getExtension(); -//Get all non-modifier extensions regardless of URL +// Get all modifier extensions regardless of URL List modExts = patient.getModifierExtension(); //END SNIPPET: parseExtension diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirContextIntro.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirContextIntro.java index 858e5c9ff99..c4d85ab0c36 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirContextIntro.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirContextIntro.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirDataModel.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirDataModel.java index f26db207fde..e05b226de54 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirDataModel.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirDataModel.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirTesterConfig.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirTesterConfig.java index 8ef4c7f69ce..60101e6d2b6 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirTesterConfig.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirTesterConfig.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenericClientExample.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenericClientExample.java index 5ba4692de84..29b7a8dba03 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenericClientExample.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenericClientExample.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenomicsUploader.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenomicsUploader.java index 56a3a5aba61..95650a0fdd7 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenomicsUploader.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/GenomicsUploader.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/HttpProxy.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/HttpProxy.java index 737dc86e173..9ac8c602051 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/HttpProxy.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/HttpProxy.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IRestfulClient.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IRestfulClient.java index c4b0b7d77fb..d0067635991 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IRestfulClient.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IRestfulClient.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IncludesExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IncludesExamples.java index 222cd3a57d1..0ef92dfec8d 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IncludesExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/IncludesExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Interceptors.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Interceptors.java index 48ca063e6df..2e16c458cdf 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Interceptors.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Interceptors.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsClient.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsClient.java index 42f9614282f..cf8d6b47152 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsClient.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsClient.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsConformanceProvider.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsConformanceProvider.java index 5cd6efe104d..fd367359203 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsConformanceProvider.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsConformanceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsPatientRestProvider.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsPatientRestProvider.java index d8b1e3e5ff7..b8712d73532 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsPatientRestProvider.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/JaxRsPatientRestProvider.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Multitenancy.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Multitenancy.java index 574a30baddc..de167abc3ca 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Multitenancy.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Multitenancy.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatient.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatient.java index 6525bd6b3af..fcbb8d9a9d9 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatient.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatient.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatientUse.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatientUse.java index a4b095fb641..3ffced4809f 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatientUse.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/MyPatientUse.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Narrative.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Narrative.java index 148486a592e..fa2c5e43868 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Narrative.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Narrative.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/NarrativeGenerator.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/NarrativeGenerator.java index b58d7a8ef14..c9d9c4f7ff7 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/NarrativeGenerator.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/NarrativeGenerator.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingPatientProvider.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingPatientProvider.java index 424dc515381..57e2e19c19a 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingPatientProvider.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingPatientProvider.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingServer.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingServer.java index d31512a4927..afd0a59b8e3 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingServer.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PagingServer.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Parser.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Parser.java index 96ca1fb4a09..44397bb1039 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Parser.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/Parser.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PatchExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PatchExamples.java index f9ef5567e6d..88859a11166 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PatchExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/PatchExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/QuickUsage.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/QuickUsage.java index e7019478b42..61fb368b807 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/QuickUsage.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/QuickUsage.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestCounterInterceptor.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestCounterInterceptor.java index 8de8013fe2e..b5ff7fc9b86 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestCounterInterceptor.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestCounterInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestExceptionInterceptor.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestExceptionInterceptor.java index 1ae8e7f89e7..bce6a1394de 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestExceptionInterceptor.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RequestExceptionInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ResourceRefs.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ResourceRefs.java index 6dda60637c0..9c98c3738f1 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ResourceRefs.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ResourceRefs.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulObservationResourceProvider.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulObservationResourceProvider.java index 27b87b23d92..6bfdf9f2323 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulObservationResourceProvider.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulObservationResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProvider.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProvider.java index 80e4b3afcba..5e96ed1d838 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProvider.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java index cedc60e4318..f7538d05b11 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/SecurityInterceptors.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/SecurityInterceptors.java index dac64329170..f755bec2228 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/SecurityInterceptors.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/SecurityInterceptors.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerETagExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerETagExamples.java index 0c0a9602626..36d02a16ba6 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerETagExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerETagExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerExceptionsExample.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerExceptionsExample.java index f2da47da764..2311a9a9ae7 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerExceptionsExample.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerExceptionsExample.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerInterceptors.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerInterceptors.java index 4d96e6db68b..bc0eff8c7f6 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerInterceptors.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerInterceptors.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,7 @@ List resourceExts = patient.getUndeclaredExtensionsByUrl("http://fo // Get all non-modifier extensions regardless of URL List nonModExts = patient.getUndeclaredExtensions(); -//Get all non-modifier extensions regardless of URL +// Get all modifier extensions regardless of URL List modExts = patient.getUndeclaredModifierExtensions(); //END SNIPPET: parseExtension diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerMetadataExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerMetadataExamples.java index 146ed503db4..f7ecc34fe96 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerMetadataExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerMetadataExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerOperations.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerOperations.java index c3be3f4c78d..d875b866f5e 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerOperations.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServerOperations.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServletExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServletExamples.java index 974355d4572..96803d8bda2 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServletExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ServletExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ package ca.uhn.hapi.fhir.docs; * #L% */ +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.interceptor.*; import ca.uhn.fhir.validation.ResultSeverityEnum; -import org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.springframework.web.cors.CorsConfiguration; import javax.servlet.ServletException; @@ -65,15 +66,17 @@ public class ServletExamples { public class ValidatingServerWithLogging extends RestfulServer { @Override - protected void initialize() throws ServletException { - + protected void initialize() { + FhirContext ctx = FhirContext.forDstu3(); + setFhirContext(ctx); + // ... define your resource providers here ... // Create an interceptor to validate incoming requests RequestValidatingInterceptor requestInterceptor = new RequestValidatingInterceptor(); // Register a validator module (you could also use SchemaBaseValidator and/or SchematronBaseValidator) - requestInterceptor.addValidatorModule(new FhirInstanceValidator()); + requestInterceptor.addValidatorModule(new FhirInstanceValidator(ctx)); requestInterceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); requestInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); @@ -86,7 +89,7 @@ public class ServletExamples { // Create an interceptor to validate responses // This is configured in the same way as above ResponseValidatingInterceptor responseInterceptor = new ResponseValidatingInterceptor(); - responseInterceptor.addValidatorModule(new FhirInstanceValidator()); + responseInterceptor.addValidatorModule(new FhirInstanceValidator(ctx)); responseInterceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); responseInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); responseInterceptor.setResponseHeaderValue("Validation on ${line}: ${message} ${severity}"); diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/TagsExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/TagsExamples.java index 06fcaff9e20..c6b38e141f1 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/TagsExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/TagsExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidateDirectory.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidateDirectory.java index 52cb6910572..e2e4bac7d2f 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidateDirectory.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidateDirectory.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,10 @@ import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.StructureDefinition; import org.hl7.fhir.dstu3.model.ValueSet; @@ -56,9 +56,9 @@ public class ValidateDirectory { IParser xmlParser = ctx.newXmlParser(); IParser jsonParser = ctx.newJsonParser(); - Map structureDefinitions = new HashMap(); - Map codeSystems = new HashMap(); - Map valueSets = new HashMap(); + Map structureDefinitions = new HashMap<>(); + Map codeSystems = new HashMap<>(); + Map valueSets = new HashMap<>(); // Load all profile files for (File nextFile : profileDirectory.listFiles()) { @@ -90,11 +90,11 @@ public class ValidateDirectory { } } - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); + FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ctx); ValidationSupportChain validationSupportChain = new ValidationSupportChain(); - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport()); - validationSupportChain.addValidationSupport(new PrePopulatedValidationSupport(structureDefinitions, valueSets, codeSystems)); + validationSupportChain.addValidationSupport((ca.uhn.fhir.context.support.IValidationSupport) new DefaultProfileValidationSupport(ctx)); + validationSupportChain.addValidationSupport((ca.uhn.fhir.context.support.IValidationSupport) new PrePopulatedValidationSupport(ctx, structureDefinitions, valueSets, codeSystems)); instanceValidator.setValidationSupport(validationSupportChain); diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamples.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamples.java index cbeabb15084..082d278dd86 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamples.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamples.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,22 +21,36 @@ package ca.uhn.hapi.fhir.docs; */ 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.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.server.RestfulServer; -import ca.uhn.fhir.validation.*; +import ca.uhn.fhir.validation.FhirValidator; +import ca.uhn.fhir.validation.IValidatorModule; +import ca.uhn.fhir.validation.SchemaBaseValidator; +import ca.uhn.fhir.validation.SingleValidationMessage; +import ca.uhn.fhir.validation.ValidationResult; import ca.uhn.fhir.validation.schematron.SchematronBaseValidator; import org.apache.commons.io.IOUtils; import org.apache.commons.io.filefilter.WildcardFileFilter; +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.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.RemoteTerminologyServiceValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r4.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.r4.model.ContactPoint; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.OperationOutcome; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.ValueSet; import javax.servlet.ServletException; import java.io.File; @@ -48,27 +62,31 @@ public class ValidatorExamples { public void validationIntro() { // START SNIPPET: validationIntro - FhirContext ctx = FhirContext.forR4(); - - // Ask the context for a validator - FhirValidator validator = ctx.newValidator(); - - // Create a validator modules and register it - IValidatorModule module = new FhirInstanceValidator(); - validator.registerValidatorModule(module); + FhirContext ctx = FhirContext.forR4(); - // Pass a resource in to be validated. The resource can - // be an IBaseResource instance, or can be a raw String - // containing a serialized resource as text. - Patient resource = new Patient(); - ValidationResult result = validator.validateWithResult(resource); - String resourceText = ""; - ValidationResult result2 = validator.validateWithResult(resourceText); - - // The result object now contains the validation results - for (SingleValidationMessage next : result.getMessages()) { - System.out.println(next.getLocationString() + " " + next.getMessage()); - } + // Ask the context for a validator + FhirValidator validator = ctx.newValidator(); + + // Create a validation module and register it + IValidatorModule module = new FhirInstanceValidator(ctx); + validator.registerValidatorModule(module); + + // Pass a resource instance as input to be validated + Patient resource = new Patient(); + resource.addName().setFamily("Simpson").addGiven("Homer"); + ValidationResult result = validator.validateWithResult(resource); + + // The input can also be a raw string (this mechanism can + // potentially catch syntax issues that would have been missed + // otherwise, since the HAPI FHIR Parser is forgiving about + // its input. + String resourceText = ""; + ValidationResult result2 = validator.validateWithResult(resourceText); + + // The result object now contains the validation results + for (SingleValidationMessage next : result.getMessages()) { + System.out.println(next.getLocationString() + " " + next.getMessage()); + } // END SNIPPET: validationIntro } @@ -177,9 +195,16 @@ public class ValidatorExamples { // START SNIPPET: instanceValidator FhirContext ctx = FhirContext.forR4(); + // Create a validation support chain + ValidationSupportChain validationSupportChain = new ValidationSupportChain( + new DefaultProfileValidationSupport(ctx), + new InMemoryTerminologyServerValidationSupport(ctx), + new CommonCodeSystemsTerminologyService(ctx) + ); + // Create a FhirInstanceValidator and register it to a validator FhirValidator validator = ctx.newValidator(); - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); + FhirInstanceValidator instanceValidator = new FhirInstanceValidator(validationSupportChain); validator.registerValidatorModule(instanceValidator); /* @@ -229,75 +254,56 @@ public class ValidatorExamples { // Create a FhirInstanceValidator and register it to a validator FhirValidator validator = ctx.newValidator(); - FhirInstanceValidator instanceValidator = new FhirInstanceValidator(); + FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ctx); validator.registerValidatorModule(instanceValidator); - - IValidationSupport valSupport = new IValidationSupport() { + + IValidationSupport valSupport = new IValidationSupport() { @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { + public List fetchAllConformanceResources() { // TODO: implement (or return null if your implementation does not support this function) return null; } @Override - public List fetchAllConformanceResources(FhirContext theContext) { + public ValueSet fetchValueSet(String theSystem) { // TODO: implement (or return null if your implementation does not support this function) return null; } @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { + public T fetchResource(Class theClass, String theUri) { // TODO: implement (or return null if your implementation does not support this function) return null; } @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { + public StructureDefinition fetchStructureDefinition(String theUrl) { // TODO: implement (or return null if your implementation does not support this function) return null; } @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - // TODO: implement (or return null if your implementation does not support this function) - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - // TODO: implement (or return null if your implementation does not support this function) - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - // TODO: implement (or return null if your implementation does not support this function) - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { // TODO: implement (or return null if your implementation does not support this function) return false; } @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, 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 CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { // TODO: implement (or return null if your implementation does not support this function) return null; } @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - // TODO: implement (or return null if your implementation does not support this function) - return null; + public FhirContext getFhirContext() { + return ctx; } }; @@ -309,7 +315,7 @@ public class ValidatorExamples { * which loads the default HL7 versions. Any StructureDefinitions which are not found in * the built-in set are delegated to your custom implementation. */ - ValidationSupportChain support = new ValidationSupportChain(new DefaultProfileValidationSupport(), valSupport); + ValidationSupportChain support = new ValidationSupportChain(new DefaultProfileValidationSupport(ctx), valSupport); instanceValidator.setValidationSupport(support); // END SNIPPET: instanceValidatorCustom @@ -325,33 +331,72 @@ public class ValidatorExamples { // START SNIPPET: validateSupplyProfiles FhirContext ctx = FhirContext.forR4(); - // Create a PrePopulatedValidationSupport and load it with our custom structures - PrePopulatedValidationSupport prePopulatedSupport = new PrePopulatedValidationSupport(); + // Create a chain that will hold our modules + ValidationSupportChain supportChain = new ValidationSupportChain(); + // DefaultProfileValidationSupport supplies base FHIR definitions. This is generally required + // even if you are using custom profiles, since those profiles will derive from the base + // definitions. + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(ctx); + supportChain.addValidationSupport(defaultSupport); + + // Create a PrePopulatedValidationSupport which can be used to load custom definitions. // In this example we're loading two things, but in a real scenario we might // load many StructureDefinitions, ValueSets, CodeSystems, etc. + PrePopulatedValidationSupport prePopulatedSupport = new PrePopulatedValidationSupport(ctx); prePopulatedSupport.addStructureDefinition(someStructureDefnition); prePopulatedSupport.addValueSet(someValueSet); - - // We'll still use DefaultProfileValidationSupport since derived profiles generally - // rely on built-in profiles also being available - DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(); - - // We'll create a chain that includes both the pre-populated and default. We put - // the pre-populated (custom) support module first so that it takes precedence - ValidationSupportChain supportChain = new ValidationSupportChain(); supportChain.addValidationSupport(prePopulatedSupport); - supportChain.addValidationSupport(defaultSupport); + + // Wrap the chain in a cache to improve performance + CachingValidationSupport cache = new CachingValidationSupport(supportChain); // Create a validator using the FhirInstanceValidator module. We can use this // validator to perform validation - FhirInstanceValidator validatorModule = new FhirInstanceValidator(supportChain); + FhirInstanceValidator validatorModule = new FhirInstanceValidator(cache); FhirValidator validator = ctx.newValidator().registerValidatorModule(validatorModule); ValidationResult result = validator.validateWithResult(input); // END SNIPPET: validateSupplyProfiles } - + + + public void validateUsingRemoteTermServer() { + + StructureDefinition someStructureDefnition = null; + ValueSet someValueSet = null; + String input = null; + + // START SNIPPET: validateUsingRemoteTermSvr + FhirContext ctx = FhirContext.forR4(); + + // Create a chain that will hold our modules + ValidationSupportChain supportChain = new ValidationSupportChain(); + + // DefaultProfileValidationSupport supplies base FHIR definitions. This is generally required + // even if you are using custom profiles, since those profiles will derive from the base + // definitions. + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(ctx); + supportChain.addValidationSupport(defaultSupport); + + // Create a module that uses a remote terminology service + RemoteTerminologyServiceValidationSupport remoteTermSvc = new RemoteTerminologyServiceValidationSupport(ctx); + remoteTermSvc.setBaseUrl("http://hapi.fhir.org/baseR4"); + supportChain.addValidationSupport(remoteTermSvc); + + // Wrap the chain in a cache to improve performance + CachingValidationSupport cache = new CachingValidationSupport(supportChain); + + // Create a validator using the FhirInstanceValidator module. We can use this + // validator to perform validation + FhirInstanceValidator validatorModule = new FhirInstanceValidator(cache); + FhirValidator validator = ctx.newValidator().registerValidatorModule(validatorModule); + ValidationResult result = validator.validateWithResult(input); + // END SNIPPET: validateUsingRemoteTermSvr + + } + + @SuppressWarnings("unused") private static void validateFiles() throws Exception { // START SNIPPET: validateFiles diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamplesDstu3.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamplesDstu3.java index ee1df29d4f7..835bcd28cba 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamplesDstu3.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/ValidatorExamplesDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,9 @@ package ca.uhn.hapi.fhir.docs; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.validation.FhirValidator; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; public class ValidatorExamplesDstu3 { @@ -43,7 +43,7 @@ public class ValidatorExamplesDstu3 { // FhirInstanceValidator is the validation module that handles // profile validation. So, create an InstanceValidator module // and register it to the validator. - FhirInstanceValidator instanceVal = new FhirInstanceValidator(); + FhirInstanceValidator instanceVal = new FhirInstanceValidator(ctx); validator.registerValidatorModule(instanceVal); // FhirInstanceValidator requires an instance of "IValidationSupport" in @@ -59,7 +59,7 @@ public class ValidatorExamplesDstu3 { // the DefaultProfileValidationSupport, which supplies the "built-in" FHIR // StructureDefinitions and ValueSets ValidationSupportChain validationSupportChain = new ValidationSupportChain(); - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport()); + validationSupportChain.addValidationSupport((ca.uhn.fhir.context.support.IValidationSupport) new DefaultProfileValidationSupport(ctx)); instanceVal.setValidationSupport(validationSupportChain); // END SNIPPET: validateFiles diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomCompositeExtension.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomCompositeExtension.java index a8c84564ae1..c4043878d54 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomCompositeExtension.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomCompositeExtension.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs.customtype; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomDatatype.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomDatatype.java index 6bed4d16585..353949419d2 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomDatatype.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomDatatype.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs.customtype; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomResource.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomResource.java index 4933b019fa7..6413299a34b 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomResource.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomResource.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs.customtype; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomUsage.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomUsage.java index 8aa4e1508e9..fe08573cb97 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomUsage.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/customtype/CustomUsage.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs.customtype; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/interceptor/MyTestInterceptor.java b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/interceptor/MyTestInterceptor.java index c671fe2f0d1..829b6f63245 100644 --- a/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/interceptor/MyTestInterceptor.java +++ b/hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/interceptor/MyTestInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.hapi.fhir.docs.interceptor; * #%L * HAPI FHIR - Docs * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/atlas/points.json b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/atlas/points.json index 17941e298e7..ad2a8e17898 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/atlas/points.json +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/atlas/points.json @@ -225,17 +225,6 @@ "lon": -3.6840, "added": "2019-09-29" }, - { - "title": "ResMed", - "description": "Digital Health Technologies: The largest tele-monitored device fleet in the world. Focus on various respiratory diseases from Sleep Disordered breathing (sleep apnea) to COPD.", - "link": null, - "contactName": null, - "contactEmail": null, - "city": "San Diego, California", - "lat": 32.8246, - "lon": -117.1971, - "added": "2019-09-29" - }, { "title": "Highmark", "description": "FHIR-based Provider Directory Message Model: Using R4 FHIR we created a standard provider directory message model that captures all practitioners, practitioner roles, vendors, vendor roles, locations, healthcare services, affiliated directory networks and tiered insurance plans. We supply this FHIR-based extract to a well-known transparency vendor whom processes our FHIR message model extract and loads the data to be consumed and accessed on a web-based provider search application. Members can then access this provider search app to search for practitioners whom participate in their products and networks.", @@ -304,6 +293,48 @@ "lat": -6.914744, "lon": 107.609810, "added": "2019-11-22" + }, + { + "title": "Ivido", + "description": "Revolutionary personal healthcare environment", + "link": "https://ivido.nl/", + "contactName": "Jari Maijenburg", + "contactEmail": "info@ivido.nl", + "city": "The Hague, The Netherlands", + "lat": 52.070499, + "lon": 4.300700, + "added": "2019-12-18" + }, + { + "title": "CDSS for EHR", + "description": "\"Hospital Italiano de Buenos Aires\", founded in 1853, is a non-profit civil association dedicated to general and highly complex medicine.", + "link": null, + "contactName": "Natalia Pérez López", + "contactEmail": "natalia.perez@hospitalitaliano.org.ar", + "city": "Buenos Aires, Argentina", + "lat": -34.603683, + "lon": -58.381557, + "added": "2019-12-27" + }, + { + "title": "German Society for Wound Healing and Wound Treatment", + "description": "Establishment of regional registers based on HAPI FHIR for the global exchange of health data/eHealth Ressort of the DGfW e.V.: As the eHealth department of the DGfW e.V. we are looking for partners with whom we can jointly develop projects based on open standards for the national and global exchange of health information in the field of chronic wound care. In this context, we rely on open standards such as HAPI FHIR. In one of our latest projects \"EsmAiL\" we use HAPI FHIR together with the synaptor medical collaboration platform.", + "contactName": "Falk Huneke", + "link": "http://www.dgfw.de/akneinversa.html", + "city": "Germany", + "lat": 51.165691, + "lon": 10.451526 + }, + { + "title": "VEIG", + "description": "Vietnam Ehealth Innovation Group", + "link": "http://emr.com.vn", + "contactName": "Nguyen Hai Phong", + "contactEmail": "haiphong.nguyen@gmail.com", + "city": "Hanoi,Vietnam", + "lat": 21.026058, + "lon": 105.822715, + "added": "2020-03-06" } ] diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1671-expunge-with-no-tags.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1671-expunge-with-no-tags.yaml new file mode 100644 index 00000000000..599169b1bec --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1671-expunge-with-no-tags.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 1671 +title: When performing the $expunge operation in the JPA server, the operation sometimes failed if a + resource being expunged had historical versions that did not contain any tags. This has been corrected. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1675-copy-identifiers-to-placeholder.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1675-copy-identifiers-to-placeholder.yaml new file mode 100644 index 00000000000..df80a4ff2f4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1675-copy-identifiers-to-placeholder.yaml @@ -0,0 +1,5 @@ +--- +type: add +title: "In the JPA server, a new setting called `setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(boolean)` has + been added to the DaoConfig. If this setting is enabled, when creating placeholder resources, the Reference.identifier + value is copied to the target resource if possible." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1676-allow-schemalocation-when-validating.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1676-allow-schemalocation-when-validating.yaml new file mode 100644 index 00000000000..81c38293e40 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1676-allow-schemalocation-when-validating.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 1676 +title: "When validating an XML resource, the validatin failed if the resource contained an + `xsi:schemaLocation` declaration. This has been corrected. Thanks to Brian Kaney for reporting!" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1679-delta-migrators-no-transient-fields.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1679-delta-migrators-no-transient-fields.yaml new file mode 100644 index 00000000000..19d00ad50be --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1679-delta-migrators-no-transient-fields.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 1679 +title: "An issue with the new flyway migrator hashCode generation was resolved. + Thanks to Jafer Khan for the pull request!" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1692-resource-methods-on-interfaces.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1692-resource-methods-on-interfaces.yaml new file mode 100644 index 00000000000..de3bcf45597 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/1692-resource-methods-on-interfaces.yaml @@ -0,0 +1,6 @@ +--- +type: add +issue: 1694 +title: It is now possible to specify resource provider method annotations on interface methods implemented by + resource provider classes, as opposed to needing to specify them directly on the concrete class. Thanks + to Tue Toft Nørgård for the pull request! diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/981-support-count-zero.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/981-support-count-zero.yaml new file mode 100644 index 00000000000..fb7869f56e1 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/981-support-count-zero.yaml @@ -0,0 +1,5 @@ +--- +type: add +issue: 981 +title: "Support has been added to the server (plain and JPA) for querying with + `_count=0` as a URL parameter." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/changes.yaml index 88cfd8b634f..f2227e14ecd 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/changes.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/changes.yaml @@ -5,6 +5,7 @@ (dependent HAPI modules listed in brackets):
  • Jetty (CLI): 9.4.14.v20181114 -> 9.4.23.v20191118
  • +
  • Spring (JPA, Testpage): 5.2.1 -> 5.2.3 (addresses CVE-2020-5398 and CVE-2020-5397)
" - item: issue: "1583" @@ -41,13 +42,56 @@ type: "fix" title: "A missing mandatory was added to the SNOMED CT CodeSystem that is uploaded when SCT is uploaded to the JPA server. Thanks to Anders Havn for the pull request!" - item: - issue: 1643 - type: fix + issue: "1643" + type: "fix" title: "When validating resources containing custom valuesets defined in PrePopulatedValidationSupport outside of the JPA server, sometimes code systems could not be found resulting in false negative errors." - item: - issue: 1588 - type: add + issue: "1588" + type: "add" title: "Support for several new operators has been added to the `_filter` support in the JPA server. Thanks - to Anthony Sute for the Pull Request! + to Anthony Sute for the Pull Request!" +- item: + issue: "1650" + type: "fix" + title: "Several misleading comments in documentation code snippets were fixed. Thanks to + Jafer Khan for the pull request!" +- item: + issue: "1603" + type: "fix" + title: "The client threw a NullPointerException in some circumstances when it received an HTTP 201 No Content response from the server. This has been corrected. Thanks to Petro Mykhailysyn for the pull request!" +- item: + issue: "1649" + type: "add" + title: "Support for LOINC 2.67 file format changes has been added to the JPA Server LOINC uploader. Thanks to Dan Vreeman for reporting!" +- item: + issue: "1660" + type: "perf" + title: "A significant performance improvement was added to the Json and XML parsers when parsing large Bundle + resources. Throughput for parsing these resources has been improved by roughly 50%. Thanks to Rok Bertoncelj + and Bogdan Solga for providing analysis and insight that triggered this change." +- item: + issue: "1658" + type: "fix" + title: "When parsing HTML Narratives, the `lang` attribute was stripped from the outer DIV tag if present. Thanks to + Sean McIlvenna for reporting!" +- item: + issue: "1655" + type: "fix" + title: "When using a custom structure that changes the cardinality from 0..* to 0..1, the Parser was encoding + a plain field instead of an array (as required by the FHIR specification). Thanks to + Petro Mykhailysyn for the pull request!" +- item: + type: "fix" + title: "A memory leak was resolved in the JPA terminology service delta upload operations." +- item: + type: "fix" + issue: 1689 + title: "A correction was made to the narrative generation documentation. Thanks to GitHub user + dionmcm for the pull request!" +- item: + type: "add" + title: "Searching Location.position by latitude, longitude and distance for DSTU3, R4 and R5 is now supported using a simple 'box' search. + Locations falling within a box with length and width of 2 * distance, centred on specified latitude,longitude are matched. If no distance + is provided, the coordinates must match exactly." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/version.yaml index a01f7a1402d..f4ba414d4ac 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/version.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_2_0/version.yaml @@ -1,2 +1,3 @@ --- -release-date: "TBD" +release-date: "2020-02-15" +codename: "Koala" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1693-forcedid-circular-dependency.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1693-forcedid-circular-dependency.yaml new file mode 100644 index 00000000000..97cd25103b9 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1693-forcedid-circular-dependency.yaml @@ -0,0 +1,5 @@ +--- +type: change +issue: 1693 +title: Adjusted schema definitions for Resource and Resource History tables to eliminate circular + dependencies with Forced ID table and to improve performance when expunging large numbers of resources. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1702-includes-perf-fix.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1702-includes-perf-fix.yaml new file mode 100644 index 00000000000..bc53ca0a098 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1702-includes-perf-fix.yaml @@ -0,0 +1,4 @@ +--- +type: perf +issue: 1702 +title: "Loading of _include and _revinclude values has been optimized to be slightly faster" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1715-update-converters.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1715-update-converters.yaml new file mode 100644 index 00000000000..874c6fe3520 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1715-update-converters.yaml @@ -0,0 +1,6 @@ +--- +type: change +issue: 1715 +title: The version converters for all versions except R4/R5 have been reworked to be split into individual + classes per resource type (the R4/R5 converters were already organized this way). Thanks to Mark Iantorno + for a huge effort to write a Java source parser/serializer to acomplish this task. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1717-avoid-multiterm-in-es.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1717-avoid-multiterm-in-es.yaml new file mode 100644 index 00000000000..d9c363e48ee --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1717-avoid-multiterm-in-es.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1717 +title: ValueSet expansions containing lists of terms did not correctly expand when backed by + ElasticSearch due to the use of a feature not supported in ES. Thanks to Jens Villadsen for + reporting! diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1721-dont-thrash-delta-links.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1721-dont-thrash-delta-links.yaml new file mode 100644 index 00000000000..7099817d526 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1721-dont-thrash-delta-links.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1721 +title: When performing a terminology delta ADD operation, existing parent-child links were often + deleted and recrreated needlessly during operations, which could result in a deadlock. This has + been resolved. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1726-collapse-date-joins.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1726-collapse-date-joins.yaml new file mode 100644 index 00000000000..584b5dd2b63 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1726-collapse-date-joins.yaml @@ -0,0 +1,6 @@ +--- +type: perf +issue: 1726 +title: When performing date range searches in the JPA server, the server was generating extra + unneccessary joins in the generated SQL. This has been streamlined, which should result in + faster searches when performing date ranges. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1728-index-canonical.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1728-index-canonical.yaml new file mode 100644 index 00000000000..5970f650a52 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1728-index-canonical.yaml @@ -0,0 +1,5 @@ +--- +type: add +issue: 1728 +title: "Fields of type `canonical` were not previously indexed by the JPA server, meaning that some + default search parameters could not be honoured (e.g. StructureDefinition:valueset). This is now corrected." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1732-remove-deleted-from-results.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1732-remove-deleted-from-results.yaml new file mode 100644 index 00000000000..070819f9846 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1732-remove-deleted-from-results.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1732 +title: In the JPA server, quickly deleting a resource and then performing a query that had recently returned that + search result could cause a cached stub resource (containing no data but with an ID and metadata populated) to + be returned. This has been corrected. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1736-defer-large-terminology-delta-adds.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1736-defer-large-terminology-delta-adds.yaml new file mode 100644 index 00000000000..ba7d3a1f7df --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1736-defer-large-terminology-delta-adds.yaml @@ -0,0 +1,7 @@ +--- +type: add +issue: 1736 +title: When performing large terminology concept additions via the delta addition service, concepts will + now be added via the deferred storage service, meaning that they will be added in small incremental batches + instead of as a part of one large transaction. This helps to avoid timeouts and memory issues when uploading + large collections of concepts. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-error-on-missing-profile-validation.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-error-on-missing-profile-validation.yaml new file mode 100644 index 00000000000..c468181274e --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-error-on-missing-profile-validation.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1742 +title: "When validating a resource, the validator will now report an error if the resource declares conformance + to an unknown or invalid profile URL via the `Resource.meta.profile` declaration. Previously this was a warning + and did not block successful validation." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-limit-type-on-has.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-limit-type-on-has.yaml new file mode 100644 index 00000000000..4397032c2aa --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-limit-type-on-has.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1742 +title: "When performing a search in the JPA server where the only parameter was a `_has` parameter, + the server did not respect the resource typename being searched for, causing false positive + search results. This has been corrected." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-terminology-delta-defer.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-terminology-delta-defer.yaml new file mode 100644 index 00000000000..bdc0dff48f5 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1742-terminology-delta-defer.yaml @@ -0,0 +1,6 @@ +--- +type: add +issue: 1742 +title: When performing a terminology delta ADD operation, if the number of codes being added is large + the codes will be added in small batches via an asynchronous scheduled task in order to avoid overwhelming + the database with a large operation. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1759-efficiency-in-search-deleting.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1759-efficiency-in-search-deleting.yaml new file mode 100644 index 00000000000..745fd4e241d --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1759-efficiency-in-search-deleting.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 1759 +title: When deleting searches from the query cache where a large number of searches with a large + number of results were present, the system would repeatedly mark the same rows as deletion + candidates. This put unneccessary pressure on the database and has been corrected. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1760-support-chained-parameters-in-has.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1760-support-chained-parameters-in-has.yaml new file mode 100644 index 00000000000..bf22058eab4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1760-support-chained-parameters-in-has.yaml @@ -0,0 +1,9 @@ +--- +type: add +issue: 1760 +title: "Adds support for chained parameters in a _has query. For example + `GET /Patient?_has:Observation:subject:device.identifier=1234-5`. Adds a performance warning on any queries that use + an unqualified resource in a chain which ends up resolving to 2 or more candidate target types. Thanks to Jean-Francois Briere + for the patch." + + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1761-avoid-duplicate_restype.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1761-avoid-duplicate_restype.yaml new file mode 100644 index 00000000000..20530d9b926 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/1761-avoid-duplicate_restype.yaml @@ -0,0 +1,7 @@ +--- +type: fix +issue: 1761 +title: "A minor regression in 4.2.0 was introduced, where JPA searches using the `_id` search parameter often had + a duplicate SQL predicate in their where clause. This issue may not have caused any bad effects on some environments, + but it did look strange in SQL logs and has been corrected." + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/changes.yaml new file mode 100644 index 00000000000..aa375e46680 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/changes.yaml @@ -0,0 +1,19 @@ +--- +- item: + type: "add" + title: "The version of a few dependencies have been bumped to the latest versions + (dependent HAPI modules listed in brackets): +
    +
  • Hibernate ORM (JPA): 5.4.6 -> 5.4.12
  • +
  • Hibernate Search (JPA): 5.11.3 -> 5.11.5
  • +
" +- item: + issue: "1583" + type: "fix" + title: "**Breaking Change**: + The HAPI FHIR Validation infrastructure has changed significantly under the hood. Existing users of the + validator may need to change package declarations (as FhirInstanceValidator and several other related classes + have been moved) and potentially add new modules to their Validation Support Chain. See + [Migrating to HAPI FHIR 5.x](/hapi-fhir/docs/validation/instance_validator.html#migrating-to-hapi-fhir-5x) + for details on how to account for this change in your code. + " diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/near-chain.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/near-chain.yaml new file mode 100644 index 00000000000..64c83acf7ad --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/4_3_0/near-chain.yaml @@ -0,0 +1,4 @@ +--- +type: fix +title: "DSTU3 searches using near-distance only worked on Location resources directly. It now works on chained searches on resources with a location. +E.g. PractitionerRole?location.near-distance=1.0 now works properly." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties index 4d18cc6cac4..a4f099499ce 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/files.properties @@ -42,6 +42,8 @@ page.server_jpa.introduction=Introduction page.server_jpa.get_started=Get Started ⚡ page.server_jpa.architecture=Architecture page.server_jpa.configuration=Configuration +page.server_jpa.search=Search +page.server_jpa.performance=Performance page.server_jpa.upgrading=Upgrade Guide section.interceptors.title=Interceptors @@ -63,7 +65,8 @@ page.security.cors=CORS section.validation.title=Validation page.validation.introduction=Introduction page.validation.parser_error_handler=Parser Error Handler -page.validation.profile_validator=Profile Validator +page.validation.instance_validator=Instance Validator +page.validation.validation_support_modules=Validation Support Modules page.validation.schema_validator=Schema/Schematron Validator page.validation.examples=Validation Examples diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/images/validation-support-chain.svg b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/images/validation-support-chain.svg new file mode 100644 index 00000000000..9c0ebe986bd --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/images/validation-support-chain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/interceptors/built_in_server_interceptors.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/interceptors/built_in_server_interceptors.md index a482abbc947..6c166e8cce9 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/interceptors/built_in_server_interceptors.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/interceptors/built_in_server_interceptors.md @@ -65,7 +65,7 @@ The RequestValidatingInterceptor looks at resources coming into the server (e.g. These interceptors can be configured to add headers to the response, fail the response (returning an HTTP 422 and throwing an exception in the process), or to add to the OperationOutcome returned by the server. -See [Profile Validator](/docs/validation/profile_validator.html) for information on how validation works in HAPI FHIR. +See [Instance Validator](/docs/validation/instance_validator.html) for information on how validation works in HAPI FHIR. The following example shows how to register this interceptor within a HAPI FHIR REST server. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/introduction/versions.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/introduction/versions.md index 3f2e6726429..27e2f13f6a8 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/introduction/versions.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/introduction/versions.md @@ -25,6 +25,16 @@ Note also that after the release of the FHIR DSTU2 specification, the FHIR + + HAPI FHIR 4.2.0-SNAPSHOT + JDK8 + + 1.0.2 + 1.4.0 + 3.0.2 + 4.0.1 + 4.2.0
e0f3f5cc2c
+ HAPI FHIR 4.1.0 JDK8 diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/model/narrative_generation.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/model/narrative_generation.md index 697d5a04d61..8d709a3bdce 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/model/narrative_generation.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/model/narrative_generation.md @@ -64,7 +64,7 @@ The first (name.class) defines the class name of the resource to define a templa ```properties # Two property lines in the file per template -practitioner.class=ca.uhn.fhir.model.dstu.resource.Practitioner +practitioner.resourceType=Practitioner practitioner.narrative=file:src/test/resources/narrative/Practitioner.html observation.class=ca.uhn.fhir.model.dstu.resource.Observation @@ -77,7 +77,7 @@ You may also override/define behaviour for datatypes. These datatype narrative d ```properties # datatypes use the same format as resources -humanname.class=ca.uhn.fhir.model.dstu.composite.HumanNameDt +humanname.resourceType=HumanNameDt humanname.narrative=classpath:ca/uhn/fhir/narrative/HumanNameDt.html]]> ``` diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/performance.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/performance.md new file mode 100644 index 00000000000..68eac58c2af --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/performance.md @@ -0,0 +1,11 @@ +# Performance + +This page contains information for performance optimization. + +# Bulk Loading + +On servers where a large amount of data will be ingested, the following considerations may be helpful: + +* Optimize your database thread pool count and HTTP client thread count: Every environment will have a different optimal setting for the number of concurrent writes that are permitted, and the maximum number of database connections allowed. + +* Disable deletes: If the JPA server is configured to have the FHIR delete operation disabled, it is able to skip some resource reference deletion checks during resource creation, which can have a measurable improvement to performance over large datasets. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/search.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/search.md new file mode 100644 index 00000000000..26fe08dc30c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/search.md @@ -0,0 +1,24 @@ +# JPA Server Search + +The HAPI FHIR JPA Server fully implements most [FHIR search](https://www.hl7.org/fhir/search.html) operations for most versions of FHIR. However, there are some known limitations of the current implementation. Here is a partial list of search functionality that is not currently supported in HAPI FHIR: + +### Date searches without timestamp + +Searching by date with no timestamp currently doesn't match all records it should. See [Issue 1499](https://github.com/jamesagnew/hapi-fhir/issues/1499). + +### Chains within _has + +Chains within _has are not currently supported for performance reasons. For example, this search is not currently supported +```http +https://localhost:8000/Practitioner?_has:PractitionerRole:practitioner:service.type=CHIRO +``` + +### Location.position "near" + +Searching on Location.Position using `near` currently uses a box search, not a radius search. A box search is a square centred on the provided coordinates with the shortest distance to the edge of the square equal to the distance provided; this means the box search will match more locations than a radius search in the corners. Currently, distance is assumed to be in km and any provided units are ignored. Distance must be between 0.0km and 10,000km. + +### _filter + +The special `_filter` is only partially implemented. + + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/upgrades/validation_context_430.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/upgrades/validation_context_430.md new file mode 100644 index 00000000000..756b8fed28d --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/upgrades/validation_context_430.md @@ -0,0 +1,16 @@ + +### IValidationSupport Interfaces Collapsed + +Previously, a number of `IValidationSupport` interfaces existed. These interface were all almost identical but had a few minor differences relating to the different versions of FHIR. For example, the following existed, along with others: + +* org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport +* org.hl7.fhir.r4.hapi.ctx.IValidationSupport + +These have all been replaced with a single interface that is intended to be used for all versions of FHIR: + +* [ca.uhn.fhir.context.support.IContextValidationSupport](https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IContextValidationSupport.java) + +This also means that the following classes (which previously existing in multiple packages) have been replaced with a single version supporting multiple FHIR versions. You will need to adjust package names: + +* CachingValidationSupport +* SnapshotGeneratingValidationSupport diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/instance_validator.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/instance_validator.md new file mode 100644 index 00000000000..2e359f9ca3c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/instance_validator.md @@ -0,0 +1,86 @@ +# Instance Validator + +HAPI provides a built-in and configurable mechanism for validating resources using . This mechanism is called the *Instance Validator*. + +The resource validator is an extendible and modular system, and you can configure it in a number of ways in order to get the specific type of validation you want to achieve. + +The validator can be manually invoked at any time by creating a validator and configuring it with one or more [IValidatorModule](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/validation/IValidatorModule.html) instances. + +```java +{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|validationIntro}} +``` +
+ Note that in earlier releases of HAPI FHIR it was common to register different kinds of validator modules (such as [Schema/Schematron](./schema_validator.html)) because the FHIR Instance Validator module described below was not mature. This is no longer the case, and it is generally recommended to use the FHIR Instance Validator. +
+ +# FHIR Conformance Concepts + +There are a few key concepts worth explaining before getting into how validation is performed in HAPI FHIR. + +Conformance Resources: + +* [StructureDefinition](http://hl7.org/fhir/structuredefinition.html) – Contains definitions of the valid fields in a given resource, including details about their datatypes, min/max cardinalities, valid values, and other rules about what content is valid and what is not. StructureDefinition resources are also used to express derivative profiles (e.g. a description of a constraint on a FHIR resource for a specfic purpose) as well as to describe extensions. + +* [CodeSystem](http://hl7.org/fhir/codesystem.html) – Contains definiitions of codes and vocabularies that can be used in FHIR resources, or even outside of FHIR resources. + +* [ValueSet](http://hl7.org/fhir/valueset.html) – Contains lists of codes drawn from one or more CodeSystems that are suitable for use in a specific field in a FHIR resource. + + +# FHIR Instance Validator + +
+ Note on HAPI FHIR 5.0.0+: Many of the classes described here have changed in HAPI FHIR 5.0.0 and + existing users of HAPI FHIR may need to migrate existing validation code in order to successfully use the validator + in HAPI FHIR 5.0.0 and beyond. See Migrating to 5.x for information. +
+ +HAPI has very complete support for validation against FHIR conformance resources. + +This functionality is proviided by the HAPI FHIR "reference validator", which is able +to check a resource for conformance to FHIR profiles. + +The FHIR instance validator is very powerful. It will use terminology services to validate codes, StructureDefinitions to validate semantics, and uses a customized XML/JSON parser in order to provide descriptive error messages. + +It is always worth considering the performance implications of using the Instance Validator at runtime in a production system. While efforts are made to keep the Instance Validator and its supporting infrastructure performant, the act of performing deep semantic validation is never going to be without some performance cost. + +The FHIR instance validator can be used to validate a resource against the +official structure definitions (produced by HL7) as well as against custom +definitions provided either by HL7 or by the user. + +# Running the Validator + +To execute the validator, you create a [validation support chain](./validation_support_modules.html) and pass this to an instance of [FhirInstanceValidator](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.html). The FhirInstanceValidator is then used as a module for the HAPI FHIR validation framework. + +Note that the example below uses the official FHIR StructureDefintions and ValueSets +to validate the resource. It will not work unless you include the +**hapi-fhir-validation-resources-[version].jar** module/JAR on your classpath. + +```java +{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|instanceValidator}} +``` + + + +# Migrating to HAPI FHIR 5.x + +HAPI FHIR 5.x contained a significant rewrite of the IValidationSupport interface and the entire validation support module infrastructure. + +Users wishing to upgrade an existing application from HAPI FHIR 4.2 or earlier may need to consider the following points (note that the HAPI FHIR JPA server has already been adapted to use the new infrastructure, so most users of the JPA server will not need to make any changes in this regard). + +* The `IContextValidationSupport` interface has been renamed to `IValidationSupport`. Previous versions of HAPI had a number of sub-interfaces of IContextValidationSupport that were all named IValidationSupport (but were FHIR version-specific and were located in distinct packages). These previous interfaces named IValidationSupport have all been removed. + +* The `IValidationSupport` interface has been reworked significantly in order to simplify extension (these points apply only to users who have created custom implementations of this interface): + + * A method called `getFhirContext()` has been added, meaning that all validation support modules must be able to report their FhirContext object. This is used to ensure that all modules in the chain are consistent with each other in terms of supported FHIR version, etc. + + * All other methods in the interface now have a default implementation which returns a null response. This means that custom implementations of this interface only need to implement the methods they care about. + + * The `validateCode(...)` methods previously passed in a special constant to `theCodeSystem` (the code system URL) parameter in cases where the system URL was implied and not explicit (e.g. when validating the `Patient.gender` field, where the resource body does not contain the code system URL). This constant was confusing to implementors and has been replaced with a new parameter of type [ConceptValidationOptions](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/context/support/ConceptValidationOptions.html) that supplies details about the validation. + +* Many classes were previously duplicated across different FHIR versions. For example, there were previously 5 classes named `DefaultProfileValidationSupport` spanning the different versions of FHIR that were supported by the validator. As of HAPI FHIR 5.x, a single [DefaultProfileValidationSupport](/hapi-fhir/apidocs/hapi-fhir-base/undefined/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.html) class exists. Users if this class (and several other implementations of the IValidationSupport interface may need to change their package declarations. + +* The DefaultProfileValidationSupport module previously contained code to perform terminology/code validation based on the CodeSystems it contained. This functionality has been relocated to a new module called [(InMemoryTerminologyServerValidationSupport)](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/InMemoryTerminologyServerValidationSupport.html), so this module should generally be added to the chain. + + + + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/introduction.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/introduction.md index e10175c1b0a..b374e288db5 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/introduction.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/introduction.md @@ -5,10 +5,9 @@ This section contains details on several strategies for validating resources: * **[Parser Error Handler](./parser_error_handler.html)** validation is validation at runtime during the parsing of a resource. It can be used to catch input data that is impossible to fit into the HAPI data model. For example, it can be used to throw exceptions or display error messages if a resource being parsed contains elements for which there are no appropriate fields in a HAPI data structure. This is useful in order to ensure that no data is being lost during parsing, but is less comprehensive than resource validation against raw text data. Parser Validation is extremely fast and lightweight since it happens within the parser and has no dependencies to outside resources. - - -* **[Profile Validation](./profile_validator.html)** is validation of the raw or parsed resource against the official FHIR validation rules (ie. the official FHIR definitions, expressed as profile resources such as [StructureDefinition](http://hl7.org/fhir/structuredefinition.html) and [ValueSet](http://hl7.org/fhir/valueset.html). - Profile Validation can also be used to validate resources against individual Implementation Guides which derive from the core specification (e.g. the [US Core](http://hl7.com/uscore) implementation guide). +* **[Instance Validator](./instance_validator.html)** is validation of the raw or parsed resource against the official FHIR validation rules (ie. the official FHIR definitions, expressed as profile resources such as [StructureDefinition](http://hl7.org/fhir/structuredefinition.html) and [ValueSet](http://hl7.org/fhir/valueset.html). + + The Instance Validator can also be used to validate resources against individual Implementation Guides which derive from the core specification (e.g. the [US Core](http://hl7.com/uscore) implementation guide). -* **[Schema/Schematron Validation](./schema_validator.html)** is validation using XSD/SCH validation files provided by FHIR. This validator performs well but produces less usable error messages than Profile Validation. +* **[Schema/Schematron Validation](./schema_validator.html)** is validation using XSD/SCH validation files provided by FHIR. This validator performs well but produces less usable error messages than Profile Validation. It is considered a legacy feature, as the Instance Validator is now mature and preferred. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/profile_validator.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/profile_validator.md deleted file mode 100644 index 1eb782861e9..00000000000 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/profile_validator.md +++ /dev/null @@ -1,103 +0,0 @@ -# Profile Validator - -# Validator Modules - -HAPI provides a built-in and configurable mechanism for validating resources. This mechanism is called the *Resource Validator*. - -The resource validator is an extendible and modular system, and you can configure it in a number of ways in order to get the specific type of validation you want to achieve. - -The validator can be manually invoked at any time by creating a validator and configuring it with one or more [IValidatorModule](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/validation/IValidatorModule.html) instances. - -```java -{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|validationIntro}} -``` - -
- Note that in earlier releases of HAPI FHIR it was common to register different kinds of validator modules (such as Schema/Schematron) because the FHIR Instance Validator module described below was not mature. This is no longer the case, and it is generally recommended to use the FHIR Instance Validator. -
- -# FHIR Conformance Packages - -There are a few key concepts worth explaining before getting into how validation is performed in HAPI FHIR. - -Conformance Resources: - -* [StructureDefinition](http://hl7.org/fhir/structuredefinition.html) – Contains definitions of the valid fields in a given resource, including details about their datatypes, min/max cardinalities, valid values, and other rules about what content is valid and what is not. StructureDefinition resources are also used to express derivative profiles (e.g. a description of a constraint on a FHIR resource for a specific purpose) as well as to describe extensions. - -* [CodeSystem](http://hl7.org/fhir/codesystem.html) – Contains definitions of codes and vocabularies that can be used in FHIR resources, or even outside of FHIR resources. - -* [ValueSet](http://hl7.org/fhir/valueset.html) – Contains lists of codes drawn from one or more CodeSystems that are suitable for use in a specific field in a FHIR resource. - - -# FHIR Instance Validator - -HAPI has very complete support for validation against FHIR conformance resources. - -This functionality is provided by the HAPI FHIR "reference validator", which is able -to check a resource for conformance to FHIR profiles. - -The FHIR instance validator is very powerful. It will use terminology services to validate codes, StructureDefinitions to validate semantics, and uses a customized XML/JSON parser in order to provide descriptive error messages. - -It is always worth considering the performance implications of using the Instance Validator at runtime in a production system. While efforts are made to keep the Instance Validator and its supporting infrastructure performant, the act of performing deep semantic validation is never going to be without some performance cost. - -The FHIR instance validator can be used to validate a resource against the -official structure definitions (produced by HL7) as well as against custom -definitions provided either by HL7 or by the user. - -# Running the Validator - -
- Note on FHIR Versions: Many of the classes described on this page have - multiple versions, and you should use the version of the class the is appropriate - for the version of FHIR you are looking to validate. For example, the - examples and links below are using the - org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator class to - validate FHIR R4 resources, but you would want to use the class - org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator - if you need to validate DSTU3 content. -
- -To execute the validator, you simply create an instance of [FhirInstanceValidator](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/FhirInstanceValidator.html) and register it to new validator, as shown in the example below. - -Note that the example below uses the official FHIR StructureDefinitions and ValueSets -to validate the resource. It will not work unless you include the -**hapi-fhir-validation-resources-[version].jar** module/JAR on your classpath. - -```java -{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|instanceValidator}} -``` - -# Supplying Your Own Definitions - -The FhirInstanceValidator relies on an implementation of an interface called [IValidationSupport](/hapi-fhir/apidocs/hapi-fhir-structures-r4/org/hl7/fhir/r4/hapi/ctx/IValidationSupport.html) interface to load StructureDefinitions, validate codes, etc. - -By default, an implementation of this interface called [DefaultProfileValidationSupport](/hapi-fhir/apidocs/hapi-fhir-structures-r4/org/hl7/fhir/r4/hapi/ctx/DefaultProfileValidationSupport.html) is used. This implementation simply uses the built-in official FHIR definitions to validate against (and in many cases, this is good enough). - -However, if you have needs beyond simply validating against the core FHIR specification, you may wish to use something more. - -```java -{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|validateSupplyProfiles}} -``` - -# Built-In Validation Support Classes - -There are several implementations of the [IValidationSupport](/hapi-fhir/apidocs/hapi-fhir-structures-r4/org/hl7/fhir/r4/hapi/ctx/IValidationSupport.html) interface built into HAPI FHIR that can be used, typically in a chain. - -* [**DefaultProfileValidationSupport**](/hapi-fhir/apidocs/hapi-fhir-structures-r4/org/hl7/fhir/r4/hapi/ctx/DefaultProfileValidationSupport.html) - Supplies the built-in FHIR core structure definitions, including both structures and vocabulary. - -* [**ValidationSupportChain**](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/ValidationSupportChain.html) - Can be used to chain multiple implementations together so that for every request, each support class instance in the chain is tried in sequence. - -* [**PrePopulatedValidationSupport**](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/PrePopulatedValidationSupport.html) - Contains a series of HashMaps that store loaded conformance resources in memory. Typically this is initialized at startup in order to add custom conformance resources into the chain. - -* [**PrePopulatedValidationSupport**](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/PrePopulatedValidationSupport.html) - Contains a series of HashMaps that store loaded conformance resources in memory. Typically this is initialized at startup in order to add custom conformance resources into the chain. - -* [**CachingValidationSupport**](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/CachingValidationSupport.html) - Caches results of calls to a wrapped service implementation for a period of time. This class can be a significant help in terms of performance if you are loading conformance resources or performing terminology operations from a database or disk. - -* [**SnapshotGeneratingValidationSupport**](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/r4/hapi/validation/SnapshotGeneratingValidationSupport.html) - Generates StructureDefinition snapshots as needed. This should be added to your chain if you are working with differential StructureDefinitions that do not include the snapshot view. - - - - - - - diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/schema_validator.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/schema_validator.md index d93f0c138b9..4c46bb5b531 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/schema_validator.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/schema_validator.md @@ -4,6 +4,11 @@ FHIR resource definitions are distributed with a set of XML schema files (XSD) a The two sets of files are included with HAPI, and it uses them to perform validation. +
+ +The Schema/Schematron validators were recommended early in the development of FHIR itself, as the official FHIR validation toolchain was still maturing. At this time, the FHIR [Instance Validator](./instance_validator.html) is very mature, and gives far more helpful error messages than the Schema/Schematron validator is able to. For this reason, the Schema/Schematron validators are not available for validating R5+ content and may be deprecated in the future for other versions of FHIR as well. +
+ # Preparation In order to use HAPI's Schematron support, a library called [Ph-Schematron](https://github.com/phax/ph-schematron) is used, so this library must be added to your classpath (or Maven POM file, Gradle file, etc.) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/validation_support_modules.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/validation_support_modules.md new file mode 100644 index 00000000000..5b559f560f9 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/validation/validation_support_modules.md @@ -0,0 +1,142 @@ +# Validation Support Modules + +The [Instance Validator](./instance_validator.html) relies on an implementation of an interface called [IValidationSupport](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/context/support/IValidationSupport.html) to load StructureDefinitions, validate codes, etc. + +By default, an implementation of this interface called [DefaultProfileValidationSupport](/hapi-fhir/apidocs/hapi-fhir-base/undefined/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.html) is used. This implementation simply uses the built-in official FHIR definitions to validate against (and in many cases, this is good enough). + +However, if you have needs beyond simply validating against the core FHIR specification, you may wish to use something more. + +# Built-In Validation Support Classes + +There are a several implementations of the [IValidationSupport](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/context/support/IValidationSupport.html) interface built into HAPI FHIR that can be used, typically in a chain. + +# ValidationSupportChain + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/ValidationSupportChain.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/ValidationSupportChain.java) + +This module can be used to combine multiple implementations together so that for every request, each support class instance in the chain is tried in sequence. Note that nearly all methods in the [IValidationSupport](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/context/support/IValidationSupport.html) interface are permitted to return `null` if they are not able to service a particular method call. So for example, if a call to the [`validateCode`](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/context/support/IValidationSupport.html#validateCode(ca.uhn.fhir.context.support.IValidationSupport,ca.uhn.fhir.context.support.ConceptValidationOptions,java.lang.String,java.lang.String,java.lang.String,java.lang.String)) method is made, the validator will try each module in the chain until one of them returns a non-null response. + +# DefaultProfileValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-base/undefined/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/DefaultProfileValidationSupport.java) + +This module supplies the built-in FHIR core structure definitions, including both FHIR resource definitions (StructureDefinition resources) and FHIR built-in vocabulary (ValueSet and CodeSystem resources). + +# InMemoryTerminologyServerValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java) + +This module acts as a simple terminology service that can validate codes against ValueSet and CodeSystem resources purely in-memory (i.e. with no database). This is sufficient in many basic cases, although it is not able to validate CodeSystems with external content (i.e CodeSystems where the `CodeSystem.content` field is `external`, such as the LOINC and SNOMED CT CodeSystems). + +# PrePopulatedValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/PrePopulatedValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/PrePopulatedValidationSupport.java) + +This module contains a series of HashMaps that store loaded conformance resources in memory. Typically this is initialized at startup in order to add custom conformance resources into the chain. + +# CachingValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java) + +This module caches results of calls to a wrapped service implementation for a period of time. This class can be a significant help in terms of performance if you are loading conformance resources or performing terminology operations from a database or disk, but it also has value even for purely in-memory validation since validating codes against a ValueSet can require the expansion of that ValueSet. + +# SnapshotGeneratingValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/SnapshotGeneratingValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/SnapshotGeneratingValidationSupport.java) + +This module generates StructureDefinition snapshots as needed. This should be added to your chain if you are working wiith differential StructureDefinitions that do not include the snapshot view. + +# CommonCodeSystemsTerminologyService + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyService.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyService.java) + +This module validates codes in CodeSystems that are not distributed with the FHIR specification because they are difficult to distribute but are commonly used in FHIR resources. + +The following table lists vocabulary that is validated by this module: + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCanonical URLsValidation Details
USPS State Codes + ValueSet: (...)/ValueSet/us-core-usps-state +
+ CodeSystem: https://www.usps.com/ +
+ Codes are validated against a built-in list of valid state codes. +
MimeTypes (BCP-13) + ValueSet: (...)/ValueSet/mimetypes +
+ CodeSystem: urn:ietf:bcp:13 +
+ Codes are not validated, but are instead assumed to be correct. Improved validation should be + added in the future, please get in touch if you would like to help. +
Languages (BCP-47) + ValueSet: (...)/ValueSet/mimetypes +
+ CodeSystem: urn:ietf:bcp:47 +
+ Codes are not validated, but are instead assumed to be correct. Improved validation should be + added in the future, please get in touch if you would like to help. +
+ +# RemoteTerminologyServiceValidationSupport + +[JavaDoc](/hapi-fhir/apidocs/hapi-fhir-validation/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.html) / [Source](https://github.com/jamesagnew/hapi-fhir/blob/ja_20200218_validation_api_changes/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java) + +This module validates codes using a remote FHIR-based terminology server. + + +# Recipes + +The IValidationSupport instance passed to the FhirInstanceValidator will often resemble the chain shown in the diagram below. In this diagram: + +* DefaultProfileValidationSupport is used to supply basic built-in FHIR definitions +* PrePopulatedValidationSupport is used to supply other custom definitions +* InMemoryTerminologyServerValidationSupport is used to validate terminology +* The modules above are all added to a chain via ValidationSupportChain +* Finally, a cache is placed in front of the entire chain in order to improve performance + +Validation Support Chain
(expand)
+ +# Recipe: Supplying Custom Definitions + +The following snippet shows how to supply custom definitions to the validator. + +```java +{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|validateSupplyProfiles}} +``` + +# Recipe: Using a Remote Terminology Server + +The following snippet shows how to leverage a remote (FHIR-based) terminology server, by making REST calls to the external service when codes need to be validated. + +```java +{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|validateUsingRemoteTermSvr}} +``` + + + + + diff --git a/hapi-fhir-igpacks/pom.xml b/hapi-fhir-igpacks/pom.xml index 4e369e28cab..9cf55f8dc91 100644 --- a/hapi-fhir-igpacks/pom.xml +++ b/hapi-fhir-igpacks/pom.xml @@ -5,7 +5,7 @@ hapi-deployable-pom ca.uhn.hapi.fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/BaseIgPackParser.java b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/BaseIgPackParser.java index 86f794518c7..9b8ee7f79df 100644 --- a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/BaseIgPackParser.java +++ b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/BaseIgPackParser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.igpacks.parser; * #%L * hapi-fhir-igpacks * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,6 +57,10 @@ public abstract class BaseIgPackParser { myCtx = theCtx; } + public FhirContext getCtx() { + return myCtx; + } + protected abstract T createValidationSupport(Map theIgResources); private IBaseResource findResource(Map theCandidateResources, IIdType theId) { diff --git a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu2.java b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu2.java index cb8219541aa..5b6f54c8861 100644 --- a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu2.java +++ b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.igpacks.parser; * #%L * hapi-fhir-igpacks * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package ca.uhn.fhir.igpacks.parser; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -37,7 +37,7 @@ public class IgPackParserDstu2 extends BaseIgPackParser { @Override protected IValidationSupport createValidationSupport(Map theIgResources) { - return new IgPackValidationSupportDstu2(theIgResources); + return new IgPackValidationSupportDstu2(getCtx(), theIgResources); } @Override diff --git a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu3.java b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu3.java index 5ea1fe0aa86..075646b0204 100644 --- a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu3.java +++ b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackParserDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.igpacks.parser; * #%L * hapi-fhir-igpacks * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,11 +23,9 @@ package ca.uhn.fhir.igpacks.parser; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.Map; @@ -39,7 +37,7 @@ public class IgPackParserDstu3 extends BaseIgPackParser { @Override protected IValidationSupport createValidationSupport(Map theIgResources) { - return new IgPackValidationSupportDstu3(theIgResources); + return new IgPackValidationSupportDstu3(getCtx(), theIgResources); } @Override diff --git a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu2.java b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu2.java index 6c8e6c891b6..84d3431130e 100644 --- a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu2.java +++ b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.igpacks.parser; * #%L * hapi-fhir-igpacks * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,57 +21,28 @@ package ca.uhn.fhir.igpacks.parser; */ import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import org.hl7.fhir.dstu2.model.ConceptMap; import org.hl7.fhir.dstu2.model.StructureDefinition; import org.hl7.fhir.dstu2.model.ValueSet; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import java.util.ArrayList; -import java.util.List; import java.util.Map; public class IgPackValidationSupportDstu2 implements IValidationSupport { private final Map myIgResources; + private FhirContext myCtx; - public IgPackValidationSupportDstu2(Map theIgResources) { + public IgPackValidationSupportDstu2(FhirContext theCtx, Map theIgResources) { + myCtx = theCtx; myIgResources = theIgResources; } - @Override - public List allStructures() { - ArrayList retVal = new ArrayList<>(); - - for (Map.Entry next : myIgResources.entrySet()) { - if (next.getKey().getResourceType().equals("StructureDefinition")) { - retVal.add((StructureDefinition) next.getValue()); - } - } - return retVal; - } - - @Override - public ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return null; - } - - @Override - public ValueSet fetchCodeSystem(FhirContext theContext, String theSystem) { - for (Map.Entry next : myIgResources.entrySet()) { - if (next.getKey().getResourceType().equals("ValueSet")) { - ValueSet nextVs = (ValueSet) next.getValue(); - if (theSystem.equals(nextVs.getUrl())) { - return nextVs; - } - } - } - return null; - } @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { + public T fetchResource(Class theClass, String theUri) { for (Map.Entry next : myIgResources.entrySet()) { if (theClass.equals(ConceptMap.class)) { if (theClass.isAssignableFrom(next.getValue().getClass())) { @@ -104,12 +75,13 @@ public class IgPackValidationSupportDstu2 implements IValidationSupport { @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { return false; } @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { - return null; + public FhirContext getFhirContext() { + return myCtx; } + } diff --git a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu3.java b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu3.java index c682154c3f2..fdd68e90b2d 100644 --- a/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu3.java +++ b/hapi-fhir-igpacks/src/main/java/ca/uhn/fhir/igpacks/parser/IgPackValidationSupportDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.igpacks.parser; * #%L * hapi-fhir-igpacks * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,8 @@ package ca.uhn.fhir.igpacks.parser; */ import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.ConceptMap; import org.hl7.fhir.dstu3.model.StructureDefinition; @@ -35,45 +36,27 @@ import java.util.Map; public class IgPackValidationSupportDstu3 implements IValidationSupport { private final Map myIgResources; + private FhirContext myCtx; - public IgPackValidationSupportDstu3(Map theIgResources) { + public IgPackValidationSupportDstu3(FhirContext theCtx, Map theIgResources) { myIgResources = theIgResources; + myCtx = theCtx; } - @Override - public ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return null; - } @Override - public List fetchAllConformanceResources(FhirContext theContext) { + public List fetchAllConformanceResources() { return new ArrayList<>(myIgResources.values()); } @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - for (Map.Entry next : myIgResources.entrySet()) { - if (next.getKey().getResourceType().equals("StructureDefinition")) { - retVal.add((StructureDefinition) next.getValue()); - } - } - return retVal; + public ValueSet fetchValueSet(String theSystem) { + return fetchResource(ValueSet.class, theSystem); } @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return fetchResource(theContext, CodeSystem.class, theSystem); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return fetchResource(theContext, ValueSet.class, theSystem); - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { + public T fetchResource(Class theClass, String theUri) { for (Map.Entry next : myIgResources.entrySet()) { if (theClass.equals(CodeSystem.class)) { if (theClass.isAssignableFrom(next.getValue().getClass())) { @@ -113,27 +96,28 @@ public class IgPackValidationSupportDstu3 implements IValidationSupport { } @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return fetchResource(theCtx, StructureDefinition.class, theUrl); + public StructureDefinition fetchStructureDefinition(String theUrl) { + return fetchResource(StructureDefinition.class, theUrl); } @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { return false; } @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { return null; } @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { return null; } @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; + public FhirContext getFhirContext() { + return myCtx; } + } diff --git a/hapi-fhir-igpacks/src/test/java/ca/uhn/fhir/igpack/parser/IgPackParserDstu3Test.java b/hapi-fhir-igpacks/src/test/java/ca/uhn/fhir/igpack/parser/IgPackParserDstu3Test.java index f4ece9c3b71..1f6588d5c29 100644 --- a/hapi-fhir-igpacks/src/test/java/ca/uhn/fhir/igpack/parser/IgPackParserDstu3Test.java +++ b/hapi-fhir-igpacks/src/test/java/ca/uhn/fhir/igpack/parser/IgPackParserDstu3Test.java @@ -2,14 +2,15 @@ package ca.uhn.fhir.igpack.parser; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.igpacks.parser.IgPackParserDstu3; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.ValueSet; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; public class IgPackParserDstu3Test { private static final Logger ourLog = LoggerFactory.getLogger(IgPackParserDstu3Test.class); @@ -22,8 +23,8 @@ public class IgPackParserDstu3Test { IValidationSupport result = igParser.parseIg(IgPackParserDstu3Test.class.getResourceAsStream("/us-core-stu3-validator.pack"), "US-Core STU3"); - assertNotNull(result.fetchResource(ctx, ValueSet.class, "http://hl7.org/fhir/us/core/ValueSet/simple-language")); - assertEquals(50, result.fetchAllConformanceResources(ctx).size()); + assertNotNull(result.fetchResource(ValueSet.class, "http://hl7.org/fhir/us/core/ValueSet/simple-language")); + assertEquals(50, result.fetchAllConformanceResources().size()); } } diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 3cd53b5143d..de41b5f6b38 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -61,6 +61,11 @@ hapi-fhir-structures-hl7org-dstu2 ${project.version}
+ + ca.uhn.hapi.fhir + hapi-fhir-validation + ${project.version} + ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 47d8f3872fb..78eb7ef271d 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java index cfca93c30ed..1d0c3158a14 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.client; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpRequest.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpRequest.java index fd468bb83df..10bf0e566c9 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpRequest.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.client; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpResponse.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpResponse.java index 1f1479507a7..4122e0da868 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpResponse.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpResponse.java @@ -6,7 +6,7 @@ import java.io.*; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsRestfulClientFactory.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsRestfulClientFactory.java index 6efb7d6b256..2a54f944bf0 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsRestfulClientFactory.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsRestfulClientFactory.java @@ -10,7 +10,7 @@ import javax.ws.rs.client.ClientBuilder; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java index 9c786980f0d..89bf83b2ddc 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java index c63aeb6166a..735b4373652 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java index 131187d4197..a0ff6d3db7c 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java index 850b3696510..52c4944d924 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java @@ -5,7 +5,7 @@ import java.io.IOException; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java index 1f74e8a8955..6f48a918f69 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsExceptionInterceptor.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsExceptionInterceptor.java index 16810acf6b6..6c1caf92042 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsExceptionInterceptor.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsExceptionInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server.interceptor; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsResponseException.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsResponseException.java index 5134a2fa7a8..d590064f2a2 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsResponseException.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/interceptor/JaxRsResponseException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server.interceptor; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java index cbe772b0470..8406c5e64b9 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server.util; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsRequest.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsRequest.java index 6087a4c99bc..5ef82ae4c77 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsRequest.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jaxrs.server.util; * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsResponse.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsResponse.java index ffc6c55eb99..74d28d74aa1 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsResponse.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsResponse.java @@ -1,12 +1,32 @@ package ca.uhn.fhir.jaxrs.server.util; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.ParseAction; +import ca.uhn.fhir.rest.server.RestfulResponse; +import ca.uhn.fhir.rest.server.RestfulServerUtils; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseBinary; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.ResponseBuilder; +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.util.List; +import java.util.Map.Entry; + import static org.apache.commons.lang3.StringUtils.isNotBlank; /* * #%L * HAPI FHIR JAX-RS Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,23 +41,6 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * limitations under the License. * #L% */ -import java.io.*; -import java.util.List; -import java.util.Map.Entry; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; - -import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.IBaseBinary; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.api.*; -import ca.uhn.fhir.rest.api.server.ParseAction; -import ca.uhn.fhir.rest.server.RestfulResponse; -import ca.uhn.fhir.rest.server.RestfulServerUtils; /** * The JaxRsResponse is a jax-rs specific implementation of the RestfulResponse. @@ -60,8 +63,7 @@ public class JaxRsResponse extends RestfulResponse { * by the server. */ @Override - public Writer getResponseWriter(int theStatusCode, String theStatusMessage, String theContentType, String theCharset, boolean theRespondGzip) - throws UnsupportedEncodingException, IOException { + public Writer getResponseWriter(int theStatusCode, String theStatusMessage, String theContentType, String theCharset, boolean theRespondGzip) { return new StringWriter(); } @@ -78,7 +80,7 @@ public class JaxRsResponse extends RestfulResponse { } @Override - public Response sendAttachmentResponse(IBaseBinary bin, int statusCode, String contentType) throws IOException { + public Object sendAttachmentResponse(IBaseBinary bin, int statusCode, String contentType) { ResponseBuilder response = buildResponse(statusCode); if (bin.getContent() != null && bin.getContent().length > 0) { response.header(Constants.HEADER_CONTENT_TYPE, contentType).entity(bin.getContent()); diff --git a/hapi-fhir-jaxrsserver-base/src/test/java/ca/uhn/fhir/jaxrs/client/GenericJaxRsClientDstu3Test.java b/hapi-fhir-jaxrsserver-base/src/test/java/ca/uhn/fhir/jaxrs/client/GenericJaxRsClientDstu3Test.java index 48a03513567..ef0512ee1be 100644 --- a/hapi-fhir-jaxrsserver-base/src/test/java/ca/uhn/fhir/jaxrs/client/GenericJaxRsClientDstu3Test.java +++ b/hapi-fhir-jaxrsserver-base/src/test/java/ca/uhn/fhir/jaxrs/client/GenericJaxRsClientDstu3Test.java @@ -1356,7 +1356,7 @@ public class GenericJaxRsClientDstu3Test { .execute(); fail(); } catch (InvalidResponseException e) { - assertThat(e.getMessage(), containsString("Unable to Parse HTML - node")); + assertThat(e.getMessage(), containsString("Unable to Parse HTML")); } //@formatter:on } diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index 2bb47ad450c..7807f400ef9 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-jaxrsserver-example/src/test/java/ca/uhn/fhir/jaxrs/server/example/JaxRsPatientProviderDstu3Test.java b/hapi-fhir-jaxrsserver-example/src/test/java/ca/uhn/fhir/jaxrs/server/example/JaxRsPatientProviderDstu3Test.java index 9c3db5e1244..1dbf355bf6b 100644 --- a/hapi-fhir-jaxrsserver-example/src/test/java/ca/uhn/fhir/jaxrs/server/example/JaxRsPatientProviderDstu3Test.java +++ b/hapi-fhir-jaxrsserver-example/src/test/java/ca/uhn/fhir/jaxrs/server/example/JaxRsPatientProviderDstu3Test.java @@ -199,26 +199,7 @@ public class JaxRsPatientProviderDstu3Test { //assertEquals(e.getStatusCode(), Constants.STATUS_HTTP_404_NOT_FOUND); } } - - /** Transaction - Server */ - @Ignore - @Test - public void testTransaction() { - Bundle bundle = new Bundle(); - BundleEntryComponent entry = bundle.addEntry(); - final Patient existing = new Patient(); - existing.getName().get(0).setFamily("Created with bundle"); - entry.setResource(existing); - // FIXME ? -// BoundCodeDt theTransactionOperation = -// new BoundCodeDt( -// BundleEntryTransactionMethodEnum.VALUESET_BINDER, -// BundleEntryTransactionMethodEnum.POST); -// entry.setTransactionMethod(theTransactionOperation); - Bundle response = client.transaction().withBundle(bundle).execute(); - } - /** Conformance - Server */ @Test @Ignore diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 8fbfd4e4aca..dd305ce4d61 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -48,6 +48,11 @@ commons-csv + + co.elastic.apm + apm-agent-api + + ca.uhn.hapi.fhir hapi-fhir-base @@ -608,7 +613,7 @@ compile - + diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BaseBinaryStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BaseBinaryStorageSvcImpl.java index e147ad95d8c..f002599ef8d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BaseBinaryStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BaseBinaryStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryAccessProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryAccessProvider.java index c25a06aa0e3..3a6d6e956af 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryAccessProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryAccessProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java index de4f39595a3..48dd53402be 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/DatabaseBlobBinaryStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/DatabaseBlobBinaryStorageSvcImpl.java index 1542a090af7..ced2dd7d0a8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/DatabaseBlobBinaryStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/DatabaseBlobBinaryStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/FilesystemBinaryStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/FilesystemBinaryStorageSvcImpl.java index abfd85e1a41..20a2b344350 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/FilesystemBinaryStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/FilesystemBinaryStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java index b2d583d114d..1ce7a5aeddd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryTarget.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryTarget.java index 0c8061aaffa..18d524a0250 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryTarget.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryTarget.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/MemoryBinaryStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/MemoryBinaryStorageSvcImpl.java index 4defaedb739..8a1c605aede 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/MemoryBinaryStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/MemoryBinaryStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java index f5beed949a0..94edb0932c7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/StoredDetails.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/StoredDetails.java index 453be5ffe3c..276dcd2b709 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/StoredDetails.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/StoredDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.binstore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,7 @@ package ca.uhn.fhir.jpa.binstore; import ca.uhn.fhir.jpa.util.JsonDateDeserializer; import ca.uhn.fhir.jpa.util.JsonDateSerializer; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; +import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -33,9 +32,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import javax.annotation.Nonnull; import java.util.Date; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public class StoredDetails { +public class StoredDetails implements IModelJson { @JsonProperty("blobId") private String myBlobId; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProvider.java index 60a6a5f3977..d8ac59fb5f6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.bulk; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImpl.java index b6967639c5c..072565cdc43 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.bulk; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,7 @@ package ca.uhn.fhir.jpa.bulk; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.DaoRegistry; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.dao.IResultIterator; -import ca.uhn.fhir.jpa.dao.ISearchBuilder; +import ca.uhn.fhir.jpa.dao.*; import ca.uhn.fhir.jpa.dao.data.IBulkExportCollectionDao; import ca.uhn.fhir.jpa.dao.data.IBulkExportCollectionFileDao; import ca.uhn.fhir.jpa.dao.data.IBulkExportJobDao; @@ -95,6 +92,8 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc { private FhirContext myContext; @Autowired private PlatformTransactionManager myTxManager; + @Autowired + private SearchBuilderFactory mySearchBuilderFactory; private TransactionTemplate myTxTemplate; private long myFileMaxChars = 500 * FileUtils.ONE_KB; @@ -213,9 +212,8 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc { ourLog.info("Bulk export assembling export of type {} for job {}", nextType, theJobUuid); - ISearchBuilder sb = dao.newSearchBuilder(); Class nextTypeClass = myContext.getResourceDefinition(nextType).getImplementingClass(); - sb.setType(nextTypeClass, nextType); + ISearchBuilder sb = mySearchBuilderFactory.newSearchBuilder(dao, nextType, nextTypeClass); SearchParameterMap map = new SearchParameterMap(); map.setLoadSynchronous(true); @@ -225,8 +223,6 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc { IResultIterator resultIterator = sb.createQuery(map, new SearchRuntimeDetails(null, theJobUuid), null); storeResultsToFiles(nextCollection, sb, resultIterator, jobResourceCounter, jobStopwatch); - - } job.setStatus(BulkJobStatusEnum.COMPLETE); @@ -351,14 +347,14 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc { requestBuilder.append("&").append(JpaConstants.PARAM_EXPORT_SINCE).append("=").append(new InstantType(since).setTimeZoneZulu(true).getValueAsString()); } if (theFilters != null && theFilters.size() > 0) { - requestBuilder.append("&").append(JpaConstants.PARAM_EXPORT_TYPE).append("=").append(String.join(",", theFilters)); + requestBuilder.append("&").append(JpaConstants.PARAM_EXPORT_TYPE_FILTER).append("=").append(String.join(",", theFilters)); } String request = requestBuilder.toString(); Date cutoff = DateUtils.addMilliseconds(new Date(), -myReuseBulkExportForMillis); Pageable page = PageRequest.of(0, 10); Slice existing = myBulkExportJobDao.findExistingJob(page, request, cutoff, BulkJobStatusEnum.ERROR); - if (existing.isEmpty() == false) { + if (!existing.isEmpty()) { return toSubmittedJobInfo(existing.iterator().next()); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkExportResponseJson.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkExportResponseJson.java index 7b14863720b..23e254a6a91 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkExportResponseJson.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkExportResponseJson.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.bulk; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package ca.uhn.fhir.jpa.bulk; import ca.uhn.fhir.jpa.util.JsonDateDeserializer; import ca.uhn.fhir.jpa.util.JsonDateSerializer; +import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -98,9 +99,7 @@ public class BulkExportResponseJson { return retVal; } - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) - public static class Output { + public static class Output implements IModelJson { @JsonProperty("type") private String myType; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkJobStatusEnum.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkJobStatusEnum.java index 0cc0e2da972..902f969a67a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkJobStatusEnum.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/BulkJobStatusEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.bulk; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/IBulkDataExportSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/IBulkDataExportSvc.java index b1249e5c5b5..2ab89fd241c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/IBulkDataExportSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/IBulkDataExportSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.bulk; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 759983d09ba..1d6007615f2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -33,6 +33,7 @@ import ca.uhn.fhir.jpa.subscription.dbmatcher.CompositeInMemoryDaoSubscriptionMa import ca.uhn.fhir.jpa.subscription.dbmatcher.DaoSubscriptionMatcher; import ca.uhn.fhir.jpa.subscription.module.cache.LinkedBlockingQueueSubscribableChannelFactory; import ca.uhn.fhir.jpa.subscription.module.channel.ISubscribableChannelFactory; +import ca.uhn.fhir.jpa.subscription.module.channel.SubscriptionChannelFactory; import ca.uhn.fhir.jpa.subscription.module.matcher.ISubscriptionMatcher; import ca.uhn.fhir.jpa.subscription.module.matcher.InMemorySubscriptionMatcher; import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices; @@ -54,7 +55,7 @@ import org.springframework.web.socket.config.annotation.WebSocketConfigurer; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,6 +82,7 @@ import org.springframework.web.socket.config.annotation.WebSocketConfigurer; @ComponentScan.Filter(type = FilterType.REGEX, pattern = "ca.uhn.fhir.jpa.subscription.module.standalone.*")}) public abstract class BaseConfig { + public static final String JPA_VALIDATION_SUPPORT_CHAIN = "myJpaValidationSupportChain"; public static final String TASK_EXECUTOR_NAME = "hapiJpaTaskExecutor"; public static final String GRAPHQL_PROVIDER_NAME = "myGraphQLProvider"; private static final String HAPI_DEFAULT_SCHEDULER_GROUP = "HAPI"; @@ -204,10 +206,15 @@ public abstract class BaseConfig { * Create a @Primary @Bean if you need a different implementation */ @Bean - public ISubscribableChannelFactory linkedBlockingQueueSubscribableChannelFactory() { + public ISubscribableChannelFactory subscribableChannelFactory() { return new LinkedBlockingQueueSubscribableChannelFactory(); } + @Bean + public SubscriptionChannelFactory subscriptionChannelFactory() { + return new SubscriptionChannelFactory(); + } + @Bean @Primary public ISubscriptionMatcher subscriptionMatcherCompositeInMemoryDatabase() { @@ -280,6 +287,4 @@ public abstract class BaseConfig { private static HapiFhirHibernateJpaDialect hibernateJpaDialect(HapiLocalizer theLocalizer) { return new HapiFhirHibernateJpaDialect(theLocalizer); } - - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfigDstu3Plus.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfigDstu3Plus.java index 4840f69fc6a..9dd3ebe2c29 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfigDstu3Plus.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfigDstu3Plus.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.config; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +20,27 @@ package ca.uhn.fhir.jpa.config; * #L% */ +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.jpa.dao.JpaPersistedResourceValidationSupport; import ca.uhn.fhir.jpa.term.TermCodeSystemStorageSvcImpl; import ca.uhn.fhir.jpa.term.TermDeferredStorageSvcImpl; import ca.uhn.fhir.jpa.term.TermReindexingSvcImpl; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; +import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.jpa.term.api.ITermReindexingSvc; import ca.uhn.fhir.jpa.term.api.ITermVersionAdapterSvc; +import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain; +import ca.uhn.fhir.validation.IInstanceValidatorModule; +import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; +import org.springframework.context.annotation.Primary; @Configuration public abstract class BaseConfigDstu3Plus extends BaseConfig { @@ -51,4 +63,37 @@ public abstract class BaseConfigDstu3Plus extends BaseConfig { @Bean public abstract ITermVersionAdapterSvc terminologyVersionAdapterSvc(); + @Bean(name = "myDefaultProfileValidationSupport") + public IValidationSupport defaultProfileValidationSupport() { + return new DefaultProfileValidationSupport(fhirContext()); + } + + @Bean(name = JPA_VALIDATION_SUPPORT_CHAIN) + public ValidationSupportChain jpaValidationSupportChain() { + return new JpaValidationSupportChain(fhirContext()); + } + + @Bean(name = "myJpaValidationSupport") + public IValidationSupport jpaValidationSupport() { + return new JpaPersistedResourceValidationSupport(fhirContext()); + } + + @Primary + @Bean() + public IValidationSupport validationSupportChain() { + return new CachingValidationSupport(jpaValidationSupportChain()); + } + + @Bean(name = "myInstanceValidator") + @Lazy + public IInstanceValidatorModule instanceValidator() { + FhirInstanceValidator val = new FhirInstanceValidator(fhirContext()); + val.setBestPracticeWarningLevel(IResourceValidator.BestPracticeWarningLevel.Warning); + val.setValidationSupport(validationSupportChain()); + return val; + } + + + @Bean + public abstract ITermReadSvc terminologyService(); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseDstu2Config.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseDstu2Config.java index 9c00fda3004..670e3bbfc8c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseDstu2Config.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseDstu2Config.java @@ -1,9 +1,12 @@ package ca.uhn.fhir.jpa.config; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl; import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; +import ca.uhn.fhir.jpa.dao.JpaPersistedResourceValidationSupport; import ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorDstu2; import ca.uhn.fhir.jpa.term.TermReadSvcDstu2; import ca.uhn.fhir.jpa.term.api.ITermReadSvc; @@ -11,10 +14,12 @@ import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.validation.IInstanceValidatorModule; import org.apache.commons.lang3.time.DateUtils; -import org.hl7.fhir.instance.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.instance.hapi.validation.DefaultProfileValidationSupport; -import org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.instance.hapi.validation.ValidationSupportChain; +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.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.HapiToHl7OrgDstu2ValidatingSupportWrapper; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.context.annotation.Bean; @@ -27,7 +32,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,18 +84,29 @@ public class BaseDstu2Config extends BaseConfig { return ourFhirContextDstu2Hl7Org; } - @Bean(name = "myInstanceValidatorDstu2") + @Bean(name = "myInstanceValidator") @Lazy - public IInstanceValidatorModule instanceValidatorDstu2() { - FhirInstanceValidator retVal = new FhirInstanceValidator(); + public IInstanceValidatorModule instanceValidator() { + ValidationSupportChain validationSupportChain = validationSupportChain(); + CachingValidationSupport cachingValidationSupport = new CachingValidationSupport(new HapiToHl7OrgDstu2ValidatingSupportWrapper(validationSupportChain)); + FhirInstanceValidator retVal = new FhirInstanceValidator(cachingValidationSupport); retVal.setBestPracticeWarningLevel(IResourceValidator.BestPracticeWarningLevel.Warning); - retVal.setValidationSupport(new CachingValidationSupport(new ValidationSupportChain(new DefaultProfileValidationSupport(), jpaValidationSupportDstu2()))); return retVal; } - @Bean(name = "myJpaValidationSupportDstu2", autowire = Autowire.BY_NAME) - public ca.uhn.fhir.jpa.dao.IJpaValidationSupportDstu2 jpaValidationSupportDstu2() { - ca.uhn.fhir.jpa.dao.JpaValidationSupportDstu2 retVal = new ca.uhn.fhir.jpa.dao.JpaValidationSupportDstu2(); + @Bean(name = JPA_VALIDATION_SUPPORT_CHAIN) + public ValidationSupportChain validationSupportChain() { + DefaultProfileValidationSupport defaultProfileValidationSupport = new DefaultProfileValidationSupport(fhirContext()); + InMemoryTerminologyServerValidationSupport inMemoryTerminologyServer = new InMemoryTerminologyServerValidationSupport(fhirContextDstu2()); + IValidationSupport jpaValidationSupport = jpaValidationSupportDstu2(); + CommonCodeSystemsTerminologyService commonCodeSystemsTermSvc = new CommonCodeSystemsTerminologyService(fhirContext()); + return new ValidationSupportChain(defaultProfileValidationSupport, jpaValidationSupport, inMemoryTerminologyServer, commonCodeSystemsTermSvc); + } + + @Primary + @Bean + public IValidationSupport jpaValidationSupportDstu2() { + JpaPersistedResourceValidationSupport retVal = new JpaPersistedResourceValidationSupport(fhirContextDstu2()); return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirHibernateJpaDialect.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirHibernateJpaDialect.java index fa3dca988d3..1c2695f32da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirHibernateJpaDialect.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirHibernateJpaDialect.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.config; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java index 4fb51263ccf..f50aea1492c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirLocalContainerEntityManagerFactoryBean.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.config; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/WebsocketDispatcherConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/WebsocketDispatcherConfig.java index 38ea15efb73..92feb2e4b01 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/WebsocketDispatcherConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/WebsocketDispatcherConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.config; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/dstu3/BaseDstu3Config.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/dstu3/BaseDstu3Config.java index c247464c25d..9e9ad110a38 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/dstu3/BaseDstu3Config.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/dstu3/BaseDstu3Config.java @@ -17,13 +17,9 @@ import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvcDstu3; import ca.uhn.fhir.jpa.term.api.ITermVersionAdapterSvc; import ca.uhn.fhir.jpa.util.ResourceCountCache; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainDstu3; import ca.uhn.fhir.validation.IInstanceValidatorModule; import org.apache.commons.lang3.time.DateUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -35,7 +31,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +77,7 @@ public class BaseDstu3Config extends BaseConfigDstu3Plus { @Bean(name = GRAPHQL_PROVIDER_NAME) @Lazy public GraphQLProvider graphQLProvider() { - return new GraphQLProvider(fhirContextDstu3(), validationSupportChainDstu3(), graphqlStorageServices()); + return new GraphQLProvider(fhirContextDstu3(), validationSupportChain(), graphqlStorageServices()); } @Bean @@ -94,30 +90,6 @@ public class BaseDstu3Config extends BaseConfigDstu3Plus { return new TransactionProcessor(); } - @Bean(name = "myInstanceValidatorDstu3") - @Lazy - public IInstanceValidatorModule instanceValidatorDstu3() { - FhirInstanceValidator val = new FhirInstanceValidator(); - val.setBestPracticeWarningLevel(IResourceValidator.BestPracticeWarningLevel.Warning); - val.setValidationSupport(validationSupportChainDstu3()); - return val; - } - - @Bean - public DefaultProfileValidationSupport defaultProfileValidationSupport() { - return new DefaultProfileValidationSupport(); - } - - @Bean - public JpaValidationSupportChainDstu3 jpaValidationSupportChain() { - return new JpaValidationSupportChainDstu3(); - } - - @Bean(name = "myJpaValidationSupportDstu3") - public ca.uhn.fhir.jpa.dao.dstu3.IJpaValidationSupportDstu3 jpaValidationSupportDstu3() { - return new ca.uhn.fhir.jpa.dao.dstu3.JpaValidationSupportDstu3(); - } - @Bean(name = "myResourceCountsCache") public ResourceCountCache resourceCountsCache() { ResourceCountCache retVal = new ResourceCountCache(() -> systemDaoDstu3().getResourceCounts()); @@ -153,15 +125,10 @@ public class BaseDstu3Config extends BaseConfigDstu3Plus { return new TermLoaderSvcImpl(); } + @Override @Bean public ITermReadSvcDstu3 terminologyService() { return new TermReadSvcDstu3(); } - @Primary - @Bean(name = "myJpaValidationSupportChainDstu3") - public IValidationSupport validationSupportChainDstu3() { - return new CachingValidationSupport(jpaValidationSupportChain()); - } - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r4/BaseR4Config.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r4/BaseR4Config.java index b97ab840e2d..3e550ffdc92 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r4/BaseR4Config.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r4/BaseR4Config.java @@ -17,13 +17,9 @@ import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4; import ca.uhn.fhir.jpa.term.api.ITermVersionAdapterSvc; import ca.uhn.fhir.jpa.util.ResourceCountCache; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR4; import ca.uhn.fhir.validation.IInstanceValidatorModule; import org.apache.commons.lang3.time.DateUtils; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.context.annotation.Bean; @@ -36,7 +32,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,33 +88,7 @@ public class BaseR4Config extends BaseConfigDstu3Plus { @Bean(name = GRAPHQL_PROVIDER_NAME) @Lazy public GraphQLProvider graphQLProvider() { - return new GraphQLProvider(fhirContextR4(), validationSupportChainR4(), graphqlStorageServices()); - } - - @Bean(name = "myInstanceValidatorR4") - @Lazy - public IInstanceValidatorModule instanceValidatorR4() { - FhirInstanceValidator val = new FhirInstanceValidator(); - IResourceValidator.BestPracticeWarningLevel level = IResourceValidator.BestPracticeWarningLevel.Warning; - val.setBestPracticeWarningLevel(level); - val.setValidationSupport(validationSupportChainR4()); - return val; - } - - @Bean - public DefaultProfileValidationSupport defaultProfileValidationSupport() { - return new DefaultProfileValidationSupport(); - } - - @Bean - public JpaValidationSupportChainR4 jpaValidationSupportChain() { - return new JpaValidationSupportChainR4(); - } - - @Bean(name = "myJpaValidationSupportR4", autowire = Autowire.BY_NAME) - public ca.uhn.fhir.jpa.dao.r4.IJpaValidationSupportR4 jpaValidationSupportR4() { - ca.uhn.fhir.jpa.dao.r4.JpaValidationSupportR4 retVal = new ca.uhn.fhir.jpa.dao.r4.JpaValidationSupportR4(); - return retVal; + return new GraphQLProvider(fhirContextR4(), validationSupportChain(), graphqlStorageServices()); } @Bean(name = "myResourceCountsCache") @@ -158,15 +128,10 @@ public class BaseR4Config extends BaseConfigDstu3Plus { return new TermLoaderSvcImpl(); } + @Override @Bean(autowire = Autowire.BY_TYPE) public ITermReadSvcR4 terminologyService() { return new TermReadSvcR4(); } - @Primary - @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChainR4") - public IValidationSupport validationSupportChainR4() { - return new CachingValidationSupport(jpaValidationSupportChain()); - } - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r5/BaseR5Config.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r5/BaseR5Config.java index baa0a23941c..eaffaced9d8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r5/BaseR5Config.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r5/BaseR5Config.java @@ -17,13 +17,9 @@ import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvcR5; import ca.uhn.fhir.jpa.term.api.ITermVersionAdapterSvc; import ca.uhn.fhir.jpa.util.ResourceCountCache; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR5; import ca.uhn.fhir.validation.IInstanceValidatorModule; import org.apache.commons.lang3.time.DateUtils; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.model.Bundle; import org.hl7.fhir.r5.utils.IResourceValidator; import org.springframework.beans.factory.annotation.Autowire; @@ -37,7 +33,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,33 +89,7 @@ public class BaseR5Config extends BaseConfigDstu3Plus { @Bean(name = GRAPHQL_PROVIDER_NAME) @Lazy public GraphQLProvider graphQLProvider() { - return new GraphQLProvider(fhirContextR5(), validationSupportChainR5(), graphqlStorageServices()); - } - - @Bean(name = "myInstanceValidatorR5") - @Lazy - public IInstanceValidatorModule instanceValidatorR5() { - FhirInstanceValidator val = new FhirInstanceValidator(); - IResourceValidator.BestPracticeWarningLevel level = IResourceValidator.BestPracticeWarningLevel.Warning; - val.setBestPracticeWarningLevel(level); - val.setValidationSupport(validationSupportChainR5()); - return val; - } - - @Bean - public DefaultProfileValidationSupport defaultProfileValidationSupport() { - return new DefaultProfileValidationSupport(); - } - - @Bean - public JpaValidationSupportChainR5 jpaValidationSupportChain() { - return new JpaValidationSupportChainR5(); - } - - @Bean(name = "myJpaValidationSupportR5", autowire = Autowire.BY_NAME) - public ca.uhn.fhir.jpa.dao.r5.IJpaValidationSupportR5 jpaValidationSupportR5() { - ca.uhn.fhir.jpa.dao.r5.JpaValidationSupportR5 retVal = new ca.uhn.fhir.jpa.dao.r5.JpaValidationSupportR5(); - return retVal; + return new GraphQLProvider(fhirContextR5(), validationSupportChain(), graphqlStorageServices()); } @Bean(name = "myResourceCountsCache") @@ -159,15 +129,10 @@ public class BaseR5Config extends BaseConfigDstu3Plus { return new TermLoaderSvcImpl(); } + @Override @Bean(autowire = Autowire.BY_TYPE) public ITermReadSvcR5 terminologyService() { return new TermReadSvcR5(); } - @Primary - @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChainR5") - public IValidationSupport validationSupportChainR5() { - return new CachingValidationSupport(jpaValidationSupportChain()); - } - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index f9d876d7ced..5340e9f096c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -1,21 +1,10 @@ package ca.uhn.fhir.jpa.dao; -import ca.uhn.fhir.context.BaseRuntimeChildDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementDefinition; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.context.RuntimeChildResourceDefinition; -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.RuntimeSearchParam; +import ca.uhn.fhir.context.*; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; -import ca.uhn.fhir.jpa.dao.data.IResourceHistoryTableDao; -import ca.uhn.fhir.jpa.dao.data.IResourceProvenanceDao; -import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; -import ca.uhn.fhir.jpa.dao.data.IResourceTagDao; +import ca.uhn.fhir.jpa.dao.data.*; import ca.uhn.fhir.jpa.dao.expunge.ExpungeService; import ca.uhn.fhir.jpa.dao.index.DaoSearchParamSynchronizer; import ca.uhn.fhir.jpa.dao.index.IdHelperService; @@ -86,11 +75,7 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter import org.springframework.transaction.support.TransactionSynchronizationManager; import javax.annotation.PostConstruct; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceContextType; -import javax.persistence.TypedQuery; +import javax.persistence.*; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; @@ -99,18 +84,13 @@ import javax.xml.stream.events.XMLEvent; import java.util.*; import java.util.Map.Entry; -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; -import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; -import static org.apache.commons.lang3.StringUtils.left; -import static org.apache.commons.lang3.StringUtils.trim; +import static org.apache.commons.lang3.StringUtils.*; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -153,8 +133,6 @@ public abstract class BaseHapiFhirDao extends BaseStora @Autowired protected ISearchCoordinatorSvc mySearchCoordinatorSvc; @Autowired - protected ISearchParamRegistry mySerarchParamRegistry; - @Autowired protected ITermReadSvc myTerminologySvc; @Autowired protected IResourceHistoryTableDao myResourceHistoryTableDao; @@ -162,8 +140,7 @@ public abstract class BaseHapiFhirDao extends BaseStora protected IResourceTableDao myResourceTableDao; @Autowired protected IResourceTagDao myResourceTagDao; - @Autowired - protected ISearchParamRegistry mySearchParamRegistry; + @Autowired protected DeleteConflictService myDeleteConflictService; @Autowired @@ -179,7 +156,7 @@ public abstract class BaseHapiFhirDao extends BaseStora @Autowired private ISearchParamPresenceSvc mySearchParamPresenceSvc; @Autowired - private DaoRegistry myDaoRegistry; + protected DaoRegistry myDaoRegistry; @Autowired private SearchParamWithInlineReferencesExtractor mySearchParamWithInlineReferencesExtractor; @Autowired @@ -317,7 +294,7 @@ public abstract class BaseHapiFhirDao extends BaseStora } @Override - protected DaoConfig getConfig() { + public DaoConfig getConfig() { return myConfig; } @@ -347,10 +324,6 @@ public abstract class BaseHapiFhirDao extends BaseStora } } - public IFhirResourceDao getDao(Class theType) { - return myDaoRegistry.getResourceDaoOrNull(theType); - } - protected TagDefinition getTagOrNull(TagTypeEnum theTagType, String theScheme, String theTerm, String theLabel) { if (isBlank(theScheme) && isBlank(theTerm) && isBlank(theLabel)) { return null; @@ -392,7 +365,6 @@ public abstract class BaseHapiFhirDao extends BaseStora Search search = new Search(); search.setDeleted(false); search.setCreated(new Date()); - search.setSearchLastReturned(new Date()); search.setLastUpdated(theSince, theUntil); search.setUuid(UUID.randomUUID().toString()); search.setResourceType(resourceName); @@ -420,7 +392,7 @@ public abstract class BaseHapiFhirDao extends BaseStora search = mySearchCacheSvc.save(search); - return new PersistedJpaBundleProvider(theRequest, search.getUuid(), this); + return new PersistedJpaBundleProvider(theRequest, search.getUuid(), this, mySearchBuilderFactory); } void incrementId(T theResource, ResourceTable theSavedEntity, IIdType theResourceId) { @@ -454,12 +426,6 @@ public abstract class BaseHapiFhirDao extends BaseStora return LogicalReferenceHelper.isLogicalReference(myConfig.getModelConfig(), theId); } - // TODO KHS inject a searchBuilderFactory into callers of this method and delete this method - @Override - public SearchBuilder newSearchBuilder() { - return mySearchBuilderFactory.newSearchBuilder(this); - } - public void notifyInterceptors(RestOperationTypeEnum theOperationType, ActionRequestDetails theRequestDetails) { if (theRequestDetails.getId() != null && theRequestDetails.getId().hasResourceType() && isNotBlank(theRequestDetails.getResourceType())) { if (theRequestDetails.getId().getResourceType().equals(theRequestDetails.getResourceType()) == false) { @@ -1180,7 +1146,7 @@ public abstract class BaseHapiFhirDao extends BaseStora } } - // Syncrhonize composite params + // Synchronize composite params mySearchParamWithInlineReferencesExtractor.storeCompositeStringUniques(newParams, entity, existingParams); } } @@ -1559,4 +1525,5 @@ public abstract class BaseHapiFhirDao extends BaseStora "Resource with ID " + theEntity.getIdDt().getIdPart() + " exists but it is not of type " + theResourceName + ", found resource of type " + theEntity.getResourceType()); } } + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 7a083953b51..75ff296ca14 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,19 +22,12 @@ package ca.uhn.fhir.jpa.dao; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.delete.DeleteConflictList; import ca.uhn.fhir.jpa.delete.DeleteConflictService; import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; -import ca.uhn.fhir.jpa.model.entity.BaseHasResource; -import ca.uhn.fhir.jpa.model.entity.BaseTag; -import ca.uhn.fhir.jpa.model.entity.ForcedId; -import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable; -import ca.uhn.fhir.jpa.model.entity.ResourceTable; -import ca.uhn.fhir.jpa.model.entity.TagDefinition; -import ca.uhn.fhir.jpa.model.entity.TagTypeEnum; +import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails; import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider; @@ -45,51 +38,20 @@ import ca.uhn.fhir.jpa.util.ExpungeOutcome; import ca.uhn.fhir.jpa.util.JpaInterceptorBroadcaster; import ca.uhn.fhir.jpa.util.jsonpatch.JsonPatchUtils; import ca.uhn.fhir.jpa.util.xmlpatch.XmlPatchUtils; -import ca.uhn.fhir.model.api.IQueryParameterAnd; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.api.CacheControlDirective; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.EncodingEnum; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.PatchTypeEnum; -import ca.uhn.fhir.rest.api.QualifiedParamList; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.ValidationModeEnum; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails; -import ca.uhn.fhir.rest.api.server.IPreResourceShowDetails; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.api.server.SimplePreResourceAccessDetails; -import ca.uhn.fhir.rest.api.server.SimplePreResourceShowDetails; -import ca.uhn.fhir.rest.param.ParameterUtil; -import ca.uhn.fhir.rest.param.QualifierDetails; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import ca.uhn.fhir.rest.api.*; +import ca.uhn.fhir.rest.api.server.*; +import ca.uhn.fhir.rest.server.exceptions.*; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; -import ca.uhn.fhir.rest.server.method.SearchMethodBinding; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.util.ObjectUtil; import ca.uhn.fhir.util.OperationOutcomeUtil; import ca.uhn.fhir.util.ReflectionUtil; import ca.uhn.fhir.util.StopWatch; -import ca.uhn.fhir.validation.FhirValidator; -import ca.uhn.fhir.validation.IInstanceValidatorModule; -import ca.uhn.fhir.validation.IValidationContext; -import ca.uhn.fhir.validation.IValidatorModule; -import ca.uhn.fhir.validation.ValidationOptions; -import ca.uhn.fhir.validation.ValidationResult; +import ca.uhn.fhir.validation.*; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseCoding; -import org.hl7.fhir.instance.model.api.IBaseMetaType; -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.hl7.fhir.instance.model.api.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Required; import org.springframework.transaction.PlatformTransactionManager; @@ -124,6 +86,11 @@ public abstract class BaseHapiFhirResourceDao extends B private MatchResourceUrlService myMatchResourceUrlService; @Autowired private IResourceReindexingSvc myResourceReindexingSvc; + @Autowired + private SearchBuilderFactory mySearchBuilderFactory; + @Autowired + private DaoRegistry myDaoRegistry; + private IInstanceValidatorModule myInstanceValidator; private String myResourceName; private Class myResourceType; @@ -214,8 +181,9 @@ public abstract class BaseHapiFhirResourceDao extends B @Override public DaoMethodOutcome delete(IIdType theId, DeleteConflictList theDeleteConflicts, RequestDetails theRequest) { validateIdPresentForDelete(theId); + validateDeleteEnabled(); - final ResourceTable entity = readEntityLatestVersion(theId, theRequest); + final ResourceTable entity = readEntityLatestVersion(theId); if (theId.hasVersionIdPart() && Long.parseLong(theId.getVersionIdPart()) != entity.getVersion()) { throw new ResourceVersionConflictException("Trying to delete " + theId + " but this is not the current version"); } @@ -291,6 +259,7 @@ public abstract class BaseHapiFhirResourceDao extends B @Override public DaoMethodOutcome delete(IIdType theId, RequestDetails theRequestDetails) { validateIdPresentForDelete(theId); + validateDeleteEnabled(); DeleteConflictList deleteConflicts = new DeleteConflictList(); if (isNotBlank(theId.getValue())) { @@ -313,6 +282,8 @@ public abstract class BaseHapiFhirResourceDao extends B */ @Override public DeleteMethodOutcome deleteByUrl(String theUrl, DeleteConflictList deleteConflicts, RequestDetails theRequest) { + validateDeleteEnabled(); + StopWatch w = new StopWatch(); Set resourceIds = myMatchResourceUrlService.processMatchUrl(theUrl, myResourceType, theRequest); @@ -388,6 +359,8 @@ public abstract class BaseHapiFhirResourceDao extends B @Override public DeleteMethodOutcome deleteByUrl(String theUrl, RequestDetails theRequestDetails) { + validateDeleteEnabled(); + DeleteConflictList deleteConflicts = new DeleteConflictList(); DeleteMethodOutcome outcome = deleteByUrl(theUrl, deleteConflicts, theRequestDetails); @@ -397,6 +370,13 @@ public abstract class BaseHapiFhirResourceDao extends B return outcome; } + private void validateDeleteEnabled() { + if (!myDaoConfig.isDeleteEnabled()) { + String msg = getContext().getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "deleteBlockedBecauseDisabled"); + throw new PreconditionFailedException(msg); + } + } + private void validateIdPresentForDelete(IIdType theId) { if (theId == null || !theId.hasIdPart()) { throw new InvalidRequestException("Can not perform delete, no ID provided"); @@ -716,7 +696,7 @@ public abstract class BaseHapiFhirResourceDao extends B throw new ResourceNotFoundException(theResourceId); } - ResourceTable latestVersion = readEntityLatestVersion(theResourceId, theRequest); + ResourceTable latestVersion = readEntityLatestVersion(theResourceId); if (latestVersion.getVersion() != entity.getVersion()) { doMetaAdd(theMetaAdd, entity); } else { @@ -748,7 +728,7 @@ public abstract class BaseHapiFhirResourceDao extends B throw new ResourceNotFoundException(theResourceId); } - ResourceTable latestVersion = readEntityLatestVersion(theResourceId, theRequest); + ResourceTable latestVersion = readEntityLatestVersion(theResourceId); if (latestVersion.getVersion() != entity.getVersion()) { doMetaDelete(theMetaDel, entity); } else { @@ -824,7 +804,7 @@ public abstract class BaseHapiFhirResourceDao extends B } } else { - entityToUpdate = readEntityLatestVersion(theId, theRequest); + entityToUpdate = readEntityLatestVersion(theId); if (theId.hasVersionIdPart()) { if (theId.getVersionIdPartAsLong() != entityToUpdate.getVersion()) { throw new ResourceVersionConflictException("Version " + theId.getVersionIdPart() + " is not the most recent version of this resource, unable to apply patch"); @@ -959,7 +939,7 @@ public abstract class BaseHapiFhirResourceDao extends B public BaseHasResource readEntity(IIdType theId, boolean theCheckForForcedId, RequestDetails theRequest) { validateResourceTypeAndThrowInvalidRequestException(theId); - ResourcePersistentId pid = myIdHelperService.translateForcedIdToPid(getResourceName(), theId.getIdPart(), theRequest); + ResourcePersistentId pid = myIdHelperService.resolveResourcePersistentIds(getResourceName(), theId.getIdPart()); BaseHasResource entity = myEntityManager.find(ResourceTable.class, pid.getIdAsLong()); if (entity == null) { @@ -997,8 +977,8 @@ public abstract class BaseHapiFhirResourceDao extends B return entity; } - protected ResourceTable readEntityLatestVersion(IIdType theId, RequestDetails theRequest) { - ResourcePersistentId persistentId = myIdHelperService.translateForcedIdToPid(getResourceName(), theId.getIdPart(), theRequest); + protected ResourceTable readEntityLatestVersion(IIdType theId) { + ResourcePersistentId persistentId = myIdHelperService.resolveResourcePersistentIds(getResourceName(), theId.getIdPart()); ResourceTable entity = myEntityManager.find(ResourceTable.class, persistentId.getId()); if (entity == null) { throw new ResourceNotFoundException(theId); @@ -1125,11 +1105,9 @@ public abstract class BaseHapiFhirResourceDao extends B @Override public Set searchForIds(SearchParameterMap theParams, RequestDetails theRequest) { + theParams.setLoadSynchronousUpTo(10000); - SearchBuilder builder = newSearchBuilder(); - builder.setType(getResourceType(), getResourceName()); - - // FIXME: fail if too many results + ISearchBuilder builder = mySearchBuilderFactory.newSearchBuilder(this, getResourceName(), getResourceType()); HashSet retVal = new HashSet<>(); @@ -1181,38 +1159,6 @@ public abstract class BaseHapiFhirResourceDao extends B return retVal; } - @Transactional(propagation = Propagation.SUPPORTS) - @Override - public void translateRawParameters(Map> theSource, SearchParameterMap theTarget) { - if (theSource == null || theSource.isEmpty()) { - return; - } - - Map searchParams = mySerarchParamRegistry.getActiveSearchParams(getResourceName()); - - Set paramNames = theSource.keySet(); - for (String nextParamName : paramNames) { - QualifierDetails qualifiedParamName = SearchMethodBinding.extractQualifiersFromParameterName(nextParamName); - RuntimeSearchParam param = searchParams.get(qualifiedParamName.getParamName()); - if (param == null) { - String msg = getContext().getLocalizer().getMessageSanitized(BaseHapiFhirResourceDao.class, "invalidSearchParameter", qualifiedParamName.getParamName(), new TreeSet<>(searchParams.keySet())); - throw new InvalidRequestException(msg); - } - - // Should not be null since the check above would have caught it - RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(myResourceName); - RuntimeSearchParam paramDef = mySearchParamRegistry.getSearchParamByName(resourceDef, qualifiedParamName.getParamName()); - - for (String nextValue : theSource.get(nextParamName)) { - QualifiedParamList qualifiedParam = QualifiedParamList.splitQueryStringByCommasIgnoreEscape(qualifiedParamName.getWholeQualifier(), nextValue); - List paramList = Collections.singletonList(qualifiedParam); - IQueryParameterAnd parsedParam = ParameterUtil.parseQueryParams(getContext(), paramDef, nextParamName, paramList); - theTarget.add(qualifiedParamName.getParamName(), parsedParam); - } - - } - } - @Override public DaoMethodOutcome update(T theResource) { return update(theResource, null, null); @@ -1273,7 +1219,7 @@ public abstract class BaseHapiFhirResourceDao extends B resourceId = theResource.getIdElement(); try { - entity = readEntityLatestVersion(resourceId, theRequest); + entity = readEntityLatestVersion(resourceId); } catch (ResourceNotFoundException e) { return doCreate(theResource, null, thePerformIndexing, new Date(), theRequest); } @@ -1345,7 +1291,7 @@ public abstract class BaseHapiFhirResourceDao extends B if (theId == null || theId.hasIdPart() == false) { throw new InvalidRequestException("No ID supplied. ID is required when validating with mode=DELETE"); } - final ResourceTable entity = readEntityLatestVersion(theId, theRequest); + final ResourceTable entity = readEntityLatestVersion(theId); // Validate that there are no resources pointing to the candidate that // would prevent deletion @@ -1367,7 +1313,7 @@ public abstract class BaseHapiFhirResourceDao extends B IBaseResource resourceToValidateById = null; if (theId != null && theId.hasResourceType() && theId.hasIdPart()) { Class type = getContext().getResourceDefinition(theId.getResourceType()).getImplementingClass(); - IFhirResourceDao dao = getDao(type); + IFhirResourceDao dao = myDaoRegistry.getResourceDaoOrNull(type); resourceToValidateById = dao.read(theId, theRequest); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java index 0d4cf96a5d9..c1c16f510fc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java @@ -24,7 +24,7 @@ import java.util.Map; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java index b69b7db2f79..1fa8df75b65 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,19 +21,24 @@ package ca.uhn.fhir.jpa.dao; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import ca.uhn.fhir.jpa.util.JpaInterceptorBroadcaster; -import ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails; -import ca.uhn.fhir.rest.api.server.IPreResourceShowDetails; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.api.server.SimplePreResourceAccessDetails; -import ca.uhn.fhir.rest.api.server.SimplePreResourceShowDetails; +import ca.uhn.fhir.model.api.IQueryParameterAnd; +import ca.uhn.fhir.rest.api.QualifiedParamList; +import ca.uhn.fhir.rest.api.server.*; +import ca.uhn.fhir.rest.param.ParameterUtil; +import ca.uhn.fhir.rest.param.QualifierDetails; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import ca.uhn.fhir.rest.server.method.SearchMethodBinding; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.util.BundleUtil; import ca.uhn.fhir.util.FhirTerser; @@ -44,19 +49,23 @@ import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.InstantType; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; -import java.util.List; -import java.util.Set; +import java.util.*; import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.OO_SEVERITY_ERROR; import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.OO_SEVERITY_INFO; -import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.isNotBlank; public abstract class BaseStorageDao { + @Autowired + protected ISearchParamRegistry mySearchParamRegistry; /** * May be overridden by subclasses to validate resources prior to storage @@ -95,7 +104,8 @@ public abstract class BaseStorageDao { if ("Bundle".equals(type)) { Set allowedBundleTypes = getConfig().getBundleTypesAllowedForStorage(); String bundleType = BundleUtil.getBundleType(getContext(), (IBaseBundle) theResource); - if (isBlank(bundleType) || !allowedBundleTypes.contains(bundleType)) { + bundleType = defaultString(bundleType); + if (!allowedBundleTypes.contains(bundleType)) { String message = "Unable to store a Bundle resource on this server with a Bundle.type value of: " + (isNotBlank(bundleType) ? bundleType : "(missing)"); throw new UnprocessableEntityException(message); } @@ -201,4 +211,36 @@ public abstract class BaseStorageDao { */ protected abstract FhirContext getContext(); + + @Transactional(propagation = Propagation.SUPPORTS) + public void translateRawParameters(Map> theSource, SearchParameterMap theTarget) { + if (theSource == null || theSource.isEmpty()) { + return; + } + + Map searchParams = mySearchParamRegistry.getActiveSearchParams(getResourceName()); + + Set paramNames = theSource.keySet(); + for (String nextParamName : paramNames) { + QualifierDetails qualifiedParamName = SearchMethodBinding.extractQualifiersFromParameterName(nextParamName); + RuntimeSearchParam param = searchParams.get(qualifiedParamName.getParamName()); + if (param == null) { + String msg = getContext().getLocalizer().getMessageSanitized(BaseHapiFhirResourceDao.class, "invalidSearchParameter", qualifiedParamName.getParamName(), new TreeSet<>(searchParams.keySet())); + throw new InvalidRequestException(msg); + } + + // Should not be null since the check above would have caught it + RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(getResourceName()); + RuntimeSearchParam paramDef = mySearchParamRegistry.getSearchParamByName(resourceDef, qualifiedParamName.getParamName()); + + for (String nextValue : theSource.get(nextParamName)) { + QualifiedParamList qualifiedParam = QualifiedParamList.splitQueryStringByCommasIgnoreEscape(qualifiedParamName.getWholeQualifier(), nextValue); + List paramList = Collections.singletonList(qualifiedParam); + IQueryParameterAnd parsedParam = ParameterUtil.parseQueryParams(getContext(), paramDef, nextParamName, paramList); + theTarget.add(qualifiedParamName.getParamName(), parsedParam); + } + + } + } + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index 90c0c229603..1fa898bf1c0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoConfig.java index 719a0ac209f..3ebeadeca5b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoConfig.java @@ -15,13 +15,18 @@ import org.hl7.fhir.r4.model.Bundle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,12 +58,6 @@ public class DaoConfig { * See {@link #setStatusBasedReindexingDisabled(boolean)} */ public static final String DISABLE_STATUS_BASED_REINDEX = "disable_status_based_reindex"; - /** - * Default value for {@link #setMaximumSearchResultCountInTransaction(Integer)} - * - * @see #setMaximumSearchResultCountInTransaction(Integer) - */ - private static final Integer DEFAULT_MAXIMUM_SEARCH_RESULT_COUNT_IN_TRANSACTION = null; /** * Default {@link #setBundleTypesAllowedForStorage(Set)} value: *
    @@ -73,12 +72,16 @@ public class DaoConfig { Bundle.BundleType.DOCUMENT.toCode(), Bundle.BundleType.MESSAGE.toCode() ))); - private static final Logger ourLog = LoggerFactory.getLogger(DaoConfig.class); - private static final int DEFAULT_EXPUNGE_BATCH_SIZE = 800; - // update setter javadoc if default changes public static final int DEFAULT_MAX_EXPANSION_SIZE = 1000; - + /** + * Default value for {@link #setMaximumSearchResultCountInTransaction(Integer)} + * + * @see #setMaximumSearchResultCountInTransaction(Integer) + */ + private static final Integer DEFAULT_MAXIMUM_SEARCH_RESULT_COUNT_IN_TRANSACTION = null; + private static final Logger ourLog = LoggerFactory.getLogger(DaoConfig.class); + private static final int DEFAULT_EXPUNGE_BATCH_SIZE = 800; private IndexEnabledEnum myIndexMissingFieldsEnabled = IndexEnabledEnum.DISABLED; /** @@ -99,7 +102,7 @@ public class DaoConfig { /** * update setter javadoc if default changes */ - private int myDeferIndexingForCodesystemsOfSize = 2000; + private int myDeferIndexingForCodesystemsOfSize = 100; private boolean myDeleteStaleSearches = true; private boolean myEnforceReferentialIntegrityOnDelete = true; private boolean myUniqueIndexesEnabled = true; @@ -175,6 +178,16 @@ public class DaoConfig { */ private int myPreExpandValueSetsMaxCount = 1000; + /** + * @since 4.2.0 + */ + private boolean myPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets; + + /** + * @since 5.0.0 + */ + private boolean myDeleteEnabled = true; + /** * Constructor */ @@ -384,7 +397,7 @@ public class DaoConfig { * the code system will be indexed later in an incremental process in order to * avoid overwhelming Lucene with a huge number of codes in a single operation. *

    - * Defaults to 2000 + * Defaults to 100 *

    */ public int getDeferIndexingForCodesystemsOfSize() { @@ -396,7 +409,7 @@ public class DaoConfig { * the code system will be indexed later in an incremental process in order to * avoid overwhelming Lucene with a huge number of codes in a single operation. *

    - * Defaults to 2000 + * Defaults to 100 *

    */ public void setDeferIndexingForCodesystemsOfSize(int theDeferIndexingForCodesystemsOfSize) { @@ -570,7 +583,7 @@ public class DaoConfig { * the operation will be failed as too costly. Note that this setting applies only to * in-memory expansions and does not apply to expansions that are being pre-calculated. *

    - * The default value for this setting is 1000. + * The default value for this setting is 1000. *

    */ public void setMaximumExpansionSize(int theMaximumExpansionSize) { @@ -993,6 +1006,108 @@ public class DaoConfig { myAutoCreatePlaceholderReferenceTargets = theAutoCreatePlaceholderReferenceTargets; } + /** + * When {@link #setAutoCreatePlaceholderReferenceTargets(boolean)} is enabled, if this + * setting is set to true (default is false) and the source + * reference has an identifier populated, the identifier will be copied to the target + * resource. + *

    + * When enabled, if an Observation contains a reference like the one below, + * and no existing resource was found that matches the given ID, a new + * one will be created and its Patient.identifier value will be + * populated using the value from Observation.subject.identifier. + *

    + *
    +	 * {
    +	 *   "resourceType": "Observation",
    +	 *   "subject": {
    +	 *     "reference": "Patient/ABC",
    +	 *     "identifier": {
    +	 *       "system": "http://foo",
    +	 *       "value": "123"
    +	 *     }
    +	 *   }
    +	 * }
    +	 * 
    + *

    + * This method is often combined with {@link #setAllowInlineMatchUrlReferences(boolean)}. + *

    + *

    + * In other words if an Observation contains a reference like the one below, + * and no existing resource was found that matches the given match URL, a new + * one will be created and its Patient.identifier value will be + * populated using the value from Observation.subject.identifier. + *

    + *
    +	 * {
    +	 *   "resourceType": "Observation",
    +	 *   "subject": {
    +	 *     "reference": "Patient?identifier=http://foo|123",
    +	 *     "identifier": {
    +	 *       "system": "http://foo",
    +	 *       "value": "123"
    +	 *     }
    +	 *   }
    +	 * }
    +	 * 
    + * + * @since 4.2.0 + */ + public boolean isPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets() { + return myPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets; + } + + /** + * When {@link #setAutoCreatePlaceholderReferenceTargets(boolean)} is enabled, if this + * setting is set to true (default is false) and the source + * reference has an identifier populated, the identifier will be copied to the target + * resource. + *

    + * When enabled, if an Observation contains a reference like the one below, + * and no existing resource was found that matches the given ID, a new + * one will be created and its Patient.identifier value will be + * populated using the value from Observation.subject.identifier. + *

    + *
    +	 * {
    +	 *   "resourceType": "Observation",
    +	 *   "subject": {
    +	 *     "reference": "Patient/ABC",
    +	 *     "identifier": {
    +	 *       "system": "http://foo",
    +	 *       "value": "123"
    +	 *     }
    +	 *   }
    +	 * }
    +	 * 
    + *

    + * This method is often combined with {@link #setAllowInlineMatchUrlReferences(boolean)}. + *

    + *

    + * In other words if an Observation contains a reference like the one below, + * and no existing resource was found that matches the given match URL, a new + * one will be created and its Patient.identifier value will be + * populated using the value from Observation.subject.identifier. + *

    + *
    +	 * {
    +	 *   "resourceType": "Observation",
    +	 *   "subject": {
    +	 *     "reference": "Patient?identifier=http://foo|123",
    +	 *     "identifier": {
    +	 *       "system": "http://foo",
    +	 *       "value": "123"
    +	 *     }
    +	 *   }
    +	 * }
    +	 * 
    + * + * @since 4.2.0 + */ + public void setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(boolean thePopulateIdentifierInAutoCreatedPlaceholderReferenceTargets) { + myPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets = thePopulateIdentifierInAutoCreatedPlaceholderReferenceTargets; + } + /** * If set to false (default is true) resources will be permitted to be * deleted even if other resources currently contain references to them. @@ -1682,29 +1797,6 @@ public class DaoConfig { myStoreMetaSourceInformation = theStoreMetaSourceInformation; } - public enum StoreMetaSourceInformationEnum { - NONE(false, false), - SOURCE_URI(true, false), - REQUEST_ID(false, true), - SOURCE_URI_AND_REQUEST_ID(true, true); - - private final boolean myStoreSourceUri; - private final boolean myStoreRequestId; - - StoreMetaSourceInformationEnum(boolean theStoreSourceUri, boolean theStoreRequestId) { - myStoreSourceUri = theStoreSourceUri; - myStoreRequestId = theStoreRequestId; - } - - public boolean isStoreSourceUri() { - return myStoreSourceUri; - } - - public boolean isStoreRequestId() { - return myStoreRequestId; - } - } - /** *

    * If set to {@code true}, ValueSets and expansions are stored in terminology tables. This is to facilitate @@ -1820,6 +1912,55 @@ public class DaoConfig { setPreExpandValueSetsDefaultCount(Math.min(getPreExpandValueSetsDefaultCount(), getPreExpandValueSetsMaxCount())); } + /** + * This setting should be disabled (set to false) on servers that are not allowing + * deletes. Default is true. If deletes are disabled, some checks for resource + * deletion can be skipped, which improves performance. This is particularly helpful when large + * amounts of data containing client-assigned IDs are being loaded, but it can also improve + * search performance. + * + * @since 5.0.0 + */ + public void setDeleteEnabled(boolean theDeleteEnabled) { + myDeleteEnabled = theDeleteEnabled; + } + + /** + * This setting should be disabled (set to false) on servers that are not allowing + * deletes. Default is true. If deletes are disabled, some checks for resource + * deletion can be skipped, which improves performance. This is particularly helpful when large + * amounts of data containing client-assigned IDs are being loaded, but it can also improve + * search performance. + * + * @since 5.0.0 + */ + public boolean isDeleteEnabled() { + return myDeleteEnabled; + } + + public enum StoreMetaSourceInformationEnum { + NONE(false, false), + SOURCE_URI(true, false), + REQUEST_ID(false, true), + SOURCE_URI_AND_REQUEST_ID(true, true); + + private final boolean myStoreSourceUri; + private final boolean myStoreRequestId; + + StoreMetaSourceInformationEnum(boolean theStoreSourceUri, boolean theStoreRequestId) { + myStoreSourceUri = theStoreSourceUri; + myStoreRequestId = theStoreRequestId; + } + + public boolean isStoreSourceUri() { + return myStoreSourceUri; + } + + public boolean isStoreRequestId() { + return myStoreRequestId; + } + } + public enum IndexEnabledEnum { ENABLED, DISABLED diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java index f0a4a417d97..b1f0028314f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoRegistry.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoRegistry.java index c4ddba66b4d..140658195e1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoRegistry.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoRegistry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoSearchParamProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoSearchParamProvider.java index 34796ae6e73..dcb3d06dbae 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoSearchParamProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoSearchParamProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DeleteMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DeleteMethodOutcome.java index 0d83c8afb78..8b59cc6efe9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DeleteMethodOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DeleteMethodOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/EncodedResource.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/EncodedResource.java index 3a29507de8c..009d2b1bdc8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/EncodedResource.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/EncodedResource.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoBundleDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoBundleDstu2.java index b2d363a52fc..f84fa10dbdc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoBundleDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoBundleDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoCompositionDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoCompositionDstu2.java index 64de9e50008..49786660706 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoCompositionDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoCompositionDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoEncounterDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoEncounterDstu2.java index d729bb33953..b3513d8dcf7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoEncounterDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoEncounterDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoMessageHeaderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoMessageHeaderDstu2.java index a5d16f10800..21a607766c4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoMessageHeaderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoMessageHeaderDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java index 0511e20ce1a..f9f5ac115f7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java index 59458ef8885..d7f6cd10e9d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSearchParameterDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSearchParameterDstu2.java index d8425ad7250..da4cacaddd1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSearchParameterDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSearchParameterDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoStructureDefinitionDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoStructureDefinitionDstu2.java index c9ed359dfc3..bf0f1e42476 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoStructureDefinitionDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoStructureDefinitionDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ package ca.uhn.fhir.jpa.dao; */ import ca.uhn.fhir.model.dstu2.resource.StructureDefinition; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; public class FhirResourceDaoStructureDefinitionDstu2 extends BaseHapiFhirResourceDao implements IFhirResourceDaoStructureDefinition { @Override public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) { - // FIXME: implement - return null; + throw new InvalidRequestException("Snapshot generation not supported for DSTU2"); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSubscriptionDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSubscriptionDstu2.java index d0ccc38d50b..ece01089fe6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSubscriptionDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoSubscriptionDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,16 +20,12 @@ package ca.uhn.fhir.jpa.dao; * #L% */ -import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.jpa.dao.data.ISubscriptionTableDao; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.entity.SubscriptionTable; import ca.uhn.fhir.model.dstu2.resource.Subscription; -import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum; -import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.springframework.beans.factory.annotation.Autowired; @@ -37,8 +33,6 @@ import org.springframework.transaction.PlatformTransactionManager; import java.util.Date; -import static org.apache.commons.lang3.StringUtils.isBlank; - public class FhirResourceDaoSubscriptionDstu2 extends BaseHapiFhirResourceDao implements IFhirResourceDaoSubscription { @Autowired @@ -56,7 +50,7 @@ public class FhirResourceDaoSubscriptionDstu2 extends BaseHapiFhirResourceDao valueSetIds; Set ids = searchForIds(new SearchParameterMap(ValueSet.SP_CODE, new TokenParam(theSystem, theCode)), theRequest); - valueSetIds = new ArrayList(); + valueSetIds = new ArrayList<>(); for (ResourcePersistentId next : ids) { IIdType id = myIdHelperService.translatePidIdToForcedId(myFhirContext, "ValueSet", next); valueSetIds.add(id); @@ -194,7 +194,7 @@ public class FhirResourceDaoValueSetDstu2 extends BaseHapiFhirResourceDao theContains, String theSystem, String theCode) { + private IValidationSupport.LookupCodeResult lookup(List theContains, String theSystem, String theCode) { for (ExpansionContains nextCode : theContains) { String system = nextCode.getSystem(); String code = nextCode.getCode(); if (theSystem.equals(system) && theCode.equals(code)) { - IContextValidationSupport.LookupCodeResult retVal = new IContextValidationSupport.LookupCodeResult(); + IValidationSupport.LookupCodeResult retVal = new IValidationSupport.LookupCodeResult(); retVal.setSearchedForCode(code); retVal.setSearchedForSystem(system); retVal.setFound(true); @@ -232,7 +232,7 @@ public class FhirResourceDaoValueSetDstu2 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, CodingDt theCoding, RequestDetails theRequest) { + public IValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, CodingDt theCoding, RequestDetails theRequest) { boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode()); boolean haveCode = theCode != null && theCode.isEmpty() == false; boolean haveSystem = theSystem != null && theSystem.isEmpty() == false; @@ -258,13 +258,13 @@ public class FhirResourceDaoValueSetDstu2 extends BaseHapiFhirResourceDao contains = expansion.getExpansion().getContains(); - IContextValidationSupport.LookupCodeResult result = lookup(contains, system, code); + IValidationSupport.LookupCodeResult result = lookup(contains, system, code); if (result != null) { return result; } } - IContextValidationSupport.LookupCodeResult retVal = new IContextValidationSupport.LookupCodeResult(); + IValidationSupport.LookupCodeResult retVal = new IValidationSupport.LookupCodeResult(); retVal.setFound(false); retVal.setSearchedForCode(code); retVal.setSearchedForSystem(system); @@ -280,7 +280,7 @@ public class FhirResourceDaoValueSetDstu2 extends BaseHapiFhirResourceDao { } IFhirResourceDao dao = null; if (resType != null) { - dao = getDao(resType.getImplementingClass()); + dao = this.myDaoRegistry.getResourceDaoOrNull(resType.getImplementingClass()); } if (dao == null) { String msg = getContext().getLocalizer().getMessage(BaseHapiFhirSystemDao.class, "transactionInvalidUrl", theVerb, theUrl); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java index 8236bb2517f..00389549467 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -229,7 +229,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc { StringParam idParm = (StringParam) idParam; idParamValue = idParm.getValue(); } - pid = myIdHelperService.translateForcedIdToPid(theResourceName, idParamValue, theRequest); +// pid = myIdHelperService.translateForcedIdToPid_(theResourceName, idParamValue, theRequest); } ResourcePersistentId referencingPid = pid; @@ -282,7 +282,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc { if (contextParts.length != 3 || "Patient".equals(contextParts[0]) == false || "$everything".equals(contextParts[2]) == false) { throw new InvalidRequestException("Invalid context: " + theContext); } - ResourcePersistentId pid = myIdHelperService.translateForcedIdToPid(contextParts[0], contextParts[1], theRequest); + ResourcePersistentId pid = myIdHelperService.resolveResourcePersistentIds(contextParts[0], contextParts[1]); FullTextEntityManager em = org.hibernate.search.jpa.Search.getFullTextEntityManager(myEntityManager); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/GZipUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/GZipUtil.java index d905640d041..4b2f74986de 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/GZipUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/GZipUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java index aaa319b3f25..2c106b38565 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java @@ -14,7 +14,7 @@ import java.util.Collection; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,8 +48,6 @@ public interface IDao { */ void injectDependenciesIntoBundleProvider(PersistedJpaBundleProvider theProvider); - ISearchBuilder newSearchBuilder(); - IBaseResource toResource(BaseHasResource theEntity, boolean theForHistoryOperation); R toResource(Class theResourceType, IBaseResourceEntity theEntity, Collection theTagList, boolean theForHistoryOperation); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java index 128884b4527..0f396de735a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoCodeSystem.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoCodeSystem.java index d01ce0d3c9b..19ff4a54d0d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoCodeSystem.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoCodeSystem.java @@ -1,7 +1,7 @@ package ca.uhn.fhir.jpa.dao; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.util.ParametersUtil; import org.hl7.fhir.instance.model.api.IBaseParameters; @@ -17,7 +17,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ public interface IFhirResourceDaoCodeSystem ext List findCodeSystemIdsContainingSystemAndCode(String theCode, String theSystem, RequestDetails theRequest); @Nonnull - IContextValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, CD theCoding, RequestDetails theRequestDetails); + IValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, CD theCoding, RequestDetails theRequestDetails); SubsumesResult subsumes(IPrimitiveType theCodeA, IPrimitiveType theCodeB, IPrimitiveType theSystem, CD theCodingA, CD theCodingB, RequestDetails theRequestDetails); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoComposition.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoComposition.java index 7a7b6849271..08a7f77279f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoComposition.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoComposition.java @@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletRequest; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoConceptMap.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoConceptMap.java index e7639c3c696..2f16a132b4c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoConceptMap.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoConceptMap.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoEncounter.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoEncounter.java index d46c786220b..3bc801ed932 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoEncounter.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoEncounter.java @@ -6,7 +6,7 @@ import javax.servlet.http.HttpServletRequest; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoMessageHeader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoMessageHeader.java index 28f2d980afe..512369d7db3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoMessageHeader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoMessageHeader.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoPatient.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoPatient.java index 06b282b28dd..500de64b535 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoPatient.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoPatient.java @@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletRequest; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSearchParameter.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSearchParameter.java index 3c7fc2ba6a3..964826a5209 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSearchParameter.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSearchParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoStructureDefinition.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoStructureDefinition.java index 228f8140468..306cb4b1d49 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoStructureDefinition.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoStructureDefinition.java @@ -6,7 +6,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSubscription.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSubscription.java index d29870bb25e..a76d894278c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSubscription.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoSubscription.java @@ -8,7 +8,7 @@ import org.hl7.fhir.instance.model.api.IIdType; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoValueSet.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoValueSet.java index 3131726b20f..a186412745d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoValueSet.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDaoValueSet.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java index 91213180336..38d841b6629 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import ca.uhn.fhir.jpa.util.ExpungeOutcome; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; import org.hl7.fhir.instance.model.api.IBaseBundle; -import org.hl7.fhir.instance.model.api.IBaseResource; import javax.annotation.Nullable; import java.util.Date; @@ -43,9 +42,6 @@ public interface IFhirSystemDao extends IDao { ExpungeOutcome expunge(ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails); - @SuppressWarnings("unchecked") - IFhirResourceDao getDao(Class theType); - Map getResourceCounts(); /** diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFulltextSearchSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFulltextSearchSvc.java index fed8de1d10e..4a7403fde2a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFulltextSearchSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFulltextSearchSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaValidationSupportDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IHapiJpaRepository.java similarity index 74% rename from hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaValidationSupportDstu2.java rename to hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IHapiJpaRepository.java index dfc6037d92b..4ac0d295d41 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaValidationSupportDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IHapiJpaRepository.java @@ -1,10 +1,10 @@ package ca.uhn.fhir.jpa.dao; -/* +/*- * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,10 @@ package ca.uhn.fhir.jpa.dao; * #L% */ -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; +import org.springframework.data.jpa.repository.JpaRepository; -public interface IJpaValidationSupportDstu2 extends IValidationSupport { +public interface IHapiJpaRepository extends JpaRepository { + + void deleteByPid(Long theId); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaDao.java index 5ba308301d4..df636d7a560 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IJpaDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IResultIterator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IResultIterator.java index 17358a34bad..1b84f581849 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IResultIterator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IResultIterator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,4 +29,6 @@ public interface IResultIterator extends Iterator, Closeab int getSkippedCount(); + int getNonSkippedCount(); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/ISearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/ISearchBuilder.java index 2d1637c2244..b4752748e78 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/ISearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/ISearchBuilder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,13 +29,12 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.param.DateRangeParam; import org.hl7.fhir.instance.model.api.IBaseResource; +import javax.persistence.EntityManager; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Set; -import javax.persistence.EntityManager; - public interface ISearchBuilder { IResultIterator createQuery(SearchParameterMap theParams, SearchRuntimeDetails theSearchRuntime, RequestDetails theRequest); @@ -54,8 +53,6 @@ public interface ISearchBuilder { */ void setFetchSize(int theFetchSize); - void setType(Class theResourceType, String theResourceName); - void setPreviouslyAddedResourcePids(List thePreviouslyAddedResourcePids); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IndexedParam.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IndexedParam.java index e1a00e6d41b..de0d2d7f45b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IndexedParam.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IndexedParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaPersistedResourceValidationSupport.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaPersistedResourceValidationSupport.java new file mode 100644 index 00000000000..55112070a87 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaPersistedResourceValidationSupport.java @@ -0,0 +1,194 @@ +package ca.uhn.fhir.jpa.dao; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.param.UriParam; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.ImplementationGuide; +import org.hl7.fhir.r4.model.Questionnaire; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.ValueSet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.PostConstruct; +import javax.transaction.Transactional; + +import static org.apache.commons.lang3.StringUtils.isBlank; + +/** + * This class is a {@link IValidationSupport Validation support} module that loads + * validation resources (StructureDefinition, ValueSet, CodeSystem, etc.) from the resources + * persisted in the JPA server. + */ +@Transactional(value = Transactional.TxType.REQUIRED) +public class JpaPersistedResourceValidationSupport implements IValidationSupport { + + private static final Logger ourLog = LoggerFactory.getLogger(JpaPersistedResourceValidationSupport.class); + + private final FhirContext myFhirContext; + + @Autowired + private DaoRegistry myDaoRegistry; + private Class myCodeSystemType; + private Class myStructureDefinitionType; + private Class myValueSetType; + private Class myQuestionnaireType; + private Class myImplementationGuideType; + + /** + * Constructor + */ + public JpaPersistedResourceValidationSupport(FhirContext theFhirContext) { + super(); + Validate.notNull(theFhirContext); + myFhirContext = theFhirContext; + } + + + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + return fetchResource(myCodeSystemType, theSystem); + } + + @Override + public IBaseResource fetchValueSet(String theSystem) { + return fetchResource(myValueSetType, theSystem); + } + + @Override + public IBaseResource fetchStructureDefinition(String theUrl) { + return fetchResource(myStructureDefinitionType, theUrl); + } + + + @Override + @SuppressWarnings({"unchecked", "unused"}) + public T fetchResource(Class theClass, String theUri) { + if (isBlank(theUri)) { + return null; + } + + IdType id = new IdType(theUri); + boolean localReference = false; + if (id.hasBaseUrl() == false && id.hasIdPart() == true) { + localReference = true; + } + + String resourceName = myFhirContext.getResourceDefinition(theClass).getName(); + IBundleProvider search; + if ("ValueSet".equals(resourceName)) { + if (localReference) { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(IAnyResource.SP_RES_ID, new StringParam(theUri)); + search = myDaoRegistry.getResourceDao("ValueSet").search(params); + if (search.size() == 0) { + params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(ValueSet.SP_URL, new UriParam(theUri)); + search = myDaoRegistry.getResourceDao("ValueSet").search(params); + } + } else { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(ValueSet.SP_URL, new UriParam(theUri)); + search = myDaoRegistry.getResourceDao("ValueSet").search(params); + } + } else if ("StructureDefinition".equals(resourceName)) { + // Don't allow the core FHIR definitions to be overwritten + if (theUri.startsWith("http://hl7.org/fhir/StructureDefinition/")) { + String typeName = theUri.substring("http://hl7.org/fhir/StructureDefinition/".length()); + if (myFhirContext.getElementDefinition(typeName) != null) { + return null; + } + } + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(StructureDefinition.SP_URL, new UriParam(theUri)); + search = myDaoRegistry.getResourceDao("StructureDefinition").search(params); + } else if ("Questionnaire".equals(resourceName)) { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + if (localReference || myFhirContext.getVersion().getVersion().isEquivalentTo(FhirVersionEnum.DSTU2)) { + params.add(IAnyResource.SP_RES_ID, new StringParam(id.getIdPart())); + } else { + params.add(Questionnaire.SP_URL, new UriParam(id.getValue())); + } + search = myDaoRegistry.getResourceDao("Questionnaire").search(params); + } else if ("CodeSystem".equals(resourceName)) { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(CodeSystem.SP_URL, new UriParam(theUri)); + search = myDaoRegistry.getResourceDao(resourceName).search(params); + } else if ("ImplementationGuide".equals(resourceName)) { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronousUpTo(1); + params.add(ImplementationGuide.SP_URL, new UriParam(theUri)); + search = myDaoRegistry.getResourceDao("ImplementationGuide").search(params); + } else { + throw new IllegalArgumentException("Can't fetch resource type: " + resourceName); + } + + Integer size = search.size(); + if (size == null || size == 0) { + return null; + } + + if (size > 1) { + ourLog.warn("Found multiple {} instances with URL search value of: {}", resourceName, theUri); + } + + return (T) search.getResources(0, 1).get(0); + } + + @Override + public FhirContext getFhirContext() { + return myFhirContext; + } + + @PostConstruct + public void start() { + myStructureDefinitionType = myFhirContext.getResourceDefinition("StructureDefinition").getImplementingClass(); + myValueSetType = myFhirContext.getResourceDefinition("ValueSet").getImplementingClass(); + myQuestionnaireType = myFhirContext.getResourceDefinition("Questionnaire").getImplementingClass(); + myImplementationGuideType = myFhirContext.getResourceDefinition("ImplementationGuide").getImplementingClass(); + + if (myFhirContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU2)) { + myCodeSystemType = myFhirContext.getResourceDefinition("CodeSystem").getImplementingClass(); + } else { + myCodeSystemType = myFhirContext.getResourceDefinition("ValueSet").getImplementingClass(); + } + } + + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaResourceDao.java index 185d9561c82..91ca0162eea 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaResourceDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaValidationSupportDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaValidationSupportDstu2.java deleted file mode 100644 index b0940a5e98f..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaValidationSupportDstu2.java +++ /dev/null @@ -1,144 +0,0 @@ -package ca.uhn.fhir.jpa.dao; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.model.dstu2.resource.Questionnaire; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.rest.param.UriParam; -import org.hl7.fhir.dstu2.model.IdType; -import org.hl7.fhir.dstu2.model.StructureDefinition; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -import javax.transaction.Transactional; -import javax.transaction.Transactional.TxType; -import java.util.ArrayList; -import java.util.List; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -@Transactional(value = TxType.REQUIRED) -public class JpaValidationSupportDstu2 implements IJpaValidationSupportDstu2 { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JpaValidationSupportDstu2.class); - - @Autowired - @Qualifier("myFhirContextDstu2Hl7Org") - private FhirContext myRiCtx; - - @Autowired - @Qualifier("myStructureDefinitionDaoDstu2") - private IFhirResourceDao myStructureDefinitionDao; - - @Autowired - @Qualifier("myQuestionnaireDaoDstu2") - private IFhirResourceDao myQuestionnaireDao; - - @Autowired - @Qualifier("myValueSetDaoDstu2") - private IFhirResourceDao myValueSetDao; - - @Autowired - @Qualifier("myFhirContextDstu2") - private FhirContext myDstu2Ctx; - - @Override - public List allStructures() { - return new ArrayList<>(); - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - return null; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public ValueSet fetchCodeSystem(FhirContext theCtx, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - String resourceName = myRiCtx.getResourceDefinition(theClass).getName(); - IBundleProvider search; - IdType uriAsId = new IdType(theUri); - if ("ValueSet".equals(resourceName)) { - SearchParameterMap params = new SearchParameterMap(); - params.add(ca.uhn.fhir.model.dstu2.resource.ValueSet.SP_URL, new UriParam(theUri)); - params.setLoadSynchronousUpTo(10); - search = myValueSetDao.search(params); - } else if ("StructureDefinition".equals(resourceName)) { - search = myStructureDefinitionDao.search(new SearchParameterMap().setLoadSynchronous(true).add(ca.uhn.fhir.model.dstu2.resource.StructureDefinition.SP_URL, new UriParam(theUri))); - } else if ("Questionnaire".equals(resourceName)) { - search = myQuestionnaireDao.search(new SearchParameterMap().setLoadSynchronous(true).add(Questionnaire.SP_RES_ID, new TokenParam(null, theUri))); - } else { - throw new IllegalArgumentException("Can't fetch resource type: " + resourceName); - } - - if (search.size() == 0) { - if ("ValueSet".equals(resourceName)) { - SearchParameterMap params = new SearchParameterMap(); - params.add(ca.uhn.fhir.model.dstu2.resource.ValueSet.SP_RES_ID, new TokenParam(null, uriAsId.toUnqualifiedVersionless().getValue())); - params.setLoadSynchronousUpTo(10); - search = myValueSetDao.search(params); - if (search.size() == 0) { - return null; - } - } else { - return null; - } - } - - if (search.size() > 1) { - ourLog.warn("Found multiple {} instances with URL search value of: {}", resourceName, theUri); - } - - IBaseResource res = search.getResources(0, 1).get(0); - - /* - * Validator wants RI structures and not HAPI ones, so convert - * - * TODO: we really need a more efficient way of converting.. Or maybe this will just go away when we move to RI structures - */ - String encoded = myDstu2Ctx.newJsonParser().encodeResourceToString(res); - return myRiCtx.newJsonParser().parseResource(theClass, encoded); - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - return false; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay) { - return null; - } - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MatchResourceUrlService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MatchResourceUrlService.java index f6f2642c4eb..d0357aebbdf 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MatchResourceUrlService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MatchResourceUrlService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,6 @@ public class MatchResourceUrlService { .add(StorageProcessingMessage.class, message); JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_INFO, params); } - return retVal; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyCurrentlyReindexing.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyCurrentlyReindexing.java index 0f4881d97e3..f0ecd74f0f3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyCurrentlyReindexing.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyCurrentlyReindexing.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyResourcePid.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyResourcePid.java index 40550a3a1cf..4718eff4889 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyResourcePid.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/MetadataKeyResourcePid.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java index e832400e20c..891296fba86 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,88 +20,69 @@ package ca.uhn.fhir.jpa.dao; * #L% */ -import ca.uhn.fhir.context.BaseRuntimeChildDefinition; -import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementDefinition; -import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.RuntimeChildChoiceDefinition; -import ca.uhn.fhir.context.RuntimeChildResourceDefinition; +import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.jpa.dao.data.IResourceIndexedSearchParamUriDao; import ca.uhn.fhir.jpa.dao.data.IResourceSearchViewDao; import ca.uhn.fhir.jpa.dao.data.IResourceTagDao; import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilder; +import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderFactory; +import ca.uhn.fhir.jpa.dao.predicate.QueryRoot; +import ca.uhn.fhir.jpa.dao.predicate.SearchBuilderJoinEnum; +import ca.uhn.fhir.jpa.dao.predicate.SearchBuilderJoinKey; import ca.uhn.fhir.jpa.entity.ResourceSearchView; import ca.uhn.fhir.jpa.interceptor.JpaPreResourceAccessDetails; import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; -import ca.uhn.fhir.jpa.model.entity.*; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedCompositeStringUnique; +import ca.uhn.fhir.jpa.model.entity.ResourceLink; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.entity.ResourceTag; import ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails; import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; -import ca.uhn.fhir.jpa.model.util.StringNormalizer; import ca.uhn.fhir.jpa.searchparam.JpaRuntimeSearchParam; -import ca.uhn.fhir.jpa.searchparam.MatchUrlService; -import ca.uhn.fhir.jpa.searchparam.ResourceMetaParams; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; -import ca.uhn.fhir.jpa.searchparam.util.SourceParam; -import ca.uhn.fhir.jpa.term.VersionIndependentConcept; -import ca.uhn.fhir.jpa.term.api.ITermReadSvc; +import ca.uhn.fhir.jpa.searchparam.util.Dstu3DistanceHelper; import ca.uhn.fhir.jpa.util.BaseIterator; import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener; import ca.uhn.fhir.jpa.util.JpaInterceptorBroadcaster; import ca.uhn.fhir.jpa.util.ScrollableResultsIterator; import ca.uhn.fhir.jpa.util.SqlQueryList; -import ca.uhn.fhir.model.api.IPrimitiveDatatype; -import ca.uhn.fhir.model.api.IQueryParameterAnd; -import ca.uhn.fhir.model.api.IQueryParameterOr; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; -import ca.uhn.fhir.model.base.composite.BaseCodingDt; -import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; -import ca.uhn.fhir.model.base.composite.BaseQuantityDt; -import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.valueset.BundleEntrySearchModeEnum; -import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.QualifiedParamList; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.api.SortOrderEnum; import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.param.*; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.param.DateRangeParam; +import ca.uhn.fhir.rest.param.ReferenceParam; +import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.util.UrlUtil; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.tuple.Pair; import org.hibernate.ScrollMode; import org.hibernate.ScrollableResults; import org.hibernate.query.Query; -import org.hibernate.query.criteria.internal.CriteriaBuilderImpl; -import org.hibernate.query.criteria.internal.predicate.BooleanStaticAssertionPredicate; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.IdType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @@ -112,19 +93,27 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; import javax.persistence.TypedQuery; -import javax.persistence.criteria.*; -import java.math.BigDecimal; -import java.math.MathContext; -import java.util.*; -import java.util.Map.Entry; -import java.util.stream.Collectors; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.From; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.JoinType; +import javax.persistence.criteria.Order; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; -import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -import static org.apache.commons.lang3.StringUtils.trim; /** * The SearchBuilder is responsible for actually forming the SQL query that handles @@ -134,16 +123,19 @@ import static org.apache.commons.lang3.StringUtils.trim; @Scope("prototype") public class SearchBuilder implements ISearchBuilder { - private static final List EMPTY_LONG_LIST = Collections.unmodifiableList(new ArrayList<>()); - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchBuilder.class); /** * See loadResourcesByPid * for an explanation of why we use the constant 800 */ - private static final int MAXIMUM_PAGE_SIZE = 800; + // NB: keep public + public static final int MAXIMUM_PAGE_SIZE = 800; + + private static final List EMPTY_LONG_LIST = Collections.unmodifiableList(new ArrayList<>()); + private static final Logger ourLog = LoggerFactory.getLogger(SearchBuilder.class); private static ResourcePersistentId NO_MORE = new ResourcePersistentId(-1L); - private final boolean myDontUseHashesForSearch; - private final DaoConfig myDaoConfig; + private final QueryRoot myQueryRoot = new QueryRoot(); + private final String myResourceName; + private final Class myResourceType; @Autowired protected IInterceptorBroadcaster myInterceptorBroadcaster; @Autowired @@ -151,6 +143,8 @@ public class SearchBuilder implements ISearchBuilder { @PersistenceContext(type = PersistenceContextType.TRANSACTION) protected EntityManager myEntityManager; @Autowired + private DaoConfig myDaoConfig; + @Autowired private IResourceSearchViewDao myResourceSearchViewDao; @Autowired private FhirContext myContext; @@ -159,36 +153,26 @@ public class SearchBuilder implements ISearchBuilder { @Autowired(required = false) private IFulltextSearchSvc myFulltextSearchSvc; @Autowired - private IResourceIndexedSearchParamUriDao myResourceIndexedSearchParamUriDao; - @Autowired private ISearchParamRegistry mySearchParamRegistry; @Autowired - private ITermReadSvc myTerminologySvc; - @Autowired - private MatchUrlService myMatchUrlService; + private PredicateBuilderFactory myPredicateBuilderFactory; private List myAlsoIncludePids; - private CriteriaBuilder myBuilder; - private BaseHapiFhirDao myCallingDao; - private Map> myIndexJoins = Maps.newHashMap(); + private CriteriaBuilder myCriteriaBuilder; + private IDao myCallingDao; private SearchParameterMap myParams; - private ArrayList myPredicates; - private String myResourceName; - private AbstractQuery myResourceTableQuery; - private Root myResourceTableRoot; - private Class myResourceType; private String mySearchUuid; private int myFetchSize; private Integer myMaxResultsToFetch; private Set myPidSet; - private boolean myHaveIndexJoins = false; + private PredicateBuilder myPredicateBuilder; /** * Constructor */ - SearchBuilder(BaseHapiFhirDao theDao) { + SearchBuilder(IDao theDao, String theResourceName, Class theResourceType) { myCallingDao = theDao; - myDaoConfig = theDao.getConfig(); - myDontUseHashesForSearch = myDaoConfig.getDisableHashBasedSearches(); + myResourceName = theResourceName; + myResourceType = theResourceType; } @Override @@ -196,1850 +180,47 @@ public class SearchBuilder implements ISearchBuilder { myMaxResultsToFetch = theMaxResultsToFetch; } - private void addPredicateComposite(String theResourceName, RuntimeSearchParam theParamDef, List theNextAnd) { - // TODO: fail if missing is set for a composite query - - IQueryParameterType or = theNextAnd.get(0); - if (!(or instanceof CompositeParam)) { - throw new InvalidRequestException("Invalid type for composite param (must be " + CompositeParam.class.getSimpleName() + ": " + or.getClass()); - } - CompositeParam cp = (CompositeParam) or; - - RuntimeSearchParam left = theParamDef.getCompositeOf().get(0); - IQueryParameterType leftValue = cp.getLeftValue(); - myPredicates.add(createCompositeParamPart(theResourceName, myResourceTableRoot, left, leftValue)); - - RuntimeSearchParam right = theParamDef.getCompositeOf().get(1); - IQueryParameterType rightValue = cp.getRightValue(); - myPredicates.add(createCompositeParamPart(theResourceName, myResourceTableRoot, right, rightValue)); - + private void searchForIdsWithAndOr(String theResourceName, String theNextParamName, List> theAndOrParams, RequestDetails theRequest) { + myPredicateBuilder.searchForIdsWithAndOr(theResourceName, theNextParamName, theAndOrParams, theRequest); } - private Predicate addPredicateDate(String theResourceName, - String theParamName, - List theList) { + private void searchForIdsWithAndOr(@Nonnull SearchParameterMap theParams, RequestDetails theRequest) { + myParams = theParams; - return addPredicateDate(theResourceName, - theParamName, - theList, - null); - } + // Remove any empty parameters + theParams.clean(); - private Predicate addPredicateDate(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - - Join join = createJoin(JoinEnum.DATE, theParamName); - - if (theList.get(0).getMissing() != null) { - Boolean missing = theList.get(0).getMissing(); - addPredicateParamMissing(theResourceName, theParamName, missing, join); - return null; + // For DSTU3, pull out near-distance first so when it comes time to evaluate near, we already know the distance + if (myContext.getVersion().getVersion() == FhirVersionEnum.DSTU3) { + Dstu3DistanceHelper.setNearDistance(myResourceType, theParams); } - List codePredicates = new ArrayList<>(); - for (IQueryParameterType nextOr : theList) { - IQueryParameterType params = nextOr; - Predicate p = createPredicateDate(params, - theResourceName, - theParamName, - myBuilder, - join, - operation); - codePredicates.add(p); + // Attempt to lookup via composite unique key. + if (isCompositeUniqueSpCandidate()) { + attemptCompositeUniqueSpProcessing(theParams, theRequest); } - Predicate orPredicates = myBuilder.or(toArray(codePredicates)); - myPredicates.add(orPredicates); - return orPredicates; - } - - private void addPredicateHas(List> theHasParameters, RequestDetails theRequest) { - - for (List nextOrList : theHasParameters) { - - String targetResourceType = null; - String paramReference = null; - String parameterName = null; - - String paramName = null; - List parameters = new ArrayList<>(); - for (IQueryParameterType nextParam : nextOrList) { - HasParam next = (HasParam) nextParam; - targetResourceType = next.getTargetResourceType(); - paramReference = next.getReferenceFieldName(); - parameterName = next.getParameterName(); - paramName = parameterName.replaceAll("\\..*", ""); - parameters.add(QualifiedParamList.singleton(null, next.getValueAsQueryToken(myContext))); - } - - if (paramName == null) { - continue; - } - - RuntimeResourceDefinition targetResourceDefinition; - try { - targetResourceDefinition = myContext.getResourceDefinition(targetResourceType); - } catch (DataFormatException e) { - throw new InvalidRequestException("Invalid resource type: " + targetResourceType); - } - - assert parameterName != null; - RuntimeSearchParam owningParameterDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramName); - if (owningParameterDef == null) { - throw new InvalidRequestException("Unknown parameter name: " + targetResourceType + ':' + parameterName); - } - - owningParameterDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramReference); - if (owningParameterDef == null) { - throw new InvalidRequestException("Unknown parameter name: " + targetResourceType + ':' + paramReference); - } - - RuntimeSearchParam paramDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramName); - - IQueryParameterAnd> parsedParam = (IQueryParameterAnd>) ParameterUtil.parseQueryParams(myContext, paramDef, paramName, parameters); - - ArrayList orValues = Lists.newArrayList(); - - for (IQueryParameterOr next : parsedParam.getValuesAsQueryTokens()) { - orValues.addAll(next.getValuesAsQueryTokens()); - } - - Subquery subQ = createLinkSubquery(true, parameterName, targetResourceType, orValues, theRequest); - - Join join = myResourceTableRoot.join("myResourceLinksAsTarget", JoinType.LEFT); - Predicate pathPredicate = createResourceLinkPathPredicate(targetResourceType, paramReference, join); - Predicate pidPredicate = join.get("mySourceResourcePid").in(subQ); - Predicate andPredicate = myBuilder.and(pathPredicate, pidPredicate); - myPredicates.add(andPredicate); + // Handle each parameter + for (Map.Entry>> nextParamEntry : myParams.entrySet()) { + String nextParamName = nextParamEntry.getKey(); + List> andOrParams = nextParamEntry.getValue(); + searchForIdsWithAndOr(myResourceName, nextParamName, andOrParams, theRequest); } } - private Predicate addPredicateLanguage(List> theList) { - return addPredicateLanguage(theList, - null); - } - - private Predicate addPredicateLanguage(List> theList, - SearchFilterParser.CompareOperation operation) { - for (List nextList : theList) { - - Set values = new HashSet<>(); - for (IQueryParameterType next : nextList) { - if (next instanceof StringParam) { - String nextValue = ((StringParam) next).getValue(); - if (isBlank(nextValue)) { - continue; - } - values.add(nextValue); - } else { - throw new InternalErrorException("Language parameter must be of type " + StringParam.class.getCanonicalName() + " - Got " + next.getClass().getCanonicalName()); - } - } - - if (values.isEmpty()) { - continue; - } - - Predicate predicate = null; - if ((operation == null) || - (operation == SearchFilterParser.CompareOperation.eq)) { - predicate = myResourceTableRoot.get("myLanguage").as(String.class).in(values); - } else if (operation == SearchFilterParser.CompareOperation.ne) { - predicate = myResourceTableRoot.get("myLanguage").as(String.class).in(values).not(); - } else { - throw new InvalidRequestException("Unsupported operator specified in language query, only \"eq\" and \"ne\" are supported"); - } - myPredicates.add(predicate); - if (operation != null) { - return predicate; - } - } - - return null; - } - - private Predicate addPredicateNumber(String theResourceName, - String theParamName, - List theList) { - return addPredicateNumber(theResourceName, - theParamName, - theList, - null); - } - - private Predicate addPredicateNumber(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - - Join join = createJoin(JoinEnum.NUMBER, theParamName); - - if (theList.get(0).getMissing() != null) { - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); - return null; - } - - List codePredicates = new ArrayList<>(); - for (IQueryParameterType nextOr : theList) { - - if (nextOr instanceof NumberParam) { - NumberParam param = (NumberParam) nextOr; - - BigDecimal value = param.getValue(); - if (value == null) { - continue; - } - - final Expression fromObj = join.get("myValue"); - ParamPrefixEnum prefix = defaultIfNull(param.getPrefix(), ParamPrefixEnum.EQUAL); - if (operation == SearchFilterParser.CompareOperation.ne) { - prefix = ParamPrefixEnum.NOT_EQUAL; - } else if (operation == SearchFilterParser.CompareOperation.lt) { - prefix = ParamPrefixEnum.LESSTHAN; - } else if (operation == SearchFilterParser.CompareOperation.le) { - prefix = ParamPrefixEnum.LESSTHAN_OR_EQUALS; - } else if (operation == SearchFilterParser.CompareOperation.gt) { - prefix = ParamPrefixEnum.GREATERTHAN; - } else if (operation == SearchFilterParser.CompareOperation.ge) { - prefix = ParamPrefixEnum.GREATERTHAN_OR_EQUALS; - } else if (operation == SearchFilterParser.CompareOperation.eq) { - prefix = ParamPrefixEnum.EQUAL; - } else if (operation != null) { - throw new IllegalArgumentException("Invalid operator specified for number type"); - } - - - String invalidMessageName = "invalidNumberPrefix"; - - Predicate predicateNumeric = createPredicateNumeric(theResourceName, theParamName, join, myBuilder, nextOr, prefix, value, fromObj, invalidMessageName); - Predicate predicateOuter = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, predicateNumeric); - codePredicates.add(predicateOuter); - - } else { - throw new IllegalArgumentException("Invalid token type: " + nextOr.getClass()); - } - - } - - Predicate predicate = myBuilder.or(toArray(codePredicates)); - myPredicates.add(predicate); - return predicate; - } - - private void addPredicateParamMissing(String theResourceName, String theParamName, boolean theMissing) { -// if (myDontUseHashesForSearch) { -// Join paramPresentJoin = myResourceTableRoot.join("mySearchParamPresents", JoinType.LEFT); -// Join paramJoin = paramPresentJoin.join("mySearchParam", JoinType.LEFT); -// -// myPredicates.add(myBuilder.equal(paramJoin.get("myResourceName"), theResourceName)); -// myPredicates.add(myBuilder.equal(paramJoin.get("myParamName"), theParamName)); -// myPredicates.add(myBuilder.equal(paramPresentJoin.get("myPresent"), !theMissing)); -// } - - Join paramPresentJoin = myResourceTableRoot.join("mySearchParamPresents", JoinType.LEFT); - - Expression hashPresence = paramPresentJoin.get("myHashPresence").as(Long.class); - Long hash = SearchParamPresent.calculateHashPresence(theResourceName, theParamName, !theMissing); - myPredicates.add(myBuilder.equal(hashPresence, hash)); - } - - private void addPredicateParamMissing(String theResourceName, String theParamName, boolean theMissing, Join theJoin) { - - myPredicates.add(myBuilder.equal(theJoin.get("myResourceType"), theResourceName)); - myPredicates.add(myBuilder.equal(theJoin.get("myParamName"), theParamName)); - myPredicates.add(myBuilder.equal(theJoin.get("myMissing"), theMissing)); - } - - private Predicate addPredicateQuantity(String theResourceName, - String theParamName, - List theList) { - return addPredicateQuantity(theResourceName, - theParamName, - theList, - null); - } - - private Predicate addPredicateQuantity(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - Join join = createJoin(JoinEnum.QUANTITY, theParamName); - - if (theList.get(0).getMissing() != null) { - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); - return null; - } - - List codePredicates = new ArrayList(); - for (IQueryParameterType nextOr : theList) { - - Predicate singleCode = createPredicateQuantity(nextOr, - theResourceName, - theParamName, - myBuilder, - join, - operation); - codePredicates.add(singleCode); - } - - Predicate retVal = myBuilder.or(toArray(codePredicates)); - myPredicates.add(retVal); - return retVal; - } - - private Predicate addPredicateReference(String theResourceName, - String theParamName, - List theList, - RequestDetails theRequest) { - return addPredicateReference(theResourceName, - theParamName, - theList, - null, theRequest); - } - /** - * Add reference predicate to the current search + * A search is a candidate for Composite Unique SP if unique indexes are enabled, there is no EverythingMode, and the + * parameters all have no modifiers. */ - private Predicate addPredicateReference(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation, - RequestDetails theRequest) { - - assert theParamName.contains(".") == false; - - if ((operation != null) && - (operation != SearchFilterParser.CompareOperation.eq) && - (operation != SearchFilterParser.CompareOperation.ne)) { - throw new InvalidRequestException("Invalid operator specified for reference predicate. Supported operators for reference predicate are \"eq\" and \"ne\"."); - } - - if (theList.get(0).getMissing() != null) { - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing()); - return null; - } - - Join join = createJoin(JoinEnum.REFERENCE, theParamName); - - List targetIds = new ArrayList<>(); - List targetQualifiedUrls = new ArrayList<>(); - - for (int orIdx = 0; orIdx < theList.size(); orIdx++) { - IQueryParameterType nextOr = theList.get(orIdx); - - if (nextOr instanceof ReferenceParam) { - ReferenceParam ref = (ReferenceParam) nextOr; - - if (isBlank(ref.getChain())) { - - /* - * Handle non-chained search, e.g. Patient?organization=Organization/123 - */ - - IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); - - if (dt.hasBaseUrl()) { - if (myDaoConfig.getTreatBaseUrlsAsLocal().contains(dt.getBaseUrl())) { - dt = dt.toUnqualified(); - targetIds.add(dt); - } else { - targetQualifiedUrls.add(dt.getValue()); - } - } else { - targetIds.add(dt); - } - - } else { - - /* - * Handle chained search, e.g. Patient?organization.name=Kwik-e-mart - */ - - return addPredicateReferenceWithChain(theResourceName, theParamName, theList, join, new ArrayList<>(), ref, theRequest); - - } - - } else { - throw new IllegalArgumentException("Invalid token type (expecting ReferenceParam): " + nextOr.getClass()); - } - - } - - List codePredicates = new ArrayList<>(); - - // Resources by ID - List targetPids = myIdHelperService.translateForcedIdToPids(targetIds, theRequest); - if (!targetPids.isEmpty()) { - ourLog.debug("Searching for resource link with target PIDs: {}", targetPids); - Predicate pathPredicate; - if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { - pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join); - } else { - pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join).not(); - } - Predicate pidPredicate; - if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { - pidPredicate = join.get("myTargetResourcePid").in(ResourcePersistentId.toLongList(targetPids)); - } else { - pidPredicate = join.get("myTargetResourcePid").in(ResourcePersistentId.toLongList(targetPids)).not(); - } - codePredicates.add(myBuilder.and(pathPredicate, pidPredicate)); - } - - // Resources by fully qualified URL - if (!targetQualifiedUrls.isEmpty()) { - ourLog.debug("Searching for resource link with target URLs: {}", targetQualifiedUrls); - Predicate pathPredicate; - if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { - pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join); - } else { - pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join).not(); - } - Predicate pidPredicate; - if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { - pidPredicate = join.get("myTargetResourceUrl").in(targetQualifiedUrls); - } else { - pidPredicate = join.get("myTargetResourceUrl").in(targetQualifiedUrls).not(); - } - codePredicates.add(myBuilder.and(pathPredicate, pidPredicate)); - } - - if (codePredicates.size() > 0) { - Predicate predicate = myBuilder.or(toArray(codePredicates)); - myPredicates.add(predicate); - return predicate; - } else { - // Add a predicate that will never match - Predicate pidPredicate = join.get("myTargetResourcePid").in(-1L); - myPredicates.clear(); - myPredicates.add(pidPredicate); - return pidPredicate; - } - } - - private Predicate addPredicateReferenceWithChain(String theResourceName, String theParamName, List theList, Join theJoin, List theCodePredicates, ReferenceParam theRef, RequestDetails theRequest) { - final List> resourceTypes; - if (!theRef.hasResourceType()) { - - RuntimeSearchParam param = mySearchParamRegistry.getActiveSearchParam(theResourceName, theParamName); - resourceTypes = new ArrayList<>(); - - if (param.hasTargets()) { - Set targetTypes = param.getTargets(); - for (String next : targetTypes) { - resourceTypes.add(myContext.getResourceDefinition(next).getImplementingClass()); - } - } - - if (resourceTypes.isEmpty()) { - RuntimeResourceDefinition resourceDef = myContext.getResourceDefinition(theResourceName); - RuntimeSearchParam searchParamByName = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); - if (searchParamByName == null) { - throw new InternalErrorException("Could not find parameter " + theParamName); - } - String paramPath = searchParamByName.getPath(); - if (paramPath.endsWith(".as(Reference)")) { - paramPath = paramPath.substring(0, paramPath.length() - ".as(Reference)".length()) + "Reference"; - } - - if (paramPath.contains(".extension(")) { - int startIdx = paramPath.indexOf(".extension("); - int endIdx = paramPath.indexOf(')', startIdx); - if (startIdx != -1 && endIdx != -1) { - paramPath = paramPath.substring(0, startIdx + 10) + paramPath.substring(endIdx + 1); - } - } - - BaseRuntimeChildDefinition def = myContext.newTerser().getDefinition(myResourceType, paramPath); - if (def instanceof RuntimeChildChoiceDefinition) { - RuntimeChildChoiceDefinition choiceDef = (RuntimeChildChoiceDefinition) def; - resourceTypes.addAll(choiceDef.getResourceTypes()); - } else if (def instanceof RuntimeChildResourceDefinition) { - RuntimeChildResourceDefinition resDef = (RuntimeChildResourceDefinition) def; - resourceTypes.addAll(resDef.getResourceTypes()); - if (resourceTypes.size() == 1) { - if (resourceTypes.get(0).isInterface()) { - throw new InvalidRequestException("Unable to perform search for unqualified chain '" + theParamName + "' as this SearchParameter does not declare any target types. Add a qualifier of the form '" + theParamName + ":[ResourceType]' to perform this search."); - } - } - } else { - throw new ConfigurationException("Property " + paramPath + " of type " + myResourceName + " is not a resource: " + def.getClass()); - } - } - - if (resourceTypes.isEmpty()) { - for (BaseRuntimeElementDefinition next : myContext.getElementDefinitions()) { - if (next instanceof RuntimeResourceDefinition) { - RuntimeResourceDefinition nextResDef = (RuntimeResourceDefinition) next; - resourceTypes.add(nextResDef.getImplementingClass()); - } - } - } - - } else { - try { - RuntimeResourceDefinition resDef = myContext.getResourceDefinition(theRef.getResourceType()); - resourceTypes = new ArrayList<>(1); - resourceTypes.add(resDef.getImplementingClass()); - } catch (DataFormatException e) { - throw new InvalidRequestException("Invalid resource type: " + theRef.getResourceType()); - } - } - - boolean foundChainMatch = false; - - for (Class nextType : resourceTypes) { - - String chain = theRef.getChain(); - String remainingChain = null; - int chainDotIndex = chain.indexOf('.'); - if (chainDotIndex != -1) { - remainingChain = chain.substring(chainDotIndex + 1); - chain = chain.substring(0, chainDotIndex); - } - - RuntimeResourceDefinition typeDef = myContext.getResourceDefinition(nextType); - String subResourceName = typeDef.getName(); - - IFhirResourceDao dao = myCallingDao.getDao(nextType); - if (dao == null) { - ourLog.debug("Don't have a DAO for type {}", nextType.getSimpleName()); - continue; - } - - int qualifierIndex = chain.indexOf(':'); - String qualifier = null; - if (qualifierIndex != -1) { - qualifier = chain.substring(qualifierIndex); - chain = chain.substring(0, qualifierIndex); - } - - boolean isMeta = ResourceMetaParams.RESOURCE_META_PARAMS.containsKey(chain); - RuntimeSearchParam param = null; - if (!isMeta) { - param = mySearchParamRegistry.getSearchParamByName(typeDef, chain); - if (param == null) { - ourLog.debug("Type {} doesn't have search param {}", nextType.getSimpleName(), param); - continue; - } - } - - ArrayList orValues = Lists.newArrayList(); - - for (IQueryParameterType next : theList) { - String nextValue = next.getValueAsQueryToken(myContext); - IQueryParameterType chainValue = mapReferenceChainToRawParamType(remainingChain, param, theParamName, qualifier, nextType, chain, isMeta, nextValue); - if (chainValue == null) { - continue; - } - foundChainMatch = true; - orValues.add(chainValue); - } - - Subquery subQ = createLinkSubquery(foundChainMatch, chain, subResourceName, orValues, theRequest); - - Predicate pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, theJoin); - Predicate pidPredicate = theJoin.get("myTargetResourcePid").in(subQ); - Predicate andPredicate = myBuilder.and(pathPredicate, pidPredicate); - theCodePredicates.add(andPredicate); - - } - - if (!foundChainMatch) { - throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "invalidParameterChain", theParamName + '.' + theRef.getChain())); - } - - Predicate predicate = myBuilder.or(toArray(theCodePredicates)); - myPredicates.add(predicate); - return predicate; - } - - private void addPredicateSource(List> theAndOrParams, RequestDetails theRequest) { - for (List nextAnd : theAndOrParams) { - addPredicateSource(nextAnd, SearchFilterParser.CompareOperation.eq, theRequest); - } - } - - private Predicate addPredicateSource(List theList, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { - if (myDaoConfig.getStoreMetaSourceInformation() == DaoConfig.StoreMetaSourceInformationEnum.NONE) { - String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "sourceParamDisabled"); - throw new InvalidRequestException(msg); - } - - Join join = myResourceTableRoot.join("myProvenance", JoinType.LEFT); - - List codePredicates = new ArrayList<>(); - - for (IQueryParameterType nextParameter : theList) { - SourceParam sourceParameter = new SourceParam(nextParameter.getValueAsQueryToken(myContext)); - String sourceUri = sourceParameter.getSourceUri(); - String requestId = sourceParameter.getRequestId(); - Predicate sourceUriPredicate = myBuilder.equal(join.get("mySourceUri"), sourceUri); - Predicate requestIdPredicate = myBuilder.equal(join.get("myRequestId"), requestId); - if (isNotBlank(sourceUri) && isNotBlank(requestId)) { - codePredicates.add(myBuilder.and(sourceUriPredicate, requestIdPredicate)); - } else if (isNotBlank(sourceUri)) { - codePredicates.add(sourceUriPredicate); - } else if (isNotBlank(requestId)) { - codePredicates.add(requestIdPredicate); - } - } - - Predicate retVal = myBuilder.or(toArray(codePredicates)); - myPredicates.add(retVal); - return retVal; - } - - private Subquery createLinkSubquery(boolean theFoundChainMatch, String theChain, String theSubResourceName, List theOrValues, RequestDetails theRequest) { - Subquery subQ = myResourceTableQuery.subquery(Long.class); - Root subQfrom = subQ.from(ResourceTable.class); - subQ.select(subQfrom.get("myId").as(Long.class)); - - List> andOrParams = new ArrayList<>(); - andOrParams.add(theOrValues); - - /* - * We're doing a chain call, so push the current query root - * and predicate list down and put new ones at the top of the - * stack and run a subquery - */ - Root stackRoot = myResourceTableRoot; - ArrayList stackPredicates = myPredicates; - Map> stackIndexJoins = myIndexJoins; - myResourceTableRoot = subQfrom; - myPredicates = Lists.newArrayList(); - myIndexJoins = Maps.newHashMap(); - - // Create the subquery predicates - myPredicates.add(myBuilder.equal(myResourceTableRoot.get("myResourceType"), theSubResourceName)); - myPredicates.add(myBuilder.isNull(myResourceTableRoot.get("myDeleted"))); - - if (theFoundChainMatch) { - searchForIdsWithAndOr(theSubResourceName, theChain, andOrParams, theRequest); - subQ.where(toArray(myPredicates)); - } - - /* - * Pop the old query root and predicate list back - */ - myResourceTableRoot = stackRoot; - myPredicates = stackPredicates; - myIndexJoins = stackIndexJoins; - return subQ; - } - - private IQueryParameterType mapReferenceChainToRawParamType(String remainingChain, RuntimeSearchParam param, String theParamName, String qualifier, Class nextType, String chain, boolean isMeta, String resourceId) { - IQueryParameterType chainValue; - if (remainingChain != null) { - if (param == null || param.getParamType() != RestSearchParameterTypeEnum.REFERENCE) { - ourLog.debug("Type {} parameter {} is not a reference, can not chain {}", nextType.getSimpleName(), chain, remainingChain); - return null; - } - - chainValue = new ReferenceParam(); - chainValue.setValueAsQueryToken(myContext, theParamName, qualifier, resourceId); - ((ReferenceParam) chainValue).setChain(remainingChain); - } else if (isMeta) { - IQueryParameterType type = myMatchUrlService.newInstanceType(chain); - type.setValueAsQueryToken(myContext, theParamName, qualifier, resourceId); - chainValue = type; - } else { - chainValue = toParameterType(param, qualifier, resourceId); - } - - return chainValue; - } - - private void addPredicateResourceId(String theResourceName, List> theValues, RequestDetails theRequest) { - addPredicateResourceId(theValues, theResourceName, null, theRequest); - } - - private Predicate addPredicateResourceId(List> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { - - Predicate nextPredicate = createPredicateResourceId(myResourceTableRoot, theResourceName, theValues, theOperation, theRequest); - - if (nextPredicate != null) { - myPredicates.add(nextPredicate); - return nextPredicate; - } - - return null; - } - - @org.jetbrains.annotations.Nullable - private Predicate createPredicateResourceId(Root theRoot, String theResourceName, List> theValues, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { - Predicate nextPredicate = null; - - Set allOrPids = null; - - for (List nextValue : theValues) { - Set orPids = new HashSet<>(); - boolean haveValue = false; - for (IQueryParameterType next : nextValue) { - String value = next.getValueAsQueryToken(myContext); - if (value != null && value.startsWith("|")) { - value = value.substring(1); - } - - IdType valueAsId = new IdType(value); - if (isNotBlank(value)) { - haveValue = true; - try { - ResourcePersistentId pid = myIdHelperService.translateForcedIdToPid(theResourceName, valueAsId.getIdPart(), theRequest); - orPids.add(pid); - } catch (ResourceNotFoundException e) { - // This is not an error in a search, it just results in no matchesFhirResourceDaoR4InterceptorTest - ourLog.debug("Resource ID {} was requested but does not exist", valueAsId.getIdPart()); - } - } - } - if (haveValue) { - if (allOrPids == null) { - allOrPids = orPids; - } else { - allOrPids.retainAll(orPids); - } - - } - } - - if (allOrPids != null && allOrPids.isEmpty()) { - - // This will never match - nextPredicate = myBuilder.equal(theRoot.get("myId").as(Long.class), -1); - - } else if (allOrPids != null) { - - SearchFilterParser.CompareOperation operation = defaultIfNull(theOperation, SearchFilterParser.CompareOperation.eq); - assert operation == SearchFilterParser.CompareOperation.eq || operation == SearchFilterParser.CompareOperation.ne; - List codePredicates = new ArrayList<>(); - switch (operation) { - default: - case eq: - codePredicates.add(theRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(allOrPids))); - codePredicates.add(myBuilder.equal(myResourceTableRoot.get("myResourceType"), theResourceName)); - nextPredicate = myBuilder.and(toArray(codePredicates)); - break; - case ne: - codePredicates.add(theRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(allOrPids)).not()); - codePredicates.add(myBuilder.equal(myResourceTableRoot.get("myResourceType"), theResourceName)); - nextPredicate = myBuilder.and(toArray(codePredicates)); - break; - } - - } - - return nextPredicate; - } - - - private void addPredicateString(String theResourceName, - String theParamName, - List theList) { - addPredicateString(theResourceName, - theParamName, - theList, - SearchFilterParser.CompareOperation.sw); - } - - private Predicate addPredicateString(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - - Join join = createJoin(JoinEnum.STRING, theParamName); - - if (theList.get(0).getMissing() != null) { - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); - return null; - } - - List codePredicates = new ArrayList<>(); - for (IQueryParameterType nextOr : theList) { - IQueryParameterType theParameter = nextOr; - Predicate singleCode = createPredicateString(theParameter, - theResourceName, - theParamName, - myBuilder, - join, - operation); - codePredicates.add(singleCode); - } - - Predicate retVal = myBuilder.or(toArray(codePredicates)); - myPredicates.add(retVal); - return retVal; - } - - private void addPredicateTag(List> theList, String theParamName) { - TagTypeEnum tagType; - if (Constants.PARAM_TAG.equals(theParamName)) { - tagType = TagTypeEnum.TAG; - } else if (Constants.PARAM_PROFILE.equals(theParamName)) { - tagType = TagTypeEnum.PROFILE; - } else if (Constants.PARAM_SECURITY.equals(theParamName)) { - tagType = TagTypeEnum.SECURITY_LABEL; - } else { - throw new IllegalArgumentException("Param name: " + theParamName); // shouldn't happen - } - - List> notTags = Lists.newArrayList(); - for (List nextAndParams : theList) { - for (IQueryParameterType nextOrParams : nextAndParams) { - if (nextOrParams instanceof TokenParam) { - TokenParam param = (TokenParam) nextOrParams; - if (param.getModifier() == TokenParamModifier.NOT) { - if (isNotBlank(param.getSystem()) || isNotBlank(param.getValue())) { - notTags.add(Pair.of(param.getSystem(), param.getValue())); - } - } - } - } - } - - /* - * We have a parameter of ResourceType?_tag:not=foo This means match resources that don't have the given tag(s) - */ - if (notTags.isEmpty() == false) { - // CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); - // CriteriaQuery cq = builder.createQuery(Long.class); - // Root from = cq.from(ResourceTable.class); - // cq.select(from.get("myId").as(Long.class)); - // - // Subquery subQ = cq.subquery(Long.class); - // Root subQfrom = subQ.from(ResourceTag.class); - // subQ.select(subQfrom.get("myResourceId").as(Long.class)); - // Predicate subQname = builder.equal(subQfrom.get("myParamName"), theParamName); - // Predicate subQtype = builder.equal(subQfrom.get("myResourceType"), myResourceName); - // subQ.where(builder.and(subQtype, subQname)); - // - // List predicates = new ArrayList(); - // predicates.add(builder.not(builder.in(from.get("myId")).value(subQ))); - // predicates.add(builder.equal(from.get("myResourceType"), myResourceName)); - // predicates.add(builder.isNull(from.get("myDeleted"))); - // createPredicateResourceId(builder, cq, predicates, from.get("myId").as(Long.class)); - } - - for (List nextAndParams : theList) { - boolean haveTags = false; - for (IQueryParameterType nextParamUncasted : nextAndParams) { - if (nextParamUncasted instanceof TokenParam) { - TokenParam nextParam = (TokenParam) nextParamUncasted; - if (isNotBlank(nextParam.getValue())) { - haveTags = true; - } else if (isNotBlank(nextParam.getSystem())) { - throw new InvalidRequestException("Invalid " + theParamName + " parameter (must supply a value/code and not just a system): " + nextParam.getValueAsQueryToken(myContext)); - } - } else { - UriParam nextParam = (UriParam) nextParamUncasted; - if (isNotBlank(nextParam.getValue())) { - haveTags = true; - } - } - } - if (!haveTags) { - continue; - } - - boolean paramInverted = false; - List> tokens = Lists.newArrayList(); - for (IQueryParameterType nextOrParams : nextAndParams) { - String code; - String system; - if (nextOrParams instanceof TokenParam) { - TokenParam nextParam = (TokenParam) nextOrParams; - code = nextParam.getValue(); - system = nextParam.getSystem(); - if (nextParam.getModifier() == TokenParamModifier.NOT) { - paramInverted = true; - } - } else { - UriParam nextParam = (UriParam) nextOrParams; - code = nextParam.getValue(); - system = null; - } - - if (isNotBlank(code)) { - tokens.add(Pair.of(system, code)); - } - } - - if (tokens.isEmpty()) { - continue; - } - - if (paramInverted) { - ourLog.debug("Searching for _tag:not"); - - Subquery subQ = myResourceTableQuery.subquery(Long.class); - Root subQfrom = subQ.from(ResourceTag.class); - subQ.select(subQfrom.get("myResourceId").as(Long.class)); - - myPredicates.add(myBuilder.not(myBuilder.in(myResourceTableRoot.get("myId")).value(subQ))); - - Subquery defJoin = subQ.subquery(Long.class); - Root defJoinFrom = defJoin.from(TagDefinition.class); - defJoin.select(defJoinFrom.get("myId").as(Long.class)); - - subQ.where(subQfrom.get("myTagId").as(Long.class).in(defJoin)); - - Predicate tagListPredicate = createPredicateTagList(defJoinFrom, myBuilder, tagType, tokens); - defJoin.where(tagListPredicate); - - continue; - } - - Join tagJoin = myResourceTableRoot.join("myTags", JoinType.LEFT); - From defJoin = tagJoin.join("myTag"); - - Predicate tagListPredicate = createPredicateTagList(defJoin, myBuilder, tagType, tokens); - myPredicates.add(tagListPredicate); - - } - - } - - private Predicate addPredicateToken(String theResourceName, - String theParamName, - List theList) { - return addPredicateToken(theResourceName, - theParamName, - theList, - null); - } - - private Predicate addPredicateToken(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - - if (theList.get(0).getMissing() != null) { - Join join = createJoin(JoinEnum.TOKEN, theParamName); - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); - return null; - } - - List codePredicates = new ArrayList<>(); - List tokens = new ArrayList<>(); - for (IQueryParameterType nextOr : theList) { - - if (nextOr instanceof TokenParam) { - TokenParam id = (TokenParam) nextOr; - if (id.isText()) { - addPredicateString(theResourceName, theParamName, theList); - break; - } - } - - tokens.add(nextOr); - } - - if (tokens.isEmpty()) { - return null; - } - - Join join = createJoin(JoinEnum.TOKEN, theParamName); - Collection singleCode = createPredicateToken(tokens, theResourceName, theParamName, myBuilder, join, operation); - assert singleCode != null; - codePredicates.addAll(singleCode); - - Predicate spPredicate = myBuilder.or(toArray(codePredicates)); - myPredicates.add(spPredicate); - return spPredicate; - } - - private Predicate addPredicateUri(String theResourceName, - String theParamName, - List theList) { - return addPredicateUri(theResourceName, - theParamName, - theList, - SearchFilterParser.CompareOperation.eq); - } - - private Predicate addPredicateUri(String theResourceName, - String theParamName, - List theList, - SearchFilterParser.CompareOperation operation) { - - Join join = createJoin(JoinEnum.URI, theParamName); - - if (theList.get(0).getMissing() != null) { - addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); - return null; - } - - List codePredicates = new ArrayList<>(); - for (IQueryParameterType nextOr : theList) { - - if (nextOr instanceof UriParam) { - UriParam param = (UriParam) nextOr; - - String value = param.getValue(); - if (value == null) { - continue; - } - - if (param.getQualifier() == UriParamQualifierEnum.ABOVE) { - - /* - * :above is an inefficient query- It means that the user is supplying a more specific URL (say - * http://example.com/foo/bar/baz) and that we should match on any URLs that are less - * specific but otherwise the same. For example http://example.com and http://example.com/foo would both - * match. - * - * We do this by querying the DB for all candidate URIs and then manually checking each one. This isn't - * very efficient, but this is also probably not a very common type of query to do. - * - * If we ever need to make this more efficient, lucene could certainly be used as an optimization. - */ - ourLog.info("Searching for candidate URI:above parameters for Resource[{}] param[{}]", myResourceName, theParamName); - Collection candidates = myResourceIndexedSearchParamUriDao.findAllByResourceTypeAndParamName(myResourceName, theParamName); - List toFind = new ArrayList<>(); - for (String next : candidates) { - if (value.length() >= next.length()) { - if (value.substring(0, next.length()).equals(next)) { - toFind.add(next); - } - } - } - - if (toFind.isEmpty()) { - continue; - } - - Predicate uriPredicate = join.get("myUri").as(String.class).in(toFind); - Predicate hashAndUriPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, uriPredicate); - codePredicates.add(hashAndUriPredicate); - - } else if (param.getQualifier() == UriParamQualifierEnum.BELOW) { - - Predicate uriPredicate = myBuilder.like(join.get("myUri").as(String.class), createLeftMatchLikeExpression(value)); - Predicate hashAndUriPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, uriPredicate); - codePredicates.add(hashAndUriPredicate); - - } else { - if (myDontUseHashesForSearch) { - Predicate predicate = myBuilder.equal(join.get("myUri").as(String.class), value); - codePredicates.add(predicate); - } else { - - Predicate uriPredicate = null; - if (operation == null || operation == SearchFilterParser.CompareOperation.eq) { - long hashUri = ResourceIndexedSearchParamUri.calculateHashUri(theResourceName, theParamName, value); - Predicate hashPredicate = myBuilder.equal(join.get("myHashUri"), hashUri); - codePredicates.add(hashPredicate); - } else if (operation == SearchFilterParser.CompareOperation.ne) { - uriPredicate = myBuilder.notEqual(join.get("myUri").as(String.class), value); - } else if (operation == SearchFilterParser.CompareOperation.co) { - uriPredicate = myBuilder.like(join.get("myUri").as(String.class), createLeftAndRightMatchLikeExpression(value)); - } else if (operation == SearchFilterParser.CompareOperation.gt) { - uriPredicate = myBuilder.greaterThan(join.get("myUri").as(String.class), value); - } else if (operation == SearchFilterParser.CompareOperation.lt) { - uriPredicate = myBuilder.lessThan(join.get("myUri").as(String.class), value); - } else if (operation == SearchFilterParser.CompareOperation.ge) { - uriPredicate = myBuilder.greaterThanOrEqualTo(join.get("myUri").as(String.class), value); - } else if (operation == SearchFilterParser.CompareOperation.le) { - uriPredicate = myBuilder.lessThanOrEqualTo(join.get("myUri").as(String.class), value); - } else if (operation == SearchFilterParser.CompareOperation.sw) { - uriPredicate = myBuilder.like(join.get("myUri").as(String.class), createLeftMatchLikeExpression(value)); - } else if (operation == SearchFilterParser.CompareOperation.ew) { - uriPredicate = myBuilder.like(join.get("myUri").as(String.class), createRightMatchLikeExpression(value)); - } else { - throw new IllegalArgumentException(String.format("Unsupported operator specified in _filter clause, %s", - operation.toString())); - } - - if (uriPredicate != null) { - long hashIdentity = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); - Predicate hashIdentityPredicate = myBuilder.equal(join.get("myHashIdentity"), hashIdentity); - codePredicates.add(myBuilder.and(hashIdentityPredicate, uriPredicate)); - } - } - } - - } else { - throw new IllegalArgumentException("Invalid URI type: " + nextOr.getClass()); - } - - } - - /* - * If we haven't found any of the requested URIs in the candidates, then we'll - * just add a predicate that can never match - */ - if (codePredicates.isEmpty()) { - Predicate predicate = myBuilder.isNull(join.get("myMissing").as(String.class)); - myPredicates.add(predicate); - return null; - } - - Predicate orPredicate = myBuilder.or(toArray(codePredicates)); - - Predicate outerPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, - theParamName, - join, - orPredicate); - myPredicates.add(outerPredicate); - return outerPredicate; - } - - private Predicate combineParamIndexPredicateWithParamNamePredicate(String theResourceName, String theParamName, From theFrom, Predicate thePredicate) { - if (myDontUseHashesForSearch) { - Predicate resourceTypePredicate = myBuilder.equal(theFrom.get("myResourceType"), theResourceName); - Predicate paramNamePredicate = myBuilder.equal(theFrom.get("myParamName"), theParamName); - Predicate outerPredicate = myBuilder.and(resourceTypePredicate, paramNamePredicate, thePredicate); - return outerPredicate; - } - - long hashIdentity = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); - Predicate hashIdentityPredicate = myBuilder.equal(theFrom.get("myHashIdentity"), hashIdentity); - return myBuilder.and(hashIdentityPredicate, thePredicate); - } - - private Predicate createCompositeParamPart(String theResourceName, Root theRoot, RuntimeSearchParam theParam, IQueryParameterType leftValue) { - Predicate retVal = null; - switch (theParam.getParamType()) { - case STRING: { - From stringJoin = theRoot.join("myParamsString", JoinType.INNER); - retVal = createPredicateString(leftValue, theResourceName, theParam.getName(), myBuilder, stringJoin); - break; - } - case TOKEN: { - From tokenJoin = theRoot.join("myParamsToken", JoinType.INNER); - List tokens = Collections.singletonList(leftValue); - Collection tokenPredicates = createPredicateToken(tokens, theResourceName, theParam.getName(), myBuilder, tokenJoin); - retVal = myBuilder.and(tokenPredicates.toArray(new Predicate[0])); - break; - } - case DATE: { - From dateJoin = theRoot.join("myParamsDate", JoinType.INNER); - retVal = createPredicateDate(leftValue, theResourceName, theParam.getName(), myBuilder, dateJoin); - break; - } - case QUANTITY: { - From dateJoin = theRoot.join("myParamsQuantity", JoinType.INNER); - retVal = createPredicateQuantity(leftValue, theResourceName, theParam.getName(), myBuilder, dateJoin); - break; - } - case COMPOSITE: - case HAS: - case NUMBER: - case REFERENCE: - case URI: - case SPECIAL: - break; - } - - if (retVal == null) { - throw new InvalidRequestException("Don't know how to handle composite parameter with type of " + theParam.getParamType()); - } - - return retVal; - } - - @SuppressWarnings("unchecked") - private Join createJoin(JoinEnum theType, String theSearchParameterName) { - Join join = null; - switch (theType) { - case DATE: - join = myResourceTableRoot.join("myParamsDate", JoinType.LEFT); - break; - case NUMBER: - join = myResourceTableRoot.join("myParamsNumber", JoinType.LEFT); - break; - case QUANTITY: - join = myResourceTableRoot.join("myParamsQuantity", JoinType.LEFT); - break; - case REFERENCE: - join = myResourceTableRoot.join("myResourceLinks", JoinType.LEFT); - break; - case STRING: - join = myResourceTableRoot.join("myParamsString", JoinType.LEFT); - break; - case URI: - join = myResourceTableRoot.join("myParamsUri", JoinType.LEFT); - break; - case TOKEN: - join = myResourceTableRoot.join("myParamsToken", JoinType.LEFT); - break; - } - - JoinKey key = new JoinKey(theSearchParameterName, theType); - myIndexJoins.put(key, join); - myHaveIndexJoins = true; - - return (Join) join; - } - - private Predicate createPredicateDate(IQueryParameterType theParam, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom) { - return createPredicateDate(theParam, - theResourceName, - theParamName, - theBuilder, - theFrom, - null); - } - - private Predicate createPredicateDate(IQueryParameterType theParam, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom, - SearchFilterParser.CompareOperation operation) { - - Predicate p; - if (theParam instanceof DateParam) { - DateParam date = (DateParam) theParam; - if (!date.isEmpty()) { - DateRangeParam range = new DateRangeParam(date); - p = createPredicateDateFromRange(theBuilder, - theFrom, - range, - operation); - } else { - // TODO: handle missing date param? - p = null; - } - } else if (theParam instanceof DateRangeParam) { - DateRangeParam range = (DateRangeParam) theParam; - p = createPredicateDateFromRange(theBuilder, - theFrom, - range, - operation); - } else { - throw new IllegalArgumentException("Invalid token type: " + theParam.getClass()); - } - - return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, p); - } - - private Predicate createPredicateDateFromRange(CriteriaBuilder theBuilder, - From theFrom, - DateRangeParam theRange, - SearchFilterParser.CompareOperation operation) { - Date lowerBound = theRange.getLowerBoundAsInstant(); - Date upperBound = theRange.getUpperBoundAsInstant(); - Predicate lt = null; - Predicate gt = null; - Predicate lb = null; - Predicate ub = null; - - if (operation == SearchFilterParser.CompareOperation.lt) { - if (lowerBound == null) { - throw new InvalidRequestException("lowerBound value not correctly specified for compare operation"); - } - lb = theBuilder.lessThan(theFrom.get("myValueLow"), lowerBound); - } else if (operation == SearchFilterParser.CompareOperation.le) { - if (upperBound == null) { - throw new InvalidRequestException("upperBound value not correctly specified for compare operation"); - } - lb = theBuilder.lessThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); - } else if (operation == SearchFilterParser.CompareOperation.gt) { - if (upperBound == null) { - throw new InvalidRequestException("upperBound value not correctly specified for compare operation"); - } - lb = theBuilder.greaterThan(theFrom.get("myValueHigh"), upperBound); - } else if (operation == SearchFilterParser.CompareOperation.ge) { - if (lowerBound == null) { - throw new InvalidRequestException("lowerBound value not correctly specified for compare operation"); - } - lb = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); - } else if (operation == SearchFilterParser.CompareOperation.ne) { - if ((lowerBound == null) || - (upperBound == null)) { - throw new InvalidRequestException("lowerBound and/or upperBound value not correctly specified for compare operation"); - } - /*Predicate*/ - lt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); - /*Predicate*/ - gt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); - lb = theBuilder.or(lt, - gt); - } else if ((operation == SearchFilterParser.CompareOperation.eq) || - (operation == null)) { - if (lowerBound != null) { - /*Predicate*/ - gt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); - /*Predicate*/ - lt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueHigh"), lowerBound); - if (theRange.getLowerBound().getPrefix() == ParamPrefixEnum.STARTS_AFTER || theRange.getLowerBound().getPrefix() == ParamPrefixEnum.EQUAL) { - lb = gt; - } else { - lb = theBuilder.or(gt, lt); - } - } - - if (upperBound != null) { - /*Predicate*/ - gt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueLow"), upperBound); - /*Predicate*/ - lt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); - if (theRange.getUpperBound().getPrefix() == ParamPrefixEnum.ENDS_BEFORE || theRange.getUpperBound().getPrefix() == ParamPrefixEnum.EQUAL) { - ub = lt; - } else { - ub = theBuilder.or(gt, lt); - } - } - } else { - throw new InvalidRequestException(String.format("Unsupported operator specified, operator=%s", - operation.name())); - } - - ourLog.trace("Date range is {} - {}", lowerBound, upperBound); - - if (lb != null && ub != null) { - return (theBuilder.and(lb, ub)); - } else if (lb != null) { - return (lb); - } else { - return (ub); - } - } - - private Predicate createPredicateNumeric(String theResourceName, - String theParamName, - From theFrom, - CriteriaBuilder builder, - IQueryParameterType theParam, - ParamPrefixEnum thePrefix, - BigDecimal theValue, - final Expression thePath, - String invalidMessageName) { - Predicate num; - // Per discussions with Grahame Grieve and James Agnew on 11/13/19, modified logic for EQUAL and NOT_EQUAL operators below so as to - // use exact value matching. The "fuzz amount" matching is still used with the APPROXIMATE operator. - switch (thePrefix) { - case GREATERTHAN: - num = builder.gt(thePath, theValue); - break; - case GREATERTHAN_OR_EQUALS: - num = builder.ge(thePath, theValue); - break; - case LESSTHAN: - num = builder.lt(thePath, theValue); - break; - case LESSTHAN_OR_EQUALS: - num = builder.le(thePath, theValue); - break; - case EQUAL: - num = builder.equal(thePath, theValue); - break; - case NOT_EQUAL: - num = builder.notEqual(thePath, theValue); - break; - case APPROXIMATE: - BigDecimal mul = calculateFuzzAmount(thePrefix, theValue); - BigDecimal low = theValue.subtract(mul, MathContext.DECIMAL64); - BigDecimal high = theValue.add(mul, MathContext.DECIMAL64); - Predicate lowPred; - Predicate highPred; - lowPred = builder.ge(thePath.as(BigDecimal.class), low); - highPred = builder.le(thePath.as(BigDecimal.class), high); - num = builder.and(lowPred, highPred); - ourLog.trace("Searching for {} <= val <= {}", low, high); - break; - case ENDS_BEFORE: - case STARTS_AFTER: - default: - String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, invalidMessageName, thePrefix.getValue(), theParam.getValueAsQueryToken(myContext)); - throw new InvalidRequestException(msg); - } - - if (theParamName == null) { - return num; - } - return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, num); - } - - private Predicate createPredicateQuantity(IQueryParameterType theParam, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom) { - return createPredicateQuantity(theParam, - theResourceName, - theParamName, - theBuilder, - theFrom, - null); - } - - private Predicate createPredicateQuantity(IQueryParameterType theParam, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom, - SearchFilterParser.CompareOperation operation) { - String systemValue; - String unitsValue; - ParamPrefixEnum cmpValue = null; - BigDecimal valueValue; - - if (operation == SearchFilterParser.CompareOperation.ne) { - cmpValue = ParamPrefixEnum.NOT_EQUAL; - } else if (operation == SearchFilterParser.CompareOperation.lt) { - cmpValue = ParamPrefixEnum.LESSTHAN; - } else if (operation == SearchFilterParser.CompareOperation.le) { - cmpValue = ParamPrefixEnum.LESSTHAN_OR_EQUALS; - } else if (operation == SearchFilterParser.CompareOperation.gt) { - cmpValue = ParamPrefixEnum.GREATERTHAN; - } else if (operation == SearchFilterParser.CompareOperation.ge) { - cmpValue = ParamPrefixEnum.GREATERTHAN_OR_EQUALS; - } else if (operation == SearchFilterParser.CompareOperation.eq) { - cmpValue = ParamPrefixEnum.EQUAL; - } else if (operation != null) { - throw new IllegalArgumentException("Invalid operator specified for quantity type"); - } - - if (theParam instanceof BaseQuantityDt) { - BaseQuantityDt param = (BaseQuantityDt) theParam; - systemValue = param.getSystemElement().getValueAsString(); - unitsValue = param.getUnitsElement().getValueAsString(); - if (operation == null) { - cmpValue = ParamPrefixEnum.forValue(param.getComparatorElement().getValueAsString()); - } - valueValue = param.getValueElement().getValue(); - } else if (theParam instanceof QuantityParam) { - QuantityParam param = (QuantityParam) theParam; - systemValue = param.getSystem(); - unitsValue = param.getUnits(); - if (operation == null) { - cmpValue = param.getPrefix(); - } - valueValue = param.getValue(); - } else { - throw new IllegalArgumentException("Invalid quantity type: " + theParam.getClass()); - } - - if (myDontUseHashesForSearch) { - Predicate system = null; - if (!isBlank(systemValue)) { - system = theBuilder.equal(theFrom.get("mySystem"), systemValue); - } - - Predicate code = null; - if (!isBlank(unitsValue)) { - code = theBuilder.equal(theFrom.get("myUnits"), unitsValue); - } - - cmpValue = defaultIfNull(cmpValue, ParamPrefixEnum.EQUAL); - final Expression path = theFrom.get("myValue"); - String invalidMessageName = "invalidQuantityPrefix"; - - Predicate num = createPredicateNumeric(theResourceName, null, theFrom, theBuilder, theParam, cmpValue, valueValue, path, invalidMessageName); - - Predicate singleCode; - if (system == null && code == null) { - singleCode = num; - } else if (system == null) { - singleCode = theBuilder.and(code, num); - } else if (code == null) { - singleCode = theBuilder.and(system, num); - } else { - singleCode = theBuilder.and(system, code, num); - } - - return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } - - Predicate hashPredicate; - if (!isBlank(systemValue) && !isBlank(unitsValue)) { - long hash = ResourceIndexedSearchParamQuantity.calculateHashSystemAndUnits(theResourceName, theParamName, systemValue, unitsValue); - hashPredicate = myBuilder.equal(theFrom.get("myHashIdentitySystemAndUnits"), hash); - } else if (!isBlank(unitsValue)) { - long hash = ResourceIndexedSearchParamQuantity.calculateHashUnits(theResourceName, theParamName, unitsValue); - hashPredicate = myBuilder.equal(theFrom.get("myHashIdentityAndUnits"), hash); - } else { - long hash = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); - hashPredicate = myBuilder.equal(theFrom.get("myHashIdentity"), hash); - } - - cmpValue = defaultIfNull(cmpValue, ParamPrefixEnum.EQUAL); - final Expression path = theFrom.get("myValue"); - String invalidMessageName = "invalidQuantityPrefix"; - - Predicate numericPredicate = createPredicateNumeric(theResourceName, null, theFrom, theBuilder, theParam, cmpValue, valueValue, path, invalidMessageName); - - return theBuilder.and(hashPredicate, numericPredicate); - } - - private Predicate createPredicateString(IQueryParameterType theParameter, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom) { - return createPredicateString(theParameter, - theResourceName, - theParamName, - theBuilder, - theFrom, - null); - } - - private Predicate createPredicateString(IQueryParameterType theParameter, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom, - SearchFilterParser.CompareOperation operation) { - String rawSearchTerm; - if (theParameter instanceof TokenParam) { - TokenParam id = (TokenParam) theParameter; - if (!id.isText()) { - throw new IllegalStateException("Trying to process a text search on a non-text token parameter"); - } - rawSearchTerm = id.getValue(); - } else if (theParameter instanceof StringParam) { - StringParam id = (StringParam) theParameter; - rawSearchTerm = id.getValue(); - if (id.isContains()) { - if (!myDaoConfig.isAllowContainsSearches()) { - throw new MethodNotAllowedException(":contains modifier is disabled on this server"); - } - } - } else if (theParameter instanceof IPrimitiveDatatype) { - IPrimitiveDatatype id = (IPrimitiveDatatype) theParameter; - rawSearchTerm = id.getValueAsString(); - } else { - throw new IllegalArgumentException("Invalid token type: " + theParameter.getClass()); - } - - if (rawSearchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) { - throw new InvalidRequestException("Parameter[" + theParamName + "] has length (" + rawSearchTerm.length() + ") that is longer than maximum allowed (" - + ResourceIndexedSearchParamString.MAX_LENGTH + "): " + rawSearchTerm); - } - - if (myDontUseHashesForSearch) { - String likeExpression = StringNormalizer.normalizeString(rawSearchTerm); - if (myDaoConfig.isAllowContainsSearches()) { - if (theParameter instanceof StringParam) { - if (((StringParam) theParameter).isContains()) { - likeExpression = createLeftAndRightMatchLikeExpression(likeExpression); - } else { - likeExpression = createLeftMatchLikeExpression(likeExpression); - } - } else { - likeExpression = createLeftMatchLikeExpression(likeExpression); - } - } else { - likeExpression = createLeftMatchLikeExpression(likeExpression); - } - - Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); - if (theParameter instanceof StringParam && ((StringParam) theParameter).isExact()) { - Predicate exactCode = theBuilder.equal(theFrom.get("myValueExact"), rawSearchTerm); - singleCode = theBuilder.and(singleCode, exactCode); - } - - return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } - - boolean exactMatch = theParameter instanceof StringParam && ((StringParam) theParameter).isExact(); - if (exactMatch) { - // Exact match - Long hash = ResourceIndexedSearchParamString.calculateHashExact(theResourceName, theParamName, rawSearchTerm); - return theBuilder.equal(theFrom.get("myHashExact").as(Long.class), hash); - } else { - // Normalized Match - String normalizedString = StringNormalizer.normalizeString(rawSearchTerm); - String likeExpression; - if ((theParameter instanceof StringParam) && - (((((StringParam) theParameter).isContains()) && - (myCallingDao.getConfig().isAllowContainsSearches())) || - (operation == SearchFilterParser.CompareOperation.co))) { - likeExpression = createLeftAndRightMatchLikeExpression(normalizedString); - } else if ((operation != SearchFilterParser.CompareOperation.ne) && - (operation != SearchFilterParser.CompareOperation.gt) && - (operation != SearchFilterParser.CompareOperation.lt) && - (operation != SearchFilterParser.CompareOperation.ge) && - (operation != SearchFilterParser.CompareOperation.le)) { - if (operation == SearchFilterParser.CompareOperation.ew) { - likeExpression = createRightMatchLikeExpression(normalizedString); - } else { - likeExpression = createLeftMatchLikeExpression(normalizedString); - } - } else { - likeExpression = normalizedString; - } - - Predicate predicate; - if ((operation == null) || - (operation == SearchFilterParser.CompareOperation.sw)) { - Long hash = ResourceIndexedSearchParamString.calculateHashNormalized(myDaoConfig.getModelConfig(), theResourceName, theParamName, normalizedString); - Predicate hashCode = theBuilder.equal(theFrom.get("myHashNormalizedPrefix").as(Long.class), hash); - Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = theBuilder.and(hashCode, singleCode); - } else if ((operation == SearchFilterParser.CompareOperation.ew) || - (operation == SearchFilterParser.CompareOperation.co)) { - Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.eq) { - Long hash = ResourceIndexedSearchParamString.calculateHashNormalized(myDaoConfig.getModelConfig(), theResourceName, theParamName, normalizedString); - Predicate hashCode = theBuilder.equal(theFrom.get("myHashNormalizedPrefix").as(Long.class), hash); - Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), normalizedString); - predicate = theBuilder.and(hashCode, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.ne) { - Predicate singleCode = theBuilder.notEqual(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.gt) { - Predicate singleCode = theBuilder.greaterThan(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.lt) { - Predicate singleCode = theBuilder.lessThan(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.ge) { - Predicate singleCode = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else if (operation == SearchFilterParser.CompareOperation.le) { - Predicate singleCode = theBuilder.lessThanOrEqualTo(theFrom.get("myValueNormalized").as(String.class), likeExpression); - predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); - } else { - throw new IllegalArgumentException("Don't yet know how to handle operation " + operation + " on a string"); - } - - return predicate; - } - } - - private Predicate createPredicateTagList(Path theDefJoin, CriteriaBuilder theBuilder, TagTypeEnum theTagType, List> theTokens) { - Predicate typePredicate = theBuilder.equal(theDefJoin.get("myTagType"), theTagType); - - List orPredicates = Lists.newArrayList(); - for (Pair next : theTokens) { - Predicate codePredicate = theBuilder.equal(theDefJoin.get("myCode"), next.getRight()); - if (isNotBlank(next.getLeft())) { - Predicate systemPredicate = theBuilder.equal(theDefJoin.get("mySystem"), next.getLeft()); - orPredicates.add(theBuilder.and(typePredicate, systemPredicate, codePredicate)); - } else { - orPredicates.add(theBuilder.and(typePredicate, codePredicate)); - } - } - - return theBuilder.or(toArray(orPredicates)); - } - - private Collection createPredicateToken(Collection theParameters, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom) { - return createPredicateToken( - theParameters, - theResourceName, - theParamName, - theBuilder, - theFrom, - null); - } - - private Collection createPredicateToken(Collection theParameters, - String theResourceName, - String theParamName, - CriteriaBuilder theBuilder, - From theFrom, - SearchFilterParser.CompareOperation operation) { - final List codes = new ArrayList<>(); - - TokenParamModifier modifier = null; - for (IQueryParameterType nextParameter : theParameters) { - - String code; - String system; - if (nextParameter instanceof TokenParam) { - TokenParam id = (TokenParam) nextParameter; - system = id.getSystem(); - code = (id.getValue()); - modifier = id.getModifier(); - } else if (nextParameter instanceof BaseIdentifierDt) { - BaseIdentifierDt id = (BaseIdentifierDt) nextParameter; - system = id.getSystemElement().getValueAsString(); - code = (id.getValueElement().getValue()); - } else if (nextParameter instanceof BaseCodingDt) { - BaseCodingDt id = (BaseCodingDt) nextParameter; - system = id.getSystemElement().getValueAsString(); - code = (id.getCodeElement().getValue()); - } else if (nextParameter instanceof NumberParam) { - NumberParam number = (NumberParam) nextParameter; - system = null; - code = number.getValueAsQueryToken(myContext); - } else { - throw new IllegalArgumentException("Invalid token type: " + nextParameter.getClass()); - } - - if (system != null && system.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { - throw new InvalidRequestException( - "Parameter[" + theParamName + "] has system (" + system.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + system); - } - - if (code != null && code.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { - throw new InvalidRequestException( - "Parameter[" + theParamName + "] has code (" + code.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + code); - } - - /* - * Process token modifiers (:in, :below, :above) - */ - - if (modifier == TokenParamModifier.IN) { - codes.addAll(myTerminologySvc.expandValueSet(code)); - } else if (modifier == TokenParamModifier.ABOVE) { - system = determineSystemIfMissing(theParamName, code, system); - validateHaveSystemAndCodeForToken(theParamName, code, system); - codes.addAll(myTerminologySvc.findCodesAbove(system, code)); - } else if (modifier == TokenParamModifier.BELOW) { - system = determineSystemIfMissing(theParamName, code, system); - validateHaveSystemAndCodeForToken(theParamName, code, system); - codes.addAll(myTerminologySvc.findCodesBelow(system, code)); - } else { - codes.add(new VersionIndependentConcept(system, code)); - } - - } - - List sortedCodesList = codes - .stream() - .filter(t -> t.getCode() != null || t.getSystem() != null) - .sorted() - .distinct() - .collect(Collectors.toList()); - - if (codes.isEmpty()) { - // This will never match anything - return Collections.singletonList(new BooleanStaticAssertionPredicate((CriteriaBuilderImpl) theBuilder, false)); - } - - List retVal = new ArrayList<>(); - - // System only - List systemOnlyCodes = sortedCodesList.stream().filter(t -> isBlank(t.getCode())).collect(Collectors.toList()); - if (!systemOnlyCodes.isEmpty()) { - retVal.add(addPredicateToken(theResourceName, theParamName, theBuilder, theFrom, systemOnlyCodes, modifier, TokenModeEnum.SYSTEM_ONLY)); - } - - // Code only - List codeOnlyCodes = sortedCodesList.stream().filter(t -> t.getSystem() == null).collect(Collectors.toList()); - if (!codeOnlyCodes.isEmpty()) { - retVal.add(addPredicateToken(theResourceName, theParamName, theBuilder, theFrom, codeOnlyCodes, modifier, TokenModeEnum.VALUE_ONLY)); - } - - // System and code - List systemAndCodeCodes = sortedCodesList.stream().filter(t -> isNotBlank(t.getCode()) && t.getSystem() != null).collect(Collectors.toList()); - if (!systemAndCodeCodes.isEmpty()) { - retVal.add(addPredicateToken(theResourceName, theParamName, theBuilder, theFrom, systemAndCodeCodes, modifier, TokenModeEnum.SYSTEM_AND_VALUE)); - } - - return retVal; - } - - private void validateHaveSystemAndCodeForToken(String theParamName, String theCode, String theSystem) { - String systemDesc = defaultIfBlank(theSystem, "(missing)"); - String codeDesc = defaultIfBlank(theCode, "(missing)"); - if (isBlank(theCode)) { - String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "invalidCodeMissingSystem", theParamName, systemDesc, codeDesc); - throw new InvalidRequestException(msg); - } - if (isBlank(theSystem)) { - String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "invalidCodeMissingCode", theParamName, systemDesc, codeDesc); - throw new InvalidRequestException(msg); - } - } - - private Predicate addPredicateToken(String theResourceName, String theParamName, CriteriaBuilder theBuilder, From theFrom, List theTokens, TokenParamModifier theModifier, TokenModeEnum theTokenMode) { - if (myDontUseHashesForSearch) { - final Path systemExpression = theFrom.get("mySystem"); - final Path valueExpression = theFrom.get("myValue"); - - List orPredicates = new ArrayList<>(); - switch (theTokenMode) { - case SYSTEM_ONLY: { - List systems = theTokens.stream().map(t -> t.getSystem()).collect(Collectors.toList()); - Predicate orPredicate = systemExpression.in(systems); - orPredicates.add(orPredicate); - break; - } - case VALUE_ONLY: - List codes = theTokens.stream().map(t -> t.getCode()).collect(Collectors.toList()); - Predicate orPredicate = valueExpression.in(codes); - orPredicates.add(orPredicate); - break; - case SYSTEM_AND_VALUE: - for (VersionIndependentConcept next : theTokens) { - orPredicates.add(theBuilder.and( - toEqualOrIsNullPredicate(systemExpression, next.getSystem()), - toEqualOrIsNullPredicate(valueExpression, next.getCode()) - )); - } - break; - } - - Predicate or = theBuilder.or(orPredicates.toArray(new Predicate[0])); - if (theModifier == TokenParamModifier.NOT) { - or = theBuilder.not(or); - } - - return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, or); - } - - /* - * Note: A null system value means "match any system", but - * an empty-string system value means "match values that - * explicitly have no system". - */ - Expression hashField; - List values; - switch (theTokenMode) { - case SYSTEM_ONLY: - hashField = theFrom.get("myHashSystem").as(Long.class); - values = theTokens - .stream() - .map(t -> ResourceIndexedSearchParamToken.calculateHashSystem(theResourceName, theParamName, t.getSystem())) - .collect(Collectors.toList()); - break; - case VALUE_ONLY: - hashField = theFrom.get("myHashValue").as(Long.class); - values = theTokens - .stream() - .map(t -> ResourceIndexedSearchParamToken.calculateHashValue(theResourceName, theParamName, t.getCode())) - .collect(Collectors.toList()); - break; - case SYSTEM_AND_VALUE: - default: - hashField = theFrom.get("myHashSystemAndValue").as(Long.class); - values = theTokens - .stream() - .map(t -> ResourceIndexedSearchParamToken.calculateHashSystemAndValue(theResourceName, theParamName, t.getSystem(), t.getCode())) - .collect(Collectors.toList()); - break; - } - - Predicate predicate = hashField.in(values); - if (theModifier == TokenParamModifier.NOT) { - Predicate identityPredicate = theBuilder.equal(theFrom.get("myHashIdentity").as(Long.class), BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName)); - Predicate disjunctionPredicate = theBuilder.not(predicate); - predicate = theBuilder.and(identityPredicate, disjunctionPredicate); - } - return predicate; - } - - private Expression toEqualOrIsNullPredicate(Path theExpression, T theCode) { - if (theCode == null) { - return myBuilder.isNull(theExpression); - } - return myBuilder.equal(theExpression, theCode); + private boolean isCompositeUniqueSpCandidate() { + return myDaoConfig.isUniqueIndexesEnabled() && + myParams.getEverythingMode() == null && + myParams.isAllParametersHaveNoModifier(); } @Override public Iterator createCountQuery(SearchParameterMap theParams, String theSearchUuid, RequestDetails theRequest) { - myParams = theParams; - myBuilder = myEntityManager.getCriteriaBuilder(); - mySearchUuid = theSearchUuid; + init(theParams, theSearchUuid); TypedQuery query = createQuery(null, null, true, theRequest); return new CountQueryIterator(query); @@ -2055,9 +236,7 @@ public class SearchBuilder implements ISearchBuilder { @Override public IResultIterator createQuery(SearchParameterMap theParams, SearchRuntimeDetails theSearchRuntimeDetails, RequestDetails theRequest) { - myParams = theParams; - myBuilder = myEntityManager.getCriteriaBuilder(); - mySearchUuid = theSearchRuntimeDetails.getSearchUuid(); + init(theParams, theSearchRuntimeDetails.getSearchUuid()); if (myPidSet == null) { myPidSet = new HashSet<>(); @@ -2066,9 +245,14 @@ public class SearchBuilder implements ISearchBuilder { return new QueryIterator(theSearchRuntimeDetails, theRequest); } - private TypedQuery createQuery(SortSpec sort, Integer theMaximumResults, boolean theCount, RequestDetails theRequest) { - myPredicates = new ArrayList<>(); + private void init(SearchParameterMap theParams, String theSearchUuid) { + myParams = theParams; + myCriteriaBuilder = myEntityManager.getCriteriaBuilder(); + mySearchUuid = theSearchUuid; + myPredicateBuilder = new PredicateBuilder(this, myPredicateBuilderFactory); + } + private TypedQuery createQuery(SortSpec sort, Integer theMaximumResults, boolean theCount, RequestDetails theRequest) { CriteriaQuery outerQuery; /* * Sort @@ -2079,52 +263,49 @@ public class SearchBuilder implements ISearchBuilder { if (sort != null) { assert !theCount; - outerQuery = myBuilder.createQuery(Long.class); - myResourceTableQuery = outerQuery; - myResourceTableRoot = myResourceTableQuery.from(ResourceTable.class); + outerQuery = myCriteriaBuilder.createQuery(Long.class); + myQueryRoot.push(outerQuery); if (theCount) { - outerQuery.multiselect(myBuilder.countDistinct(myResourceTableRoot)); + outerQuery.multiselect(myCriteriaBuilder.countDistinct(myQueryRoot.getRoot())); } else { - outerQuery.multiselect(myResourceTableRoot.get("myId").as(Long.class)); + outerQuery.multiselect(myQueryRoot.get("myId").as(Long.class)); } List orders = Lists.newArrayList(); - List predicates = myPredicates; // Lists.newArrayList(); - createSort(myBuilder, myResourceTableRoot, sort, orders, predicates); + createSort(myCriteriaBuilder, myQueryRoot, sort, orders); if (orders.size() > 0) { outerQuery.orderBy(orders); } } else { - outerQuery = myBuilder.createQuery(Long.class); - myResourceTableQuery = outerQuery; - myResourceTableRoot = myResourceTableQuery.from(ResourceTable.class); + outerQuery = myCriteriaBuilder.createQuery(Long.class); + myQueryRoot.push(outerQuery); if (theCount) { - outerQuery.multiselect(myBuilder.countDistinct(myResourceTableRoot)); + outerQuery.multiselect(myCriteriaBuilder.countDistinct(myQueryRoot.getRoot())); } else { - outerQuery.multiselect(myResourceTableRoot.get("myId").as(Long.class)); - outerQuery.distinct(true); + outerQuery.multiselect(myQueryRoot.get("myId").as(Long.class)); + // KHS This distinct call is causing performance issues in large installations +// outerQuery.distinct(true); } - } if (myParams.getEverythingMode() != null) { - Join join = myResourceTableRoot.join("myResourceLinks", JoinType.LEFT); + Join join = myQueryRoot.join("myResourceLinks", JoinType.LEFT); if (myParams.get(IAnyResource.SP_RES_ID) != null) { - StringParam idParm = (StringParam) myParams.get(IAnyResource.SP_RES_ID).get(0).get(0); - ResourcePersistentId pid = myIdHelperService.translateForcedIdToPid(myResourceName, idParm.getValue(), theRequest); + StringParam idParam = (StringParam) myParams.get(IAnyResource.SP_RES_ID).get(0).get(0); + ResourcePersistentId pid = myIdHelperService.resolveResourcePersistentIds(myResourceName, idParam.getValue()); if (myAlsoIncludePids == null) { myAlsoIncludePids = new ArrayList<>(1); } myAlsoIncludePids.add(pid); - myPredicates.add(myBuilder.equal(join.get("myTargetResourcePid").as(Long.class), pid.getIdAsLong())); + myQueryRoot.addPredicate(myCriteriaBuilder.equal(join.get("myTargetResourcePid").as(Long.class), pid.getIdAsLong())); } else { - Predicate targetTypePredicate = myBuilder.equal(join.get("myTargetResourceType").as(String.class), myResourceName); - Predicate sourceTypePredicate = myBuilder.equal(myResourceTableRoot.get("myResourceType").as(String.class), myResourceName); - myPredicates.add(myBuilder.or(sourceTypePredicate, targetTypePredicate)); + Predicate targetTypePredicate = myCriteriaBuilder.equal(join.get("myTargetResourceType").as(String.class), myResourceName); + Predicate sourceTypePredicate = myCriteriaBuilder.equal(myQueryRoot.get("myResourceType").as(String.class), myResourceName); + myQueryRoot.addPredicate(myCriteriaBuilder.or(sourceTypePredicate, targetTypePredicate)); } } else { @@ -2155,7 +336,7 @@ public class SearchBuilder implements ISearchBuilder { pids = Collections.singletonList(new ResourcePersistentId(-1L)); } - myPredicates.add(myResourceTableRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(pids))); + myQueryRoot.addPredicate(myQueryRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(pids))); } /* @@ -2165,19 +346,20 @@ public class SearchBuilder implements ISearchBuilder { * If we have any joins to index tables, we get this behaviour already guaranteed so we don't * need an explicit predicate for it. */ - if (!myHaveIndexJoins) { + boolean haveNoIndexSearchParams = myParams.size() == 0 || myParams.keySet().stream().allMatch(t -> t.startsWith("_")); + if (haveNoIndexSearchParams) { if (myParams.getEverythingMode() == null) { - myPredicates.add(myBuilder.equal(myResourceTableRoot.get("myResourceType"), myResourceName)); + myQueryRoot.addPredicate(myCriteriaBuilder.equal(myQueryRoot.get("myResourceType"), myResourceName)); } - myPredicates.add(myBuilder.isNull(myResourceTableRoot.get("myDeleted"))); + myQueryRoot.addPredicate(myCriteriaBuilder.isNull(myQueryRoot.get("myDeleted"))); } // Last updated DateRangeParam lu = myParams.getLastUpdated(); - List lastUpdatedPredicates = createLastUpdatedPredicates(lu, myBuilder, myResourceTableRoot); - myPredicates.addAll(lastUpdatedPredicates); + List lastUpdatedPredicates = createLastUpdatedPredicates(lu, myCriteriaBuilder, myQueryRoot.getRoot()); + myQueryRoot.addPredicates(lastUpdatedPredicates); - myResourceTableQuery.where(myBuilder.and(SearchBuilder.toArray(myPredicates))); + myQueryRoot.where(myCriteriaBuilder.and(myQueryRoot.getPredicateArray())); /* * Now perform the search @@ -2191,40 +373,36 @@ public class SearchBuilder implements ISearchBuilder { return query; } - private Predicate createResourceLinkPathPredicate(String theResourceName, String theParamName, From from) { - return createResourceLinkPathPredicate(myContext, theParamName, from, theResourceName); - } - /** * @return Returns {@literal true} if any search parameter sorts were found, or false if * no sorts were found, or only non-search parameters ones (e.g. _id, _lastUpdated) */ - private boolean createSort(CriteriaBuilder theBuilder, Root theFrom, SortSpec theSort, List theOrders, List thePredicates) { + private boolean createSort(CriteriaBuilder theBuilder, QueryRoot theQueryRoot, SortSpec theSort, List theOrders) { if (theSort == null || isBlank(theSort.getParamName())) { return false; } if (IAnyResource.SP_RES_ID.equals(theSort.getParamName())) { - From forcedIdJoin = theFrom.join("myForcedId", JoinType.LEFT); + From forcedIdJoin = theQueryRoot.join("myForcedId", JoinType.LEFT); if (theSort.getOrder() == null || theSort.getOrder() == SortOrderEnum.ASC) { theOrders.add(theBuilder.asc(forcedIdJoin.get("myForcedId"))); - theOrders.add(theBuilder.asc(theFrom.get("myId"))); + theOrders.add(theBuilder.asc(theQueryRoot.get("myId"))); } else { theOrders.add(theBuilder.desc(forcedIdJoin.get("myForcedId"))); - theOrders.add(theBuilder.desc(theFrom.get("myId"))); + theOrders.add(theBuilder.desc(theQueryRoot.get("myId"))); } - return createSort(theBuilder, theFrom, theSort.getChain(), theOrders, thePredicates); + return createSort(theBuilder, theQueryRoot, theSort.getChain(), theOrders); } if (Constants.PARAM_LASTUPDATED.equals(theSort.getParamName())) { if (theSort.getOrder() == null || theSort.getOrder() == SortOrderEnum.ASC) { - theOrders.add(theBuilder.asc(theFrom.get("myUpdated"))); + theOrders.add(theBuilder.asc(theQueryRoot.get("myUpdated"))); } else { - theOrders.add(theBuilder.desc(theFrom.get("myUpdated"))); + theOrders.add(theBuilder.desc(theQueryRoot.get("myUpdated"))); } - return createSort(theBuilder, theFrom, theSort.getChain(), theOrders, thePredicates); + return createSort(theBuilder, theQueryRoot, theSort.getChain(), theOrders); } RuntimeResourceDefinition resourceDef = myContext.getResourceDefinition(myResourceName); @@ -2235,43 +413,43 @@ public class SearchBuilder implements ISearchBuilder { String joinAttrName; String[] sortAttrName; - JoinEnum joinType; + SearchBuilderJoinEnum joinType; switch (param.getParamType()) { case STRING: joinAttrName = "myParamsString"; sortAttrName = new String[]{"myValueExact"}; - joinType = JoinEnum.STRING; + joinType = SearchBuilderJoinEnum.STRING; break; case DATE: joinAttrName = "myParamsDate"; sortAttrName = new String[]{"myValueLow"}; - joinType = JoinEnum.DATE; + joinType = SearchBuilderJoinEnum.DATE; break; case REFERENCE: joinAttrName = "myResourceLinks"; sortAttrName = new String[]{"myTargetResourcePid"}; - joinType = JoinEnum.REFERENCE; + joinType = SearchBuilderJoinEnum.REFERENCE; break; case TOKEN: joinAttrName = "myParamsToken"; sortAttrName = new String[]{"mySystem", "myValue"}; - joinType = JoinEnum.TOKEN; + joinType = SearchBuilderJoinEnum.TOKEN; break; case NUMBER: joinAttrName = "myParamsNumber"; sortAttrName = new String[]{"myValue"}; - joinType = JoinEnum.NUMBER; + joinType = SearchBuilderJoinEnum.NUMBER; break; case URI: joinAttrName = "myParamsUri"; sortAttrName = new String[]{"myUri"}; - joinType = JoinEnum.URI; + joinType = SearchBuilderJoinEnum.URI; break; case QUANTITY: joinAttrName = "myParamsQuantity"; sortAttrName = new String[]{"myValue"}; - joinType = JoinEnum.QUANTITY; + joinType = SearchBuilderJoinEnum.QUANTITY; break; case SPECIAL: case COMPOSITE: @@ -2284,21 +462,21 @@ public class SearchBuilder implements ISearchBuilder { * If we've already got a join for the specific parameter we're * sorting on, we'll also sort with it. Otherwise we need a new join. */ - JoinKey key = new JoinKey(theSort.getParamName(), joinType); - Join join = myIndexJoins.get(key); + SearchBuilderJoinKey key = new SearchBuilderJoinKey(theSort.getParamName(), joinType); + Join join = theQueryRoot.getIndexJoin(key); if (join == null) { - join = theFrom.join(joinAttrName, JoinType.LEFT); + join = theQueryRoot.join(joinAttrName, JoinType.LEFT); if (param.getParamType() == RestSearchParameterTypeEnum.REFERENCE) { - thePredicates.add(join.get("mySourcePath").as(String.class).in(param.getPathsSplit())); + theQueryRoot.addPredicate(join.get("mySourcePath").as(String.class).in(param.getPathsSplit())); } else { - if (myDontUseHashesForSearch) { + if (myDaoConfig.getDisableHashBasedSearches()) { Predicate joinParam1 = theBuilder.equal(join.get("myParamName"), theSort.getParamName()); - thePredicates.add(joinParam1); + theQueryRoot.addPredicate(joinParam1); } else { Long hashIdentity = BaseResourceIndexedSearchParam.calculateHashIdentity(myResourceName, theSort.getParamName()); Predicate joinParam1 = theBuilder.equal(join.get("myHashIdentity"), hashIdentity); - thePredicates.add(joinParam1); + theQueryRoot.addPredicate(joinParam1); } } } else { @@ -2313,41 +491,11 @@ public class SearchBuilder implements ISearchBuilder { } } - createSort(theBuilder, theFrom, theSort.getChain(), theOrders, thePredicates); + createSort(theBuilder, theQueryRoot, theSort.getChain(), theOrders); return true; } - private String determineSystemIfMissing(String theParamName, String code, String theSystem) { - String retVal = theSystem; - if (retVal == null) { - RuntimeResourceDefinition resourceDef = myContext.getResourceDefinition(myResourceName); - RuntimeSearchParam param = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); - if (param != null) { - Set valueSetUris = Sets.newHashSet(); - for (String nextPath : param.getPathsSplit()) { - BaseRuntimeChildDefinition def = myContext.newTerser().getDefinition(myResourceType, nextPath); - if (def instanceof BaseRuntimeDeclaredChildDefinition) { - String valueSet = ((BaseRuntimeDeclaredChildDefinition) def).getBindingValueSet(); - if (isNotBlank(valueSet)) { - valueSetUris.add(valueSet); - } - } - } - if (valueSetUris.size() == 1) { - String valueSet = valueSetUris.iterator().next(); - List candidateCodes = myTerminologySvc.expandValueSet(valueSet); - for (VersionIndependentConcept nextCandidate : candidateCodes) { - if (nextCandidate.getCode().equals(code)) { - retVal = nextCandidate.getSystem(); - break; - } - } - } - } - } - return retVal; - } private void doLoadPids(Collection thePids, Collection theIncludedPids, List theResourceListToPopulate, boolean theForHistoryOperation, Map thePosition, RequestDetails theRequest) { @@ -2360,6 +508,9 @@ public class SearchBuilder implements ISearchBuilder { ResourcePersistentId resourceId; for (ResourceSearchView next : resourceSearchViewList) { + if (next.getDeleted() != null) { + continue; + } Class resourceType = myContext.getResourceDefinition(next.getResourceType()).getImplementingClass(); @@ -2479,6 +630,7 @@ public class SearchBuilder implements ISearchBuilder { return new HashSet<>(); } String searchFieldName = theReverseMode ? "myTargetResourcePid" : "mySourceResourcePid"; + String findFieldName = theReverseMode ? "mySourceResourcePid" : "myTargetResourcePid"; Collection nextRoundMatches = theMatches; HashSet allAdded = new HashSet<>(); @@ -2503,17 +655,17 @@ public class SearchBuilder implements ISearchBuilder { boolean matchAll = "*".equals(nextInclude.getValue()); if (matchAll) { String sql; - sql = "SELECT r FROM ResourceLink r WHERE r." + searchFieldName + " IN (:target_pids) "; + sql = "SELECT r." + findFieldName + " FROM ResourceLink r WHERE r." + searchFieldName + " IN (:target_pids) "; List> partitions = partition(nextRoundMatches, MAXIMUM_PAGE_SIZE); for (Collection nextPartition : partitions) { - TypedQuery q = theEntityManager.createQuery(sql, ResourceLink.class); + TypedQuery q = theEntityManager.createQuery(sql, Long.class); q.setParameter("target_pids", ResourcePersistentId.toLongList(nextPartition)); - List results = q.getResultList(); - for (ResourceLink resourceLink : results) { + List results = q.getResultList(); + for (Long resourceLink : results) { if (theReverseMode) { - pidsToInclude.add(new ResourcePersistentId(resourceLink.getSourceResourcePid())); + pidsToInclude.add(new ResourcePersistentId(resourceLink)); } else { - pidsToInclude.add(new ResourcePersistentId(resourceLink.getTargetResourcePid())); + pidsToInclude.add(new ResourcePersistentId(resourceLink)); } } } @@ -2550,16 +702,16 @@ public class SearchBuilder implements ISearchBuilder { boolean haveTargetTypesDefinedByParam = param.hasTargets(); if (targetResourceType != null) { - sql = "SELECT r FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids) AND r.myTargetResourceType = :target_resource_type"; + sql = "SELECT r." + findFieldName + " FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids) AND r.myTargetResourceType = :target_resource_type"; } else if (haveTargetTypesDefinedByParam) { - sql = "SELECT r FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids) AND r.myTargetResourceType in (:target_resource_types)"; + sql = "SELECT r." + findFieldName + " FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids) AND r.myTargetResourceType in (:target_resource_types)"; } else { - sql = "SELECT r FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids)"; + sql = "SELECT r." + findFieldName + " FROM ResourceLink r WHERE r.mySourcePath = :src_path AND r." + searchFieldName + " IN (:target_pids)"; } List> partitions = partition(nextRoundMatches, MAXIMUM_PAGE_SIZE); for (Collection nextPartition : partitions) { - TypedQuery q = theEntityManager.createQuery(sql, ResourceLink.class); + TypedQuery q = theEntityManager.createQuery(sql, Long.class); q.setParameter("src_path", nextPath); q.setParameter("target_pids", ResourcePersistentId.toLongList(nextPartition)); if (targetResourceType != null) { @@ -2567,18 +719,10 @@ public class SearchBuilder implements ISearchBuilder { } else if (haveTargetTypesDefinedByParam) { q.setParameter("target_resource_types", param.getTargets()); } - List results = q.getResultList(); - for (ResourceLink resourceLink : results) { - if (theReverseMode) { - Long pid = resourceLink.getSourceResourcePid(); - if (pid != null) { - pidsToInclude.add(new ResourcePersistentId(pid)); - } - } else { - Long pid = resourceLink.getTargetResourcePid(); - if (pid != null) { - pidsToInclude.add(new ResourcePersistentId(pid)); - } + List results = q.getResultList(); + for (Long resourceLink : results) { + if (resourceLink != null) { + pidsToInclude.add(new ResourcePersistentId(resourceLink)); } } } @@ -2656,99 +800,74 @@ public class SearchBuilder implements ISearchBuilder { } } - private void searchForIdsWithAndOr(@Nonnull SearchParameterMap theParams, RequestDetails theRequest) { - myParams = theParams; + private void attemptCompositeUniqueSpProcessing(@Nonnull SearchParameterMap theParams, RequestDetails theRequest) { + // Since we're going to remove elements below + theParams.values().forEach(nextAndList -> ensureSubListsAreWritable(nextAndList)); - // Remove any empty parameters - theParams.clean(); + List activeUniqueSearchParams = mySearchParamRegistry.getActiveUniqueSearchParams(myResourceName, theParams.keySet()); + if (activeUniqueSearchParams.size() > 0) { - /* - * Check if there is a unique key associated with the set - * of parameters passed in - */ - boolean couldBeEligibleForCompositeUniqueSpProcessing = - myDaoConfig.isUniqueIndexesEnabled() && - myParams.getEverythingMode() == null && - myParams.isAllParametersHaveNoModifier(); - if (couldBeEligibleForCompositeUniqueSpProcessing) { + StringBuilder sb = new StringBuilder(); + sb.append(myResourceName); + sb.append("?"); - // Since we're going to remove elements below - theParams.values().forEach(nextAndList -> ensureSubListsAreWritable(nextAndList)); + boolean first = true; - List activeUniqueSearchParams = mySearchParamRegistry.getActiveUniqueSearchParams(myResourceName, theParams.keySet()); - if (activeUniqueSearchParams.size() > 0) { + ArrayList keys = new ArrayList<>(theParams.keySet()); + Collections.sort(keys); + for (String nextParamName : keys) { + List> nextValues = theParams.get(nextParamName); - StringBuilder sb = new StringBuilder(); - sb.append(myResourceName); - sb.append("?"); + nextParamName = UrlUtil.escapeUrlParam(nextParamName); + if (nextValues.get(0).size() != 1) { + sb = null; + break; + } - boolean first = true; - - ArrayList keys = new ArrayList<>(theParams.keySet()); - Collections.sort(keys); - for (String nextParamName : keys) { - List> nextValues = theParams.get(nextParamName); - - nextParamName = UrlUtil.escapeUrlParam(nextParamName); - if (nextValues.get(0).size() != 1) { + // Reference params are only eligible for using a composite index if they + // are qualified + RuntimeSearchParam nextParamDef = mySearchParamRegistry.getActiveSearchParam(myResourceName, nextParamName); + if (nextParamDef.getParamType() == RestSearchParameterTypeEnum.REFERENCE) { + ReferenceParam param = (ReferenceParam) nextValues.get(0).get(0); + if (isBlank(param.getResourceType())) { sb = null; break; } - - // Reference params are only eligible for using a composite index if they - // are qualified - RuntimeSearchParam nextParamDef = mySearchParamRegistry.getActiveSearchParam(myResourceName, nextParamName); - if (nextParamDef.getParamType() == RestSearchParameterTypeEnum.REFERENCE) { - ReferenceParam param = (ReferenceParam) nextValues.get(0).get(0); - if (isBlank(param.getResourceType())) { - sb = null; - break; - } - } - - List nextAnd = nextValues.remove(0); - IQueryParameterType nextOr = nextAnd.remove(0); - String nextOrValue = nextOr.getValueAsQueryToken(myContext); - nextOrValue = UrlUtil.escapeUrlParam(nextOrValue); - - if (first) { - first = false; - } else { - sb.append('&'); - } - - sb.append(nextParamName).append('=').append(nextOrValue); - } - if (sb != null) { - String indexString = sb.toString(); - ourLog.debug("Checking for unique index for query: {}", indexString); + List nextAnd = nextValues.remove(0); + IQueryParameterType nextOr = nextAnd.remove(0); + String nextOrValue = nextOr.getValueAsQueryToken(myContext); + nextOrValue = UrlUtil.escapeUrlParam(nextOrValue); - // Interceptor broadcast: JPA_PERFTRACE_INFO - StorageProcessingMessage msg = new StorageProcessingMessage() - .setMessage("Using unique index for query for search: " + indexString); - HookParams params = new HookParams() - .add(RequestDetails.class, theRequest) - .addIfMatchesType(ServletRequestDetails.class, theRequest) - .add(StorageProcessingMessage.class, msg); - JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_INFO, params); - - addPredicateCompositeStringUnique(theParams, indexString); + if (first) { + first = false; + } else { + sb.append('&'); } + + sb.append(nextParamName).append('=').append(nextOrValue); + + } + + if (sb != null) { + String indexString = sb.toString(); + ourLog.debug("Checking for unique index for query: {}", indexString); + + // Interceptor broadcast: JPA_PERFTRACE_INFO + StorageProcessingMessage msg = new StorageProcessingMessage() + .setMessage("Using unique index for query for search: " + indexString); + HookParams params = new HookParams() + .add(RequestDetails.class, theRequest) + .addIfMatchesType(ServletRequestDetails.class, theRequest) + .add(StorageProcessingMessage.class, msg); + JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_INFO, params); + + addPredicateCompositeStringUnique(theParams, indexString); } } - - // Handle each parameter - for (Entry>> nextParamEntry : myParams.entrySet()) { - String nextParamName = nextParamEntry.getKey(); - List> andOrParams = nextParamEntry.getValue(); - searchForIdsWithAndOr(myResourceName, nextParamName, andOrParams, theRequest); - } - } - private void ensureSubListsAreWritable(List> theListOfLists) { for (int i = 0; i < theListOfLists.size(); i++) { List oldSubList = theListOfLists.get(i); @@ -2759,349 +878,27 @@ public class SearchBuilder implements ISearchBuilder { } } - private void addPredicateCompositeStringUnique(@Nonnull SearchParameterMap theParams, String theIndexdString) { - myHaveIndexJoins = true; - - Join join = myResourceTableRoot.join("myParamsCompositeStringUnique", JoinType.LEFT); - Predicate predicate = myBuilder.equal(join.get("myIndexString"), theIndexdString); - myPredicates.add(predicate); + private void addPredicateCompositeStringUnique(@Nonnull SearchParameterMap theParams, String theIndexedString) { + myQueryRoot.setHasIndexJoins(true); + Join join = myQueryRoot.join("myParamsCompositeStringUnique", JoinType.LEFT); + Predicate predicate = myCriteriaBuilder.equal(join.get("myIndexString"), theIndexedString); + myQueryRoot.addPredicate(predicate); // Remove any empty parameters remaining after this theParams.clean(); } - private Predicate processFilterParameter(SearchFilterParser.FilterParameter theFilter, - String theResourceName, RequestDetails theRequest) { - - RuntimeSearchParam searchParam = mySearchParamRegistry.getActiveSearchParam(theResourceName, theFilter.getParamPath().getName()); - - if (searchParam == null) { - throw new InvalidRequestException("Invalid search parameter specified, " + theFilter.getParamPath().getName() + ", for resource type " + theResourceName); - } else if (searchParam.getName().equals(IAnyResource.SP_RES_ID)) { - if (searchParam.getParamType() == RestSearchParameterTypeEnum.TOKEN) { - TokenParam param = new TokenParam(); - param.setValueAsQueryToken(null, - null, - null, - theFilter.getValue()); - return addPredicateResourceId(Collections.singletonList(Collections.singletonList(param)), myResourceName, theFilter.getOperation(), theRequest); - } else { - throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search"); - } - } else if (searchParam.getName().equals(IAnyResource.SP_RES_LANGUAGE)) { - if (searchParam.getParamType() == RestSearchParameterTypeEnum.STRING) { - return addPredicateLanguage(Collections.singletonList(Collections.singletonList(new StringParam(theFilter.getValue()))), - theFilter.getOperation()); - } else { - throw new InvalidRequestException("Unexpected search parameter type encountered, expected string type for language search"); - } - } else if (searchParam.getName().equals(Constants.PARAM_SOURCE)) { - if (searchParam.getParamType() == RestSearchParameterTypeEnum.TOKEN) { - TokenParam param = new TokenParam(); - param.setValueAsQueryToken(null, null, null, theFilter.getValue()); - return addPredicateSource(Collections.singletonList(param), theFilter.getOperation(), theRequest); - } else { - throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search"); - } - } -// else if ((searchParam.getName().equals(Constants.PARAM_TAG)) || -// (searchParam.equals(Constants.PARAM_SECURITY))) { -// TokenParam param = new TokenParam(); -// param.setValueAsQueryToken(null, -// null, -// null, -// ((SearchFilterParser.FilterParameter) theFilter).getValue()); -// return addPredicateTag(Collections.singletonList(Collections.singletonList(param)), -// searchParam.getName()); -// } -// else if (searchParam.equals(Constants.PARAM_PROFILE)) { -// addPredicateTag(Collections.singletonList(Collections.singletonList(new UriParam(((SearchFilterParser.FilterParameter) theFilter).getValue()))), -// searchParam.getName()); -// } - else { - RestSearchParameterTypeEnum typeEnum = searchParam.getParamType(); - if (typeEnum == RestSearchParameterTypeEnum.URI) { - return addPredicateUri(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(new UriParam(theFilter.getValue())), - theFilter.getOperation()); - } else if (typeEnum == RestSearchParameterTypeEnum.STRING) { - return addPredicateString(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(new StringParam(theFilter.getValue())), - theFilter.getOperation()); - } else if (typeEnum == RestSearchParameterTypeEnum.DATE) { - return addPredicateDate(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(new DateParam(theFilter.getValue())), - theFilter.getOperation()); - } else if (typeEnum == RestSearchParameterTypeEnum.NUMBER) { - return addPredicateNumber(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(new NumberParam(theFilter.getValue())), - theFilter.getOperation()); - } else if (typeEnum == RestSearchParameterTypeEnum.REFERENCE) { - String paramName = theFilter.getParamPath().getName(); - SearchFilterParser.CompareOperation operation = theFilter.getOperation(); - String resourceType = null; // The value can either have (Patient/123) or not have (123) a resource type, either way it's not needed here - String chain = (theFilter.getParamPath().getNext() != null) ? theFilter.getParamPath().getNext().toString() : null; - String value = theFilter.getValue(); - ReferenceParam referenceParam = new ReferenceParam(resourceType, chain, value); - return addPredicateReference(theResourceName, paramName, Collections.singletonList(referenceParam), operation, theRequest); - } else if (typeEnum == RestSearchParameterTypeEnum.QUANTITY) { - return addPredicateQuantity(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(new QuantityParam(theFilter.getValue())), - theFilter.getOperation()); - } else if (typeEnum == RestSearchParameterTypeEnum.COMPOSITE) { - throw new InvalidRequestException("Composite search parameters not currently supported with _filter clauses"); - } else if (typeEnum == RestSearchParameterTypeEnum.TOKEN) { - TokenParam param = new TokenParam(); - param.setValueAsQueryToken(null, - null, - null, - theFilter.getValue()); - return addPredicateToken(theResourceName, - theFilter.getParamPath().getName(), - Collections.singletonList(param), - theFilter.getOperation()); - } - } - return null; - } - - private Predicate processFilter(SearchFilterParser.Filter theFilter, - String theResourceName, RequestDetails theRequest) { - - if (theFilter instanceof SearchFilterParser.FilterParameter) { - return processFilterParameter((SearchFilterParser.FilterParameter) theFilter, - theResourceName, theRequest); - } else if (theFilter instanceof SearchFilterParser.FilterLogical) { - // Left side - Predicate xPredicate = processFilter(((SearchFilterParser.FilterLogical) theFilter).getFilter1(), - theResourceName, theRequest); - - // Right side - Predicate yPredicate = processFilter(((SearchFilterParser.FilterLogical) theFilter).getFilter2(), - theResourceName, theRequest); - - if (((SearchFilterParser.FilterLogical) theFilter).getOperation() == SearchFilterParser.FilterLogicalOperation.and) { - return myBuilder.and(xPredicate, yPredicate); - } else if (((SearchFilterParser.FilterLogical) theFilter).getOperation() == SearchFilterParser.FilterLogicalOperation.or) { - return myBuilder.or(xPredicate, yPredicate); - } - } else if (theFilter instanceof SearchFilterParser.FilterParameterGroup) { - return processFilter(((SearchFilterParser.FilterParameterGroup) theFilter).getContained(), - theResourceName, theRequest); - } - return null; - } - - private void searchForIdsWithAndOr(String theResourceName, String theParamName, List> theAndOrParams, RequestDetails theRequest) { - - if (theAndOrParams.isEmpty()) { - return; - } - - switch (theParamName) { - case IAnyResource.SP_RES_ID: - addPredicateResourceId(theResourceName, theAndOrParams, theRequest); - break; - - case IAnyResource.SP_RES_LANGUAGE: - addPredicateLanguage(theAndOrParams); - break; - - case Constants.PARAM_HAS: - addPredicateHas(theAndOrParams, theRequest); - break; - - case Constants.PARAM_TAG: - case Constants.PARAM_PROFILE: - case Constants.PARAM_SECURITY: - addPredicateTag(theAndOrParams, theParamName); - break; - - case Constants.PARAM_SOURCE: - addPredicateSource(theAndOrParams, theRequest); - break; - - default: - - RuntimeSearchParam nextParamDef = mySearchParamRegistry.getActiveSearchParam(theResourceName, theParamName); - if (nextParamDef != null) { - switch (nextParamDef.getParamType()) { - case DATE: - for (List nextAnd : theAndOrParams) { - addPredicateDate(theResourceName, theParamName, nextAnd); - } - break; - case QUANTITY: - for (List nextAnd : theAndOrParams) { - addPredicateQuantity(theResourceName, theParamName, nextAnd); - } - break; - case REFERENCE: - for (List nextAnd : theAndOrParams) { - addPredicateReference(theResourceName, theParamName, nextAnd, theRequest); - } - break; - case STRING: - for (List nextAnd : theAndOrParams) { - addPredicateString(theResourceName, theParamName, nextAnd); - } - break; - case TOKEN: - for (List nextAnd : theAndOrParams) { - addPredicateToken(theResourceName, theParamName, nextAnd); - } - break; - case NUMBER: - for (List nextAnd : theAndOrParams) { - addPredicateNumber(theResourceName, theParamName, nextAnd); - } - break; - case COMPOSITE: - for (List nextAnd : theAndOrParams) { - addPredicateComposite(theResourceName, nextParamDef, nextAnd); - } - break; - case URI: - for (List nextAnd : theAndOrParams) { - addPredicateUri(theResourceName, theParamName, nextAnd); - } - break; - case HAS: - case SPECIAL: - // should not happen - break; - } - } else { - if (Constants.PARAM_CONTENT.equals(theParamName) || Constants.PARAM_TEXT.equals(theParamName)) { - // These are handled later - } else if (Constants.PARAM_FILTER.equals(theParamName)) { - // Parse the predicates enumerated in the _filter separated by AND or OR... - if (theAndOrParams.get(0).get(0) instanceof StringParam) { - String filterString = ((StringParam) theAndOrParams.get(0).get(0)).getValue(); - SearchFilterParser.Filter filter; - try { - filter = SearchFilterParser.parse(filterString); - } catch (SearchFilterParser.FilterSyntaxException theE) { - throw new InvalidRequestException("Error parsing _filter syntax: " + theE.getMessage()); - } - if (filter != null) { - - if (!myDaoConfig.isFilterParameterEnabled()) { - throw new InvalidRequestException(Constants.PARAM_FILTER + " parameter is disabled on this server"); - } - - // TODO: we clear the predicates below because the filter builds up - // its own collection of predicates. It'd probably be good at some - // point to do something more fancy... - ArrayList holdPredicates = new ArrayList<>(myPredicates); - - Predicate filterPredicate = processFilter(filter, theResourceName, theRequest); - myPredicates.clear(); - myPredicates.addAll(holdPredicates); - myPredicates.add(filterPredicate); - } - } - - - } else { - throw new InvalidRequestException("Unknown search parameter " + theParamName + " for resource type " + theResourceName); - } - } - break; - } - } - @Override public void setFetchSize(int theFetchSize) { myFetchSize = theFetchSize; } - @Override - public void setType(Class theResourceType, String theResourceName) { - myResourceType = theResourceType; - myResourceName = theResourceName; - } - - private IQueryParameterType toParameterType(RuntimeSearchParam theParam) { - IQueryParameterType qp; - switch (theParam.getParamType()) { - case DATE: - qp = new DateParam(); - break; - case NUMBER: - qp = new NumberParam(); - break; - case QUANTITY: - qp = new QuantityParam(); - break; - case STRING: - qp = new StringParam(); - break; - case TOKEN: - qp = new TokenParam(); - break; - case COMPOSITE: - List compositeOf = theParam.getCompositeOf(); - if (compositeOf.size() != 2) { - throw new InternalErrorException("Parameter " + theParam.getName() + " has " + compositeOf.size() + " composite parts. Don't know how handlt this."); - } - IQueryParameterType leftParam = toParameterType(compositeOf.get(0)); - IQueryParameterType rightParam = toParameterType(compositeOf.get(1)); - qp = new CompositeParam<>(leftParam, rightParam); - break; - case REFERENCE: - qp = new ReferenceParam(); - break; - case SPECIAL: - case URI: - case HAS: - default: - throw new InternalErrorException("Don't know how to convert param type: " + theParam.getParamType()); - } - return qp; - } - - private IQueryParameterType toParameterType(RuntimeSearchParam theParam, String theQualifier, String theValueAsQueryToken) { - IQueryParameterType qp = toParameterType(theParam); - - qp.setValueAsQueryToken(myContext, theParam.getName(), theQualifier, theValueAsQueryToken); - return qp; - } - - private Predicate createResourceLinkPathPredicate(FhirContext theContext, String theParamName, From theFrom, - String theResourceType) { - RuntimeResourceDefinition resourceDef = theContext.getResourceDefinition(theResourceType); - RuntimeSearchParam param = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); - List path = param.getPathsSplit(); - - /* - * SearchParameters can declare paths on multiple resource - * types. Here we only want the ones that actually apply. - */ - path = new ArrayList<>(path); - - ListIterator iter = path.listIterator(); - while (iter.hasNext()) { - String nextPath = trim(iter.next()); - if (!nextPath.contains(theResourceType + ".")) { - iter.remove(); - } - } - - return theFrom.get("mySourcePath").in(path); - } - @VisibleForTesting void setParamsForUnitTest(SearchParameterMap theParams) { myParams = theParams; } - SearchParameterMap getParams() { + public SearchParameterMap getParams() { return myParams; } @@ -3110,25 +907,29 @@ public class SearchBuilder implements ISearchBuilder { myEntityManager = theEntityManager; } - private enum TokenModeEnum { - SYSTEM_ONLY, - VALUE_ONLY, - SYSTEM_AND_VALUE + public CriteriaBuilder getBuilder() { + return myCriteriaBuilder; } - public enum HandlerTypeEnum { - UNIQUE_INDEX, STANDARD_QUERY + public QueryRoot getQueryRoot() { + return myQueryRoot; } - private enum JoinEnum { - DATE, - NUMBER, - QUANTITY, - REFERENCE, - STRING, - TOKEN, - URI + public Class getResourceType() { + return myResourceType; + } + public String getResourceName() { + return myResourceName; + } + + public IDao getCallingDao() { + return myCallingDao; + } + + @VisibleForTesting + public void setDaoConfigForUnitTest(DaoConfig theDaoConfig) { + myDaoConfig = theDaoConfig; } public class IncludesIterator extends BaseIterator implements Iterator { @@ -3184,7 +985,7 @@ public class SearchBuilder implements ISearchBuilder { private final SearchRuntimeDetails mySearchRuntimeDetails; private final RequestDetails myRequest; private final boolean myHaveRawSqlHooks; - private final boolean myHavePerftraceFoundIdHook; + private final boolean myHavePerfTraceFoundIdHook; private boolean myFirst = true; private IncludesIterator myIncludesIterator; private ResourcePersistentId myNext; @@ -3193,6 +994,7 @@ public class SearchBuilder implements ISearchBuilder { private SortSpec mySort; private boolean myStillNeedToFetchIncludes; private int mySkipCount = 0; + private int myNonSkipCount = 0; private QueryIterator(SearchRuntimeDetails theSearchRuntimeDetails, RequestDetails theRequest) { mySearchRuntimeDetails = theSearchRuntimeDetails; @@ -3204,7 +1006,7 @@ public class SearchBuilder implements ISearchBuilder { myStillNeedToFetchIncludes = true; } - myHavePerftraceFoundIdHook = JpaInterceptorBroadcaster.hasHooks(Pointcut.JPA_PERFTRACE_SEARCH_FOUND_ID, myInterceptorBroadcaster, myRequest); + myHavePerfTraceFoundIdHook = JpaInterceptorBroadcaster.hasHooks(Pointcut.JPA_PERFTRACE_SEARCH_FOUND_ID, myInterceptorBroadcaster, myRequest); myHaveRawSqlHooks = JpaInterceptorBroadcaster.hasHooks(Pointcut.JPA_PERFTRACE_RAW_SQL, myInterceptorBroadcaster, myRequest); } @@ -3222,14 +1024,7 @@ public class SearchBuilder implements ISearchBuilder { myMaxResultsToFetch = myDaoConfig.getFetchSizeDefaultMaximum(); } - final TypedQuery query = createQuery(mySort, myMaxResultsToFetch, false, myRequest); - - mySearchRuntimeDetails.setQueryStopwatch(new StopWatch()); - - Query hibernateQuery = (Query) query; - hibernateQuery.setFetchSize(myFetchSize); - ScrollableResults scroll = hibernateQuery.scroll(ScrollMode.FORWARD_ONLY); - myResultsIterator = new ScrollableResultsIterator<>(scroll); + initializeIteratorQuery(myMaxResultsToFetch); // If the query resulted in extra results being requested if (myAlsoIncludePids != null) { @@ -3253,7 +1048,7 @@ public class SearchBuilder implements ISearchBuilder { if (myNext == null) { while (myResultsIterator.hasNext()) { Long nextLong = myResultsIterator.next(); - if (myHavePerftraceFoundIdHook) { + if (myHavePerfTraceFoundIdHook) { HookParams params = new HookParams() .add(Integer.class, System.identityHashCode(this)) .add(Object.class, nextLong); @@ -3264,11 +1059,32 @@ public class SearchBuilder implements ISearchBuilder { ResourcePersistentId next = new ResourcePersistentId(nextLong); if (myPidSet.add(next)) { myNext = next; + myNonSkipCount++; break; } else { mySkipCount++; } } + + if (!myResultsIterator.hasNext()) { + if (myMaxResultsToFetch != null && (mySkipCount + myNonSkipCount == myMaxResultsToFetch)) { + if (mySkipCount > 0 && myNonSkipCount == 0) { + myMaxResultsToFetch += 1000; + + StorageProcessingMessage message = new StorageProcessingMessage(); + String msg = "Pass completed with no matching results. This indicates an inefficient query! Retrying with new max count of " + myMaxResultsToFetch; + ourLog.warn(msg); + message.setMessage(msg); + HookParams params = new HookParams() + .add(RequestDetails.class, myRequest) + .addIfMatchesType(ServletRequestDetails.class, myRequest) + .add(StorageProcessingMessage.class, message); + JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, myRequest, Pointcut.JPA_PERFTRACE_WARNING, params); + + initializeIteratorQuery(myMaxResultsToFetch); + } + } + } } } @@ -3328,6 +1144,20 @@ public class SearchBuilder implements ISearchBuilder { } + private void initializeIteratorQuery(Integer theMaxResultsToFetch) { + final TypedQuery query = createQuery(mySort, theMaxResultsToFetch, false, myRequest); + + mySearchRuntimeDetails.setQueryStopwatch(new StopWatch()); + + Query hibernateQuery = (Query) query; + hibernateQuery.setFetchSize(myFetchSize); + ScrollableResults scroll = hibernateQuery.scroll(ScrollMode.FORWARD_ONLY); + myResultsIterator = new ScrollableResultsIterator<>(scroll); + + mySkipCount = 0; + myNonSkipCount = 0; + } + @Override public boolean hasNext() { if (myNext == null) { @@ -3350,6 +1180,11 @@ public class SearchBuilder implements ISearchBuilder { return mySkipCount; } + @Override + public int getNonSkippedCount() { + return myNonSkipCount; + } + @Override public void close() { if (myResultsIterator != null) { @@ -3390,63 +1225,6 @@ public class SearchBuilder implements ISearchBuilder { } } - private static class JoinKey { - private final JoinEnum myJoinType; - private final String myParamName; - - JoinKey(String theParamName, JoinEnum theJoinType) { - super(); - myParamName = theParamName; - myJoinType = theJoinType; - } - - @Override - public boolean equals(Object theObj) { - if (!(theObj instanceof JoinKey)) { - return false; - } - JoinKey obj = (JoinKey) theObj; - return new EqualsBuilder() - .append(myParamName, obj.myParamName) - .append(myJoinType, obj.myJoinType) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder() - .append(myParamName) - .append(myJoinType) - .toHashCode(); - } - } - - private static String createRightMatchLikeExpression(String likeExpression) { - return "%" + likeExpression.replace("%", "[%]"); - } - - /** - * Figures out the tolerance for a search. For example, if the user is searching for 4.00, this method - * returns 0.005 because we shold actually match values which are - * 4 (+/-) 0.005 according to the FHIR specs. - */ - static BigDecimal calculateFuzzAmount(ParamPrefixEnum cmpValue, BigDecimal theValue) { - if (cmpValue == ParamPrefixEnum.APPROXIMATE) { - return theValue.multiply(new BigDecimal(0.1)); - } else { - String plainString = theValue.toPlainString(); - int dotIdx = plainString.indexOf('.'); - if (dotIdx == -1) { - return new BigDecimal(0.5); - } - - int precision = plainString.length() - (dotIdx); - double mul = Math.pow(10, -precision); - double val = mul * 5.0d; - return new BigDecimal(val); - } - } - private static List createLastUpdatedPredicates(final DateRangeParam theLastUpdated, CriteriaBuilder builder, From from) { List lastUpdatedPredicates = new ArrayList<>(); if (theLastUpdated != null) { @@ -3463,14 +1241,6 @@ public class SearchBuilder implements ISearchBuilder { return lastUpdatedPredicates; } - private static String createLeftAndRightMatchLikeExpression(String likeExpression) { - return "%" + likeExpression.replace("%", "[%]") + "%"; - } - - private static String createLeftMatchLikeExpression(String likeExpression) { - return likeExpression.replace("%", "[%]") + "%"; - } - private static List filterResourceIdsByLastUpdated(EntityManager theEntityManager, final DateRangeParam theLastUpdated, Collection thePids) { if (thePids.isEmpty()) { return Collections.emptyList(); @@ -3483,13 +1253,13 @@ public class SearchBuilder implements ISearchBuilder { List lastUpdatedPredicates = createLastUpdatedPredicates(theLastUpdated, builder, from); lastUpdatedPredicates.add(from.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(thePids))); - cq.where(SearchBuilder.toArray(lastUpdatedPredicates)); + cq.where(SearchBuilder.toPredicateArray(lastUpdatedPredicates)); TypedQuery query = theEntityManager.createQuery(cq); return ResourcePersistentId.fromLongList(query.getResultList()); } - private static Predicate[] toArray(List thePredicates) { + private static Predicate[] toPredicateArray(List thePredicates) { return thePredicates.toArray(new Predicate[0]); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilderFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilderFactory.java index 7790a3a2493..ddce293a4a8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilderFactory.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilderFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ package ca.uhn.fhir.jpa.dao; * #L% */ +import org.hl7.fhir.instance.model.api.IBaseResource; import org.springframework.beans.factory.annotation.Lookup; import org.springframework.stereotype.Service; @Service public abstract class SearchBuilderFactory { @Lookup - public abstract SearchBuilder newSearchBuilder(BaseHapiFhirDao theBaseHapiFhirResourceDao); + public abstract ISearchBuilder newSearchBuilder(IDao theDao, String theResourceName, Class theResourceType); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java index 2f28a86d27e..0b694aae773 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBinaryStorageEntityDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBinaryStorageEntityDao.java index d2a55fbfc69..e32a3604a66 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBinaryStorageEntityDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBinaryStorageEntityDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionDao.java index c1ff4470ba7..59dd52c05df 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionDao.java @@ -10,7 +10,7 @@ import org.springframework.data.repository.query.Param; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionFileDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionFileDao.java index a52868cd4b8..4c8a9436a4d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionFileDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportCollectionFileDao.java @@ -10,7 +10,7 @@ import org.springframework.data.repository.query.Param; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportJobDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportJobDao.java index 52f8a629f3a..2b91972f66a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportJobDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBulkExportJobDao.java @@ -16,7 +16,7 @@ import java.util.Optional; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java index 5617e1a7cc2..4e1e2c5a39d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IForcedIdDao.java @@ -2,12 +2,13 @@ package ca.uhn.fhir.jpa.dao.data; import java.util.Collection; import java.util.List; +import java.util.Optional; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,12 +33,11 @@ import ca.uhn.fhir.jpa.model.entity.ForcedId; public interface IForcedIdDao extends JpaRepository { - // FIXME: JA We should log a performance warning if this is used since it's not indexed @Query("SELECT f.myResourcePid FROM ForcedId f WHERE myForcedId IN (:forced_id)") List findByForcedId(@Param("forced_id") Collection theForcedId); - @Query("SELECT f.myResourcePid FROM ForcedId f WHERE myResourceType = :resource_type AND myForcedId IN (:forced_id)") - List findByTypeAndForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedId); + @Query("SELECT f.myResourcePid FROM ForcedId f WHERE myResourceType = :resource_type AND myForcedId = :forced_id") + Optional findByTypeAndForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") String theForcedId); @Query("SELECT f FROM ForcedId f WHERE f.myResourcePid = :resource_pid") ForcedId findByResourcePid(@Param("resource_pid") Long theResourcePid); @@ -45,4 +45,37 @@ public interface IForcedIdDao extends JpaRepository { @Modifying @Query("DELETE FROM ForcedId t WHERE t.myId = :pid") void deleteByPid(@Param("pid") Long theId); + + /** + * This method returns a Collection where each row is an element in the collection. Each element in the collection + * is an object array, where the order matters (the array represents columns returned by the query). Be careful if you change this query in any way. + */ + @Query("SELECT f.myForcedId, f.myResourcePid FROM ForcedId f WHERE myResourceType = :resource_type AND myForcedId IN ( :forced_id )") + Collection findByTypeAndForcedId(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedId); + + /** + * Warning: No DB index exists for this particular query, so it may not perform well + * + * This method returns a Collection where each row is an element in the collection. Each element in the collection + * is an object array, where the order matters (the array represents columns returned by the query). Be careful if you change this query in any way. + */ + @Query("" + + "SELECT " + + " f.myResourceType, f.myResourcePid, f.myForcedId, t.myDeleted " + + "FROM ForcedId f " + + "JOIN ResourceTable t ON t.myId = f.myResourcePid " + + "WHERE f.myForcedId IN ( :forced_id )") + Collection findAndResolveByForcedIdWithNoType(@Param("forced_id") Collection theForcedIds); + + /** + * This method returns a Collection where each row is an element in the collection. Each element in the collection + * is an object array, where the order matters (the array represents columns returned by the query). Be careful if you change this query in any way. + */ + @Query("" + + "SELECT " + + " f.myResourceType, f.myResourcePid, f.myForcedId, t.myDeleted " + + "FROM ForcedId f " + + "JOIN ResourceTable t ON t.myId = f.myResourcePid " + + "WHERE f.myResourceType = :resource_type AND f.myForcedId IN ( :forced_id )") + Collection findAndResolveByForcedIdWithNoType(@Param("resource_type") String theResourceType, @Param("forced_id") Collection theForcedIds); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTableDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTableDao.java index e146cbf1bdc..2366c7d9eaa 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTableDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTableDao.java @@ -17,7 +17,7 @@ import java.util.Date; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTagDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTagDao.java index fb9d7acfc97..a883224e537 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTagDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceHistoryTagDao.java @@ -12,7 +12,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ import java.util.List; public interface IResourceHistoryTagDao extends JpaRepository { @Modifying - @Query("DELETE FROM ResourceHistoryTag t WHERE t.myId IN :pids") - void deleteByPid(@Param("pids") List thePids); + @Query("DELETE FROM ResourceHistoryTag t WHERE t.myResourceHistoryPid = :historyPid") + void deleteByPid(@Param("historyPid") Long theResourceHistoryTablePid); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedCompositeStringUniqueDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedCompositeStringUniqueDao.java index 2cdb0435b9f..c1c2bf8d069 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedCompositeStringUniqueDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedCompositeStringUniqueDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamCoordsDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamCoordsDao.java index 6cba8ea1edb..7528e97e7be 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamCoordsDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamCoordsDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamDateDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamDateDao.java index dbfff7d432b..c37f62e6df7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamDateDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamDateDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamNumberDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamNumberDao.java index 4fee1224a27..0f2ad55e8b9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamNumberDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamNumberDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamQuantityDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamQuantityDao.java index a96855c7d26..29cfb1ff846 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamQuantityDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamQuantityDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamStringDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamStringDao.java index 59984d65bb5..32b1b10deca 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamStringDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamStringDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamTokenDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamTokenDao.java index 9f713b7db38..9a2dbce8ec2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamTokenDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamTokenDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamUriDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamUriDao.java index 618f1d9d2a0..ab273d73e28 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamUriDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceIndexedSearchParamUriDao.java @@ -6,7 +6,7 @@ import java.util.Collection; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceLinkDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceLinkDao.java index 7ff179a28e1..51b9059a34d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceLinkDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceLinkDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceProvenanceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceProvenanceDao.java index ff31addfaa8..e01994c574e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceProvenanceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceProvenanceDao.java @@ -17,7 +17,7 @@ import java.util.Map; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceReindexJobDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceReindexJobDao.java index ccaf5e5ea58..9679554347c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceReindexJobDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceReindexJobDao.java @@ -16,7 +16,7 @@ import java.util.Optional; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceSearchViewDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceSearchViewDao.java index 870036edd93..8c2a1a1e740 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceSearchViewDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceSearchViewDao.java @@ -6,7 +6,7 @@ import java.util.Collection; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java index 24534d4a5b6..24663b688d7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java @@ -8,15 +8,17 @@ import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; +import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.Optional; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,4 +65,6 @@ public interface IResourceTableDao extends JpaRepository { @Query("DELETE FROM ResourceTable t WHERE t.myId = :pid") void deleteByPid(@Param("pid") Long theId); + @Query("SELECT t.myResourceType, t.myId, t.myDeleted FROM ResourceTable t WHERE t.myId IN (:pid)") + Collection findLookupFieldsByResourcePid(@Param("pid") List thePids); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTagDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTagDao.java index faece7b3fd6..bb81b65ce0a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTagDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTagDao.java @@ -6,7 +6,7 @@ import java.util.Collection; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,5 +37,5 @@ public interface IResourceTagDao extends JpaRepository { Collection findByResourceIds(@Param("pids") Collection pids); @Modifying - @Query("delete from ResourceTag t WHERE t.myResourceId = :resid") - void deleteByResourceId(@Param("resid") Long theResourcePid);} + @Query("delete from ResourceTag t WHERE t.myResourceId = :resId") + void deleteByResourceId(@Param("resId") Long theResourcePid);} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchDao.java index 9ff4f7ae544..a0bf58506eb 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchDao.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.dao.data; import ca.uhn.fhir.jpa.entity.Search; -import ca.uhn.fhir.jpa.model.search.SearchStatusEnum; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.data.jpa.repository.JpaRepository; @@ -17,7 +16,7 @@ import java.util.Optional; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,15 +37,17 @@ public interface ISearchDao extends JpaRepository { @Query("SELECT s FROM Search s LEFT OUTER JOIN FETCH s.myIncludes WHERE s.myUuid = :uuid") Optional findByUuidAndFetchIncludes(@Param("uuid") String theUuid); - @Query("SELECT s.myId FROM Search s WHERE (s.mySearchLastReturned < :cutoff) AND (s.myExpiryOrNull IS NULL OR s.myExpiryOrNull < :now)") - Slice findWhereLastReturnedBefore(@Param("cutoff") Date theCutoff, @Param("now") Date theNow, Pageable thePage); + @Query("SELECT s.myId FROM Search s WHERE (s.myCreated < :cutoff) AND (s.myExpiryOrNull IS NULL OR s.myExpiryOrNull < :now) AND (s.myDeleted IS NULL OR s.myDeleted = FALSE)") + Slice findWhereCreatedBefore(@Param("cutoff") Date theCutoff, @Param("now") Date theNow, Pageable thePage); + + @Query("SELECT s.myId FROM Search s WHERE s.myDeleted = TRUE") + Slice findDeleted(Pageable thePage); @Query("SELECT s FROM Search s WHERE s.myResourceType = :type AND mySearchQueryStringHash = :hash AND (s.myCreated > :cutoff) AND s.myDeleted = false AND s.myStatus <> 'FAILED'") Collection findWithCutoffOrExpiry(@Param("type") String theResourceType, @Param("hash") int theHashCode, @Param("cutoff") Date theCreatedCutoff); - @Modifying - @Query("UPDATE Search s SET s.mySearchLastReturned = :last WHERE s.myId = :pid") - void updateSearchLastReturned(@Param("pid") long thePid, @Param("last") Date theDate); + @Query("SELECT COUNT(s) FROM Search s WHERE s.myDeleted = TRUE") + int countDeleted(); @Modifying @Query("UPDATE Search s SET s.myDeleted = :deleted WHERE s.myId = :pid") @@ -55,4 +56,5 @@ public interface ISearchDao extends JpaRepository { @Modifying @Query("DELETE FROM Search s WHERE s.myId = :pid") void deleteByPid(@Param("pid") Long theId); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchIncludeDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchIncludeDao.java index 0dc0681ba9a..41a00358736 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchIncludeDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchIncludeDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchParamPresentDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchParamPresentDao.java index 29b33bfe778..d965b5e2f88 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchParamPresentDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchParamPresentDao.java @@ -7,7 +7,7 @@ import java.util.Date; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchResultDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchResultDao.java index 94c671a0908..e598cad11d2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchResultDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISearchResultDao.java @@ -15,7 +15,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISubscriptionTableDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISubscriptionTableDao.java index 5d2512579ed..df366f1604a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISubscriptionTableDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ISubscriptionTableDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITagDefinitionDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITagDefinitionDao.java index 1ff8c4f8484..5f75d75d2ad 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITagDefinitionDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITagDefinitionDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemDao.java index 3a672f8a312..43a15f8033f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemVersionDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemVersionDao.java index bf90aad1df3..92af07eaef9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemVersionDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermCodeSystemVersionDao.java @@ -13,7 +13,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDao.java index 66d2db4f07e..906343e5377 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDao.java @@ -1,11 +1,11 @@ package ca.uhn.fhir.jpa.dao.data; +import ca.uhn.fhir.jpa.dao.IHapiJpaRepository; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; -import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -17,7 +17,7 @@ import java.util.Optional; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import java.util.Optional; * #L% */ -public interface ITermConceptDao extends JpaRepository { +public interface ITermConceptDao extends IHapiJpaRepository { @Query("SELECT COUNT(t) FROM TermConcept t WHERE t.myCodeSystem.myId = :cs_pid") Integer countByCodeSystemVersion(@Param("cs_pid") Long thePid); @@ -50,4 +50,9 @@ public interface ITermConceptDao extends JpaRepository { @Query("SELECT t FROM TermConcept t WHERE t.myIndexStatus = null") Page findResourcesRequiringReindexing(Pageable thePageRequest); + @Override + @Modifying + @Query("DELETE FROM TermConcept t WHERE t.myId = :pid") + void deleteByPid(@Param("pid") Long theId); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDesignationDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDesignationDao.java index 2ba97708a00..9fb79ba5911 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDesignationDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptDesignationDao.java @@ -1,9 +1,10 @@ package ca.uhn.fhir.jpa.dao.data; +import ca.uhn.fhir.jpa.dao.IHapiJpaRepository; import ca.uhn.fhir.jpa.entity.TermConceptDesignation; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; -import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -11,7 +12,7 @@ import org.springframework.data.repository.query.Param; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +28,7 @@ import org.springframework.data.repository.query.Param; * #L% */ -public interface ITermConceptDesignationDao extends JpaRepository { +public interface ITermConceptDesignationDao extends IHapiJpaRepository { @Query("SELECT t.myId FROM TermConceptDesignation t WHERE t.myCodeSystemVersion.myId = :csv_pid") Slice findIdsByCodeSystemVersion(Pageable thePage, @Param("csv_pid") Long thePid); @@ -35,4 +36,9 @@ public interface ITermConceptDesignationDao extends JpaRepository { +public interface ITermConceptParentChildLinkDao extends IHapiJpaRepository { @Query("SELECT COUNT(t) FROM TermConceptParentChildLink t WHERE t.myCodeSystem.myId = :cs_pid") Integer countByCodeSystemVersion(@Param("cs_pid") Long thePid); @@ -39,4 +40,14 @@ public interface ITermConceptParentChildLinkDao extends JpaRepository findIdsByCodeSystemVersion(Pageable thePage, @Param("cs_pid") Long thePid); + + @Modifying + @Query("DELETE FROM TermConceptParentChildLink t WHERE t.myChildPid = :pid OR t.myParentPid = :pid") + void deleteByConceptPid(@Param("pid") Long theId); + + @Override + @Modifying + @Query("DELETE FROM TermConceptParentChildLink t WHERE t.myPid = :pid") + void deleteByPid(@Param("pid") Long theId); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptPropertyDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptPropertyDao.java index 1897ddf21d2..9fe315fbf98 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptPropertyDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermConceptPropertyDao.java @@ -1,9 +1,10 @@ package ca.uhn.fhir.jpa.dao.data; +import ca.uhn.fhir.jpa.dao.IHapiJpaRepository; import ca.uhn.fhir.jpa.entity.TermConceptProperty; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; -import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -11,7 +12,7 @@ import org.springframework.data.repository.query.Param; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +28,17 @@ import org.springframework.data.repository.query.Param; * #L% */ -public interface ITermConceptPropertyDao extends JpaRepository { +public interface ITermConceptPropertyDao extends IHapiJpaRepository { @Query("SELECT t.myId FROM TermConceptProperty t WHERE t.myCodeSystemVersion.myId = :cs_pid") Slice findIdsByCodeSystemVersion(Pageable thePage, @Param("cs_pid") Long thePid); @Query("SELECT COUNT(t) FROM TermConceptProperty t WHERE t.myCodeSystemVersion.myId = :cs_pid") Integer countByCodeSystemVersion(@Param("cs_pid") Long thePid); + + @Override + @Modifying + @Query("DELETE FROM TermConceptProperty t WHERE t.myId = :pid") + void deleteByPid(@Param("pid") Long theId); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDao.java index 4cb025ae4aa..e58d0c07ce0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDesignationDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDesignationDao.java index 6144cb652e5..49a1f0367da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDesignationDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptDesignationDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,6 @@ package ca.uhn.fhir.jpa.dao.data; */ import ca.uhn.fhir.jpa.entity.TermValueSetConceptDesignation; -import org.springframework.data.domain.Pageable; -import org.springframework.data.domain.Slice; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; @@ -37,6 +35,4 @@ public interface ITermValueSetConceptDesignationDao extends JpaRepository findByTermValueSetConceptId(Pageable thePage, @Param("pid") Long theValueSetConceptId); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptViewDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptViewDao.java index ee7ec6b300b..1d192308de4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptViewDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetConceptViewDao.java @@ -11,7 +11,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDao.java index 50406e1d2ef..f3a841f49e6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDao.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.data; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoBundleDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoBundleDstu3.java index d65663d7ae7..8ecbef56e31 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoBundleDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoBundleDstu3.java @@ -8,7 +8,7 @@ import org.hl7.fhir.dstu3.model.Bundle.BundleType; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java index 996b2510b3a..a0c5f96d3f7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,13 @@ package ca.uhn.fhir.jpa.dao.dstu3; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; -import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao; import ca.uhn.fhir.jpa.entity.TermCodeSystem; +import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; @@ -35,8 +35,6 @@ import ca.uhn.fhir.jpa.util.LogicUtil; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeableConcept; import org.hl7.fhir.dstu3.model.Coding; @@ -53,18 +51,18 @@ import java.util.List; import java.util.Set; import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.hl7.fhir.convertors.conv30_40.CodeSystem30_40.convertCodeSystem; @Transactional public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao implements IFhirResourceDaoCodeSystem { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoCodeSystemDstu3.class); - + @Autowired + protected ITermCodeSystemStorageSvc myTerminologyCodeSystemStorageSvc; @Autowired private ITermCodeSystemDao myCsDao; @Autowired - private ValidationSupportChain myValidationSupport; - @Autowired - protected ITermCodeSystemStorageSvc myTerminologyCodeSystemStorageSvc; + private IValidationSupport myValidationSupport; @Autowired private FhirContext myFhirContext; @@ -74,7 +72,7 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao findCodeSystemIdsContainingSystemAndCode(String theCode, String theSystem, RequestDetails theRequest) { - Set ids = searchForIds(new SearchParameterMap(CodeSystem.SP_CODE, new TokenParam(theSystem, theCode)), theRequest ); + Set ids = searchForIds(new SearchParameterMap(CodeSystem.SP_CODE, new TokenParam(theSystem, theCode)), theRequest); List valueSetIds = new ArrayList<>(); for (ResourcePersistentId next : ids) { IIdType id = myIdHelperService.translatePidIdToForcedId(myFhirContext, "CodeSystem", next); @@ -85,7 +83,7 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { + public IValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode()); boolean haveCode = theCode != null && theCode.isEmpty() == false; boolean haveSystem = theSystem != null && theSystem.isEmpty() == false; @@ -109,16 +107,16 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao implements IFhirResourceDaoConceptMap { @Autowired private ITermReadSvc myHapiTerminologySvc; @@ -166,7 +171,7 @@ public class FhirResourceDaoConceptMapDstu3 extends BaseHapiFhirResourceDao implements IFhirResourceDaoValueSet { private static final Logger ourLog = LoggerFactory.getLogger(FhirResourceDaoValueSetDstu3.class); @@ -77,7 +79,7 @@ public class FhirResourceDaoValueSetDstu3 extends BaseHapiFhirResourceDao listToValidate) { @@ -325,9 +285,9 @@ public class FhirResourceDaoValueSetDstu3 extends BaseHapiFhirResourceDao contains = expansion.getExpansion().getContains(); @@ -420,7 +380,7 @@ public class FhirResourceDaoValueSetDstu3 extends BaseHapiFhirResourceDao fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - if (isBlank(theSystem)) { - return null; - } - return fetchResource(theCtx, CodeSystem.class, theSystem); - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String theSystem) { - if (isBlank(theSystem)) { - return null; - } - return fetchResource(theCtx, ValueSet.class, theSystem); - } - - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return fetchResource(theCtx, StructureDefinition.class, theUrl); - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - return false; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; - } - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/TransactionProcessorVersionAdapterDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/TransactionProcessorVersionAdapterDstu3.java index f78c16b93ca..132ac5dbfe5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/TransactionProcessorVersionAdapterDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/TransactionProcessorVersionAdapterDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java index 673ef3a9f49..bcdddb572fc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,8 +78,6 @@ public class ExpungeEverythingService { ourLog.info("BEGINNING GLOBAL $expunge"); myTxTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); myTxTemplate.execute(t -> { - counter.addAndGet(doExpungeEverythingQuery("UPDATE " + ResourceHistoryTable.class.getSimpleName() + " d SET d.myForcedId = null")); - counter.addAndGet(doExpungeEverythingQuery("UPDATE " + ResourceTable.class.getSimpleName() + " d SET d.myForcedId = null")); counter.addAndGet(doExpungeEverythingQuery("UPDATE " + TermCodeSystem.class.getSimpleName() + " d SET d.myCurrentVersion = null")); return null; }); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java index 29ef6e357ec..25fc0735562 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java index 83dc6c8e45f..1a7c3ea4bc0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java index 5beaf5fa548..82d0f8fd0c2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java index b36ef9876a7..0af9dd63261 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java index 017dab0dc09..b66dc9b048f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.expunge; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; @Service class ResourceExpungeService implements IResourceExpungeService { @@ -151,7 +150,7 @@ class ResourceExpungeService implements IResourceExpungeService { myResourceHistoryProvenanceTableDao.deleteByPid(version.getProvenance().getId()); } - myResourceHistoryTagDao.deleteByPid(version.getTags().stream().map(t->t.getId()).collect(Collectors.toList())); + myResourceHistoryTagDao.deleteByPid(version.getId()); myResourceHistoryTableDao.deleteByPid(version.getId()); theRemainingCount.decrementAndGet(); @@ -160,7 +159,7 @@ class ResourceExpungeService implements IResourceExpungeService { private void callHooks(RequestDetails theRequestDetails, AtomicInteger theRemainingCount, ResourceHistoryTable theVersion, IdDt theId) { final AtomicInteger counter = new AtomicInteger(); if (JpaInterceptorBroadcaster.hasHooks(Pointcut.STORAGE_PRESTORAGE_EXPUNGE_RESOURCE, myInterceptorBroadcaster, theRequestDetails)) { - IFhirResourceDao resourceDao = myDaoRegistry.getResourceDao(theId.getResourceType()); + IFhirResourceDao resourceDao = myDaoRegistry.getResourceDao(theId.getResourceType()); IBaseResource resource = resourceDao.toResource(theVersion, false); HookParams params = new HookParams() .add(AtomicInteger.class, counter) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java index 8adce0073d1..ba2fe4766d0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoResourceLinkResolver.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.index; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,32 +20,40 @@ package ca.uhn.fhir.jpa.dao.index; * #L% */ +import ca.uhn.fhir.context.BaseRuntimeChildDefinition; +import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; +import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.DaoRegistry; import ca.uhn.fhir.jpa.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.extractor.IResourceLinkResolver; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Nullable; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; +import java.util.Optional; @Service public class DaoResourceLinkResolver implements IResourceLinkResolver { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DaoResourceLinkResolver.class); - + @PersistenceContext(type = PersistenceContextType.TRANSACTION) + protected EntityManager myEntityManager; @Autowired private DaoConfig myDaoConfig; @Autowired @@ -55,60 +63,103 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver { @Autowired private DaoRegistry myDaoRegistry; - @PersistenceContext(type = PersistenceContextType.TRANSACTION) - protected EntityManager myEntityManager; - @Override - public ResourceTable findTargetResource(RuntimeSearchParam theNextSpDef, String theNextPathsUnsplit, IIdType theNextId, String theTypeString, Class theType, String theId, RequestDetails theRequest) { - ResourceTable target; - ResourcePersistentId valueOf; + public IResourceLookup findTargetResource(RuntimeSearchParam theSearchParam, String theSourcePath, IIdType theSourceResourceId, String theTypeString, Class theType, IBaseReference theReference, RequestDetails theRequest) { + IResourceLookup resolvedResource; + String idPart = theSourceResourceId.getIdPart(); try { - valueOf = myIdHelperService.translateForcedIdToPid(theTypeString, theId, theRequest); - ourLog.trace("Translated {}/{} to resource PID {}", theType, theId, valueOf); + resolvedResource = myIdHelperService.resolveResourceIdentity(theTypeString, idPart, theRequest); + ourLog.trace("Translated {}/{} to resource PID {}", theType, idPart, resolvedResource); } catch (ResourceNotFoundException e) { - if (myDaoConfig.isEnforceReferentialIntegrityOnWrite() == false) { - return null; + + Optional createdTableOpt = createPlaceholderTargetIfConfiguredToDoSo(theType, theReference, idPart); + if (!createdTableOpt.isPresent()) { + + if (myDaoConfig.isEnforceReferentialIntegrityOnWrite() == false) { + return null; + } + + RuntimeResourceDefinition missingResourceDef = myContext.getResourceDefinition(theType); + String resName = missingResourceDef.getName(); + throw new InvalidRequestException("Resource " + resName + "/" + idPart + " not found, specified in path: " + theSourcePath); + } + + resolvedResource = createdTableOpt.get(); + } + + ourLog.trace("Resolved resource of type {} as PID: {}", resolvedResource.getResourceType(), resolvedResource.getResourceId()); + if (!theTypeString.equals(resolvedResource.getResourceType())) { + ourLog.error("Resource with PID {} was of type {} and wanted {}", resolvedResource.getResourceId(), theTypeString, resolvedResource.getResourceType()); + throw new UnprocessableEntityException("Resource contains reference to unknown resource ID " + theSourceResourceId.getValue()); + } + + if (resolvedResource.getDeleted() != null) { + String resName = resolvedResource.getResourceType(); + throw new InvalidRequestException("Resource " + resName + "/" + idPart + " is deleted, specified in path: " + theSourcePath); + } + + if (!theSearchParam.hasTargets() && theSearchParam.getTargets().contains(theTypeString)) { + return null; + } + + return resolvedResource; + } + + /** + * @param theIdToAssignToPlaceholder If specified, the placeholder resource created will be given a specific ID + */ + public Optional createPlaceholderTargetIfConfiguredToDoSo(Class theType, IBaseReference theReference, @Nullable String theIdToAssignToPlaceholder) { + ResourceTable valueOf = null; + + if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { RuntimeResourceDefinition missingResourceDef = myContext.getResourceDefinition(theType); String resName = missingResourceDef.getName(); - if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) { - IBaseResource newResource = missingResourceDef.newInstance(); - newResource.setId(resName + "/" + theId); - IFhirResourceDao placeholderResourceDao = (IFhirResourceDao) myDaoRegistry.getResourceDao(newResource.getClass()); - ourLog.debug("Automatically creating empty placeholder resource: {}", newResource.getIdElement().getValue()); - valueOf = placeholderResourceDao.update(newResource).getEntity().getPersistentId(); + @SuppressWarnings("unchecked") + T newResource = (T) missingResourceDef.newInstance(); + + IFhirResourceDao placeholderResourceDao = myDaoRegistry.getResourceDao(theType); + ourLog.debug("Automatically creating empty placeholder resource: {}", newResource.getIdElement().getValue()); + + if (myDaoConfig.isPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets()) { + tryToCopyIdentifierFromReferenceToTargetResource(theReference, missingResourceDef, newResource); + } + + if (theIdToAssignToPlaceholder != null) { + newResource.setId(resName + "/" + theIdToAssignToPlaceholder); + valueOf = ((ResourceTable) placeholderResourceDao.update(newResource).getEntity()); } else { - throw new InvalidRequestException("Resource " + resName + "/" + theId + " not found, specified in path: " + theNextPathsUnsplit); + valueOf = ((ResourceTable) placeholderResourceDao.create(newResource).getEntity()); } } - target = myEntityManager.find(ResourceTable.class, valueOf.getIdAsLong()); - RuntimeResourceDefinition targetResourceDef = myContext.getResourceDefinition(theType); - if (target == null) { - String resName = targetResourceDef.getName(); - throw new InvalidRequestException("Resource " + resName + "/" + theId + " not found, specified in path: " + theNextPathsUnsplit); - } - ourLog.trace("Resource PID {} is of type {}", valueOf, target.getResourceType()); - if (!theTypeString.equals(target.getResourceType())) { - ourLog.error("Resource {} with PID {} was not of type {}", target.getIdDt().getValue(), target.getId(), theTypeString); - throw new UnprocessableEntityException( - "Resource contains reference to " + theNextId.getValue() + " but resource with ID " + theNextId.getIdPart() + " is actually of type " + target.getResourceType()); - } + return Optional.ofNullable(valueOf); + } - if (target.getDeleted() != null) { - String resName = targetResourceDef.getName(); - throw new InvalidRequestException("Resource " + resName + "/" + theId + " is deleted, specified in path: " + theNextPathsUnsplit); - } + private void tryToCopyIdentifierFromReferenceToTargetResource(IBaseReference theSourceReference, RuntimeResourceDefinition theTargetResourceDef, T theTargetResource) { + boolean referenceHasIdentifier = theSourceReference.hasIdentifier(); + if (referenceHasIdentifier) { + BaseRuntimeChildDefinition targetIdentifier = theTargetResourceDef.getChildByName("identifier"); + if (targetIdentifier != null) { + BaseRuntimeElementDefinition identifierElement = targetIdentifier.getChildByName("identifier"); + String identifierElementName = identifierElement.getName(); + boolean targetHasIdentifierElement = identifierElementName.equals("Identifier"); + if (targetHasIdentifierElement) { - if (!theNextSpDef.hasTargets() && theNextSpDef.getTargets().contains(theTypeString)) { - return null; + BaseRuntimeElementCompositeDefinition referenceElement = (BaseRuntimeElementCompositeDefinition) myContext.getElementDefinition(theSourceReference.getClass()); + BaseRuntimeChildDefinition referenceIdentifierChild = referenceElement.getChildByName("identifier"); + Optional identifierOpt = referenceIdentifierChild.getAccessor().getFirstValueOrNull(theSourceReference); + identifierOpt.ifPresent(theIBase -> targetIdentifier.getMutator().addValue(theTargetResource, theIBase)); + + } + } } - return target; } @Override public void validateTypeOrThrowException(Class theType) { myDaoRegistry.getDaoOrThrowException(theType); } + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java index 833119ac9a3..72d4e1b67e2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.index; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,8 @@ package ca.uhn.fhir.jpa.dao.index; */ import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.model.entity.*; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndex; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams; import ca.uhn.fhir.jpa.util.AddRemoveCount; import org.springframework.beans.factory.annotation.Autowired; @@ -36,23 +37,22 @@ import java.util.List; @Service public class DaoSearchParamSynchronizer { - @Autowired - private DaoConfig myDaoConfig; - @PersistenceContext(type = PersistenceContextType.TRANSACTION) protected EntityManager myEntityManager; + @Autowired + private DaoConfig myDaoConfig; public AddRemoveCount synchronizeSearchParamsToDatabase(ResourceIndexedSearchParams theParams, ResourceTable theEntity, ResourceIndexedSearchParams existingParams) { AddRemoveCount retVal = new AddRemoveCount(); synchronize(theParams, theEntity, retVal, theParams.myStringParams, existingParams.myStringParams); synchronize(theParams, theEntity, retVal, theParams.myTokenParams, existingParams.myTokenParams); - synchronize(theParams, theEntity,retVal, theParams.myNumberParams, existingParams.myNumberParams); - synchronize(theParams, theEntity,retVal, theParams.myQuantityParams, existingParams.myQuantityParams); - synchronize(theParams, theEntity,retVal, theParams.myDateParams, existingParams.myDateParams); - synchronize(theParams, theEntity,retVal, theParams.myUriParams, existingParams.myUriParams); + synchronize(theParams, theEntity, retVal, theParams.myNumberParams, existingParams.myNumberParams); + synchronize(theParams, theEntity, retVal, theParams.myQuantityParams, existingParams.myQuantityParams); + synchronize(theParams, theEntity, retVal, theParams.myDateParams, existingParams.myDateParams); + synchronize(theParams, theEntity, retVal, theParams.myUriParams, existingParams.myUriParams); synchronize(theParams, theEntity, retVal, theParams.myCoordsParams, existingParams.myCoordsParams); - synchronize(theParams, theEntity,retVal, theParams.myLinks, existingParams.myLinks); + synchronize(theParams, theEntity, retVal, theParams.myLinks, existingParams.myLinks); // make sure links are indexed theEntity.setResourceLinks(theParams.myLinks); @@ -85,7 +85,7 @@ public class DaoSearchParamSynchronizer { * "one delete + one insert" with "one update" * * @param theIndexesToRemove The rows that would be removed - * @param theIndexesToAdd The rows that would be added + * @param theIndexesToAdd The rows that would be added */ private void tryToReuseIndexEntities(List theIndexesToRemove, List theIndexesToAdd) { for (int addIndex = 0; addIndex < theIndexesToAdd.size(); addIndex++) { @@ -107,8 +107,6 @@ public class DaoSearchParamSynchronizer { } - - List subtract(Collection theSubtractFrom, Collection theToSubtract) { assert theSubtractFrom != theToSubtract; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index 97b4d89df9d..d11d5e4e820 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.index; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,132 +22,210 @@ package ca.uhn.fhir.jpa.dao.index; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.interceptor.api.HookParams; -import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; -import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; -import ca.uhn.fhir.jpa.model.entity.ForcedId; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.data.IForcedIdDao; +import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; +import ca.uhn.fhir.jpa.model.cross.ResourceLookup; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.model.entity.ForcedId; import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; import ca.uhn.fhir.jpa.util.JpaInterceptorBroadcaster; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; import com.google.common.collect.ListMultimap; import com.google.common.collect.MultimapBuilder; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.checkerframework.checker.nullness.qual.NonNull; import org.hl7.fhir.instance.model.api.IIdType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Nonnull; -import java.util.*; +import javax.annotation.PostConstruct; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isBlank; +/** + * This class is used to convert between PIDs (the internal primary key for a particular resource as + * stored in the {@link ca.uhn.fhir.jpa.model.entity.ResourceTable HFJ_RESOURCE} table), and the + * public ID that a resource has. + *

    + * These IDs are sometimes one and the same (by default, a resource that the server assigns the ID of + * Patient/1 will simply use a PID of 1 and and ID of 1. However, they may also be different + * in cases where a forced ID is used (an arbitrary client-assigned ID). + *

    + *

    + * This service is highly optimized in order to minimize the number of DB calls as much as possible, + * since ID resolution is fundamental to many basic operations. This service returns either + * {@link IResourceLookup} or {@link ResourcePersistentId} depending on the method being called. + * The former involves an extra database join that the latter does not require, so selecting the + * right method here is important. + *

    + */ @Service public class IdHelperService { + private static final Logger ourLog = LoggerFactory.getLogger(IdHelperService.class); + @Autowired protected IForcedIdDao myForcedIdDao; + @Autowired + protected IResourceTableDao myResourceTableDao; @Autowired(required = true) private DaoConfig myDaoConfig; @Autowired private IInterceptorBroadcaster myInterceptorBroadcaster; + private Cache myPersistentIdCache; + private Cache myResourceLookupCache; + + @PostConstruct + public void start() { + myPersistentIdCache = newCache(); + myResourceLookupCache = newCache(); + } + + public void delete(ForcedId forcedId) { myForcedIdDao.deleteByPid(forcedId.getId()); } /** + * Given a forced ID, convert it to it's Long value. Since you are allowed to use string IDs for resources, we need to + * convert those to the underlying Long values that are stored, for lookup and comparison purposes. + * * @throws ResourceNotFoundException If the ID can not be found */ @Nonnull - public ResourcePersistentId translateForcedIdToPid(IIdType theId, RequestDetails theRequestDetails) { - return translateForcedIdToPid(theId.getResourceType(), theId.getIdPart(), theRequestDetails); - } - - /** - * @throws ResourceNotFoundException If the ID can not be found - */ - @Nonnull - public ResourcePersistentId translateForcedIdToPid(String theResourceName, String theResourceId, RequestDetails theRequestDetails) throws ResourceNotFoundException { + public IResourceLookup resolveResourceIdentity(String theResourceName, String theResourceId, RequestDetails theRequestDetails) throws ResourceNotFoundException { // We only pass 1 input in so only 0..1 will come back IdDt id = new IdDt(theResourceName, theResourceId); - List matches = translateForcedIdToPids(myDaoConfig, myInterceptorBroadcaster, theRequestDetails, myForcedIdDao, Collections.singletonList(id)); + Collection matches = translateForcedIdToPids(theRequestDetails, Collections.singletonList(id)); assert matches.size() <= 1; if (matches.isEmpty()) { throw new ResourceNotFoundException(id); } - return matches.get(0); + return matches.iterator().next(); } - public List translateForcedIdToPids(Collection theId, RequestDetails theRequestDetails) { - return IdHelperService.translateForcedIdToPids(myDaoConfig, myInterceptorBroadcaster, theRequestDetails, myForcedIdDao, theId); + /** + * Given a resource type and ID, determines the internal persistent ID for the resource. + * + * @throws ResourceNotFoundException If the ID can not be found + */ + @Nonnull + public ResourcePersistentId resolveResourcePersistentIds(String theResourceType, String theId) { + Long retVal; + if (myDaoConfig.getResourceClientIdStrategy() == DaoConfig.ClientIdStrategyEnum.ANY || !isValidPid(theId)) { + if (myDaoConfig.isDeleteEnabled()) { + retVal = resolveResourceIdentity(theResourceType, theId); + } else { + String key = theResourceType + "/" + theId; + retVal = myPersistentIdCache.get(key, t -> resolveResourceIdentity(theResourceType, theId)); + } + + } else { + retVal = Long.parseLong(theId); + } + + return new ResourcePersistentId(retVal); } - private static List translateForcedIdToPids(DaoConfig theDaoConfig, IInterceptorBroadcaster theInterceptorBroadcaster, RequestDetails theRequest, IForcedIdDao theForcedIdDao, Collection theId) { - theId.forEach(id -> Validate.isTrue(id.hasIdPart())); + /** + * Given a collection of resource IDs (resource type + id), resolves the internal persistent IDs + */ + @Nonnull + public List resolveResourcePersistentIds(List theIds, RequestDetails theRequest) { + theIds.forEach(id -> Validate.isTrue(id.hasIdPart())); - if (theId.isEmpty()) { + if (theIds.isEmpty()) { return Collections.emptyList(); } List retVal = new ArrayList<>(); - ListMultimap typeToIds = MultimapBuilder.hashKeys().arrayListValues().build(); - for (IIdType nextId : theId) { - if (theDaoConfig.getResourceClientIdStrategy() != DaoConfig.ClientIdStrategyEnum.ANY && isValidPid(nextId)) { - retVal.add(new ResourcePersistentId(nextId.getIdPartAsLong())); - } else { - if (nextId.hasResourceType()) { - typeToIds.put(nextId.getResourceType(), nextId.getIdPart()); - } else { - typeToIds.put("", nextId.getIdPart()); - } - } + if (myDaoConfig.getResourceClientIdStrategy() != DaoConfig.ClientIdStrategyEnum.ANY) { + theIds + .stream() + .filter(IdHelperService::isValidPid) + .map(IIdType::getIdPartAsLong) + .map(ResourcePersistentId::new) + .forEach(retVal::add); } + ListMultimap typeToIds = organizeIdsByResourceType(theIds); + for (Map.Entry> nextEntry : typeToIds.asMap().entrySet()) { String nextResourceType = nextEntry.getKey(); Collection nextIds = nextEntry.getValue(); if (isBlank(nextResourceType)) { - StorageProcessingMessage msg = new StorageProcessingMessage() - .setMessage("This search uses unqualified resource IDs (an ID without a resource type). This is less efficient than using a qualified type."); - HookParams params = new HookParams() - .add(RequestDetails.class, theRequest) - .addIfMatchesType(ServletRequestDetails.class, theRequest) - .add(StorageProcessingMessage.class, msg); - JpaInterceptorBroadcaster.doCallHooks(theInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_WARNING, params); - - theForcedIdDao - .findByForcedId(nextIds) - .stream() - .map(t->new ResourcePersistentId(t)) - .forEach(t->retVal.add(t)); + List views = myForcedIdDao.findByForcedId(nextIds); + views.forEach(t -> retVal.add(new ResourcePersistentId(t))); } else { - theForcedIdDao - .findByTypeAndForcedId(nextResourceType, nextIds) - .stream() - .map(t->new ResourcePersistentId(t)) - .forEach(t->retVal.add(t)); + if (!myDaoConfig.isDeleteEnabled()) { + for (Iterator idIterator = nextIds.iterator(); idIterator.hasNext(); ) { + String nextId = idIterator.next(); + String key = nextResourceType + "/" + nextId; + Long nextCachedPid = myPersistentIdCache.getIfPresent(key); + if (nextCachedPid != null) { + idIterator.remove(); + retVal.add(new ResourcePersistentId(nextCachedPid)); + } + } + } + + if (nextIds.size() > 0) { + Collection views = myForcedIdDao.findByTypeAndForcedId(nextResourceType, nextIds); + for (Object[] nextView : views) { + String forcedId = (String) nextView[0]; + Long pid = (Long) nextView[1]; + retVal.add(new ResourcePersistentId(pid)); + + if (!myDaoConfig.isDeleteEnabled()) { + String key = nextResourceType + "/" + forcedId; + myPersistentIdCache.put(key, pid); + } + } + } } } - return retVal; + return retVal; } + /** + * Given a persistent ID, returns the associated resource ID + */ + @Nonnull public IIdType translatePidIdToForcedId(FhirContext theCtx, String theResourceType, ResourcePersistentId theId) { IIdType retVal = theCtx.getVersion().newIdType(); retVal.setValue(translatePidIdToForcedId(theResourceType, theId)); return retVal; } - public String translatePidIdToForcedId(String theResourceType, ResourcePersistentId theId) { + private String translatePidIdToForcedId(String theResourceType, ResourcePersistentId theId) { ForcedId forcedId = myForcedIdDao.findByResourcePid(theId.getIdAsLong()); if (forcedId != null) { return forcedId.getResourceType() + '/' + forcedId.getForcedId(); @@ -156,17 +234,134 @@ public class IdHelperService { } } - public static boolean isValidPid(IIdType theId) { - if (theId == null || theId.getIdPart() == null) { - return false; - } - String idPart = theId.getIdPart(); - for (int i = 0; i < idPart.length(); i++) { - char nextChar = idPart.charAt(i); - if (nextChar < '0' || nextChar > '9') { - return false; + private ListMultimap organizeIdsByResourceType(Collection theIds) { + ListMultimap typeToIds = MultimapBuilder.hashKeys().arrayListValues().build(); + for (IIdType nextId : theIds) { + if (myDaoConfig.getResourceClientIdStrategy() == DaoConfig.ClientIdStrategyEnum.ANY || !isValidPid(nextId)) { + if (nextId.hasResourceType()) { + typeToIds.put(nextId.getResourceType(), nextId.getIdPart()); + } else { + typeToIds.put("", nextId.getIdPart()); + } } } - return true; + return typeToIds; + } + + private Long resolveResourceIdentity(String theResourceType, String theId) { + Long retVal; + retVal = myForcedIdDao + .findByTypeAndForcedId(theResourceType, theId) + .orElseThrow(() -> new ResourceNotFoundException(new IdDt(theResourceType, theId))); + return retVal; + } + + private Collection translateForcedIdToPids(RequestDetails theRequest, Collection theId) { + theId.forEach(id -> Validate.isTrue(id.hasIdPart())); + + if (theId.isEmpty()) { + return Collections.emptyList(); + } + + List retVal = new ArrayList<>(); + + if (myDaoConfig.getResourceClientIdStrategy() != DaoConfig.ClientIdStrategyEnum.ANY) { + List pids = theId + .stream() + .filter(t -> isValidPid(t)) + .map(t -> t.getIdPartAsLong()) + .collect(Collectors.toList()); + if (!pids.isEmpty()) { + myResourceTableDao.findLookupFieldsByResourcePid(pids) + .stream() + .map(lookup -> new ResourceLookup((String)lookup[0], (Long)lookup[1], (Date)lookup[2])) + .forEach(retVal::add); + } + } + + ListMultimap typeToIds = organizeIdsByResourceType(theId); + for (Map.Entry> nextEntry : typeToIds.asMap().entrySet()) { + String nextResourceType = nextEntry.getKey(); + Collection nextIds = nextEntry.getValue(); + + if (!myDaoConfig.isDeleteEnabled()) { + for (Iterator forcedIdIterator = nextIds.iterator(); forcedIdIterator.hasNext(); ) { + String nextForcedId = forcedIdIterator.next(); + String nextKey = nextResourceType + "/" + nextForcedId; + IResourceLookup cachedLookup = myResourceLookupCache.getIfPresent(nextKey); + if (cachedLookup != null) { + forcedIdIterator.remove(); + retVal.add(cachedLookup); + } + } + } + + if (nextIds.size() > 0) { + Collection views; + if (isBlank(nextResourceType)) { + warnAboutUnqualifiedForcedIdResolution(theRequest); + views = myForcedIdDao.findAndResolveByForcedIdWithNoType(nextIds); + + } else { + + views = myForcedIdDao.findAndResolveByForcedIdWithNoType(nextResourceType, nextIds); + + } + + for (Object[] next : views) { + String resourceType = (String) next[0]; + Long resourcePid = (Long) next[1]; + String forcedId = (String) next[2]; + Date deletedAt = (Date) next[3]; + ResourceLookup lookup = new ResourceLookup(resourceType, resourcePid, deletedAt); + retVal.add(lookup); + + if (!myDaoConfig.isDeleteEnabled()) { + String key = resourceType + "/" + forcedId; + myResourceLookupCache.put(key, lookup); + } + } + } + + } + + return retVal; + } + + private void warnAboutUnqualifiedForcedIdResolution(RequestDetails theRequest) { + StorageProcessingMessage msg = new StorageProcessingMessage() + .setMessage("This search uses unqualified resource IDs (an ID without a resource type). This is less efficient than using a qualified type."); + ourLog.debug(msg.getMessage()); + HookParams params = new HookParams() + .add(RequestDetails.class, theRequest) + .addIfMatchesType(ServletRequestDetails.class, theRequest) + .add(StorageProcessingMessage.class, msg); + JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_WARNING, params); + } + + public void clearCache() { + myPersistentIdCache.invalidateAll(); + myResourceLookupCache.invalidateAll(); + } + + private @NonNull Cache newCache() { + return Caffeine + .newBuilder() + .maximumSize(10000) + .expireAfterWrite(10, TimeUnit.MINUTES) + .build(); + } + + public static boolean isValidPid(IIdType theId) { + if (theId == null) { + return false; + } + + String idPart = theId.getIdPart(); + return isValidPid(idPart); + } + + public static boolean isValidPid(String theIdPart) { + return StringUtils.isNumeric(theIdPart); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java index f8a7fd5352a..79197ef7059 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.index; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,9 @@ import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.MatchResourceUrlService; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.dao.data.IResourceIndexedCompositeStringUniqueDao; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedCompositeStringUnique; import ca.uhn.fhir.jpa.model.entity.ResourceLink; @@ -61,6 +62,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -81,17 +83,16 @@ public class SearchParamWithInlineReferencesExtractor { @Autowired private ISearchParamRegistry mySearchParamRegistry; @Autowired - SearchParamExtractorService mySearchParamExtractorService; + private SearchParamExtractorService mySearchParamExtractorService; @Autowired - ResourceLinkExtractor myResourceLinkExtractor; + private ResourceLinkExtractor myResourceLinkExtractor; @Autowired - DaoResourceLinkResolver myDaoResourceLinkResolver; + private DaoResourceLinkResolver myDaoResourceLinkResolver; @Autowired - DaoSearchParamSynchronizer myDaoSearchParamSynchronizer; + private DaoSearchParamSynchronizer myDaoSearchParamSynchronizer; @Autowired private IResourceIndexedCompositeStringUniqueDao myResourceIndexedCompositeStringUniqueDao; - @PersistenceContext(type = PersistenceContextType.TRANSACTION) protected EntityManager myEntityManager; @@ -187,7 +188,9 @@ public class SearchParamWithInlineReferencesExtractor { if (linksForCompositePart != null) { for (ResourceLink nextLink : linksForCompositePart) { if (linksForCompositePartWantPaths.contains(nextLink.getSourcePath())) { - String value = nextLink.getTargetResource().getIdDt().toUnqualifiedVersionless().getValue(); + assert isNotBlank(nextLink.getTargetResourceType()); + assert isNotBlank(nextLink.getTargetResourceId()); + String value = nextLink.getTargetResourceType() + "/" + nextLink.getTargetResourceId(); if (isNotBlank(value)) { value = UrlUtil.escapeUrlParam(value); nextChoicesList.add(key + "=" + value); @@ -246,18 +249,28 @@ public class SearchParamWithInlineReferencesExtractor { } Class matchResourceType = matchResourceDef.getImplementingClass(); Set matches = myMatchResourceUrlService.processMatchUrl(nextIdText, matchResourceType, theRequest); + + ResourcePersistentId match; if (matches.isEmpty()) { - String msg = myContext.getLocalizer().getMessage(BaseHapiFhirDao.class, "invalidMatchUrlNoMatches", nextId.getValue()); - throw new ResourceNotFoundException(msg); - } - if (matches.size() > 1) { + + Optional placeholderOpt = myDaoResourceLinkResolver.createPlaceholderTargetIfConfiguredToDoSo(matchResourceType, nextRef, null); + if (placeholderOpt.isPresent()) { + match = new ResourcePersistentId(placeholderOpt.get().getResourceId()); + } else { + String msg = myContext.getLocalizer().getMessage(BaseHapiFhirDao.class, "invalidMatchUrlNoMatches", nextId.getValue()); + throw new ResourceNotFoundException(msg); + } + + } else if (matches.size() > 1) { String msg = myContext.getLocalizer().getMessage(BaseHapiFhirDao.class, "invalidMatchUrlMultipleMatches", nextId.getValue()); throw new PreconditionFailedException(msg); + } else { + match = matches.iterator().next(); } - ResourcePersistentId next = matches.iterator().next(); - String newId = myIdHelperService.translatePidIdToForcedId(resourceTypeString, next); + + IIdType newId = myIdHelperService.translatePidIdToForcedId(myContext, resourceTypeString, match); ourLog.debug("Replacing inline match URL[{}] with ID[{}}", nextId.getValue(), newId); - nextRef.setReference(newId); + nextRef.setReference(newId.getValue()); } } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/BasePredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/BasePredicateBuilder.java new file mode 100644 index 00000000000..e37dab1e1ac --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/BasePredicateBuilder.java @@ -0,0 +1,218 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.IDao; +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.entity.SearchParamPresent; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.PostConstruct; +import javax.persistence.criteria.*; +import java.math.BigDecimal; +import java.math.MathContext; +import java.util.List; + +abstract class BasePredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(BasePredicateBuilder.class); + @Autowired + FhirContext myContext; + @Autowired + DaoConfig myDaoConfig; + + boolean myDontUseHashesForSearch; + final IDao myCallingDao; + final CriteriaBuilder myCriteriaBuilder; + final QueryRoot myQueryRoot; + final Class myResourceType; + final String myResourceName; + final SearchParameterMap myParams; + + BasePredicateBuilder(SearchBuilder theSearchBuilder) { + myCallingDao = theSearchBuilder.getCallingDao(); + myCriteriaBuilder = theSearchBuilder.getBuilder(); + myQueryRoot = theSearchBuilder.getQueryRoot(); + myResourceType = theSearchBuilder.getResourceType(); + myResourceName = theSearchBuilder.getResourceName(); + myParams = theSearchBuilder.getParams(); + } + + @PostConstruct + private void postConstruct() { + myDontUseHashesForSearch = myDaoConfig.getDisableHashBasedSearches(); + } + + @SuppressWarnings("unchecked") + Join createJoin(SearchBuilderJoinEnum theType, String theSearchParameterName) { + Join join = null; + switch (theType) { + case DATE: + join = myQueryRoot.join("myParamsDate", JoinType.LEFT); + break; + case NUMBER: + join = myQueryRoot.join("myParamsNumber", JoinType.LEFT); + break; + case QUANTITY: + join = myQueryRoot.join("myParamsQuantity", JoinType.LEFT); + break; + case REFERENCE: + join = myQueryRoot.join("myResourceLinks", JoinType.LEFT); + break; + case STRING: + join = myQueryRoot.join("myParamsString", JoinType.LEFT); + break; + case URI: + join = myQueryRoot.join("myParamsUri", JoinType.LEFT); + break; + case TOKEN: + join = myQueryRoot.join("myParamsToken", JoinType.LEFT); + break; + case COORDS: + join = myQueryRoot.join("myParamsCoords", JoinType.LEFT); + break; + } + + SearchBuilderJoinKey key = new SearchBuilderJoinKey(theSearchParameterName, theType); + myQueryRoot.putIndex(key, join); + + return (Join) join; + } + + void addPredicateParamMissing(String theResourceName, String theParamName, boolean theMissing) { +// if (myDontUseHashesForSearch) { +// Join paramPresentJoin = myQueryRoot.join("mySearchParamPresents", JoinType.LEFT); +// Join paramJoin = paramPresentJoin.join("mySearchParam", JoinType.LEFT); +// +// myQueryRoot.addPredicate(myBuilder.equal(paramJoin.get("myResourceName"), theResourceName)); +// myQueryRoot.addPredicate(myBuilder.equal(paramJoin.get("myParamName"), theParamName)); +// myQueryRoot.addPredicate(myBuilder.equal(paramPresentJoin.get("myPresent"), !theMissing)); +// } + + Join paramPresentJoin = myQueryRoot.join("mySearchParamPresents", JoinType.LEFT); + + Expression hashPresence = paramPresentJoin.get("myHashPresence").as(Long.class); + Long hash = SearchParamPresent.calculateHashPresence(theResourceName, theParamName, !theMissing); + myQueryRoot.addPredicate(myCriteriaBuilder.equal(hashPresence, hash)); + } + + void addPredicateParamMissing(String theResourceName, String theParamName, boolean theMissing, Join theJoin) { + + myQueryRoot.addPredicate(myCriteriaBuilder.equal(theJoin.get("myResourceType"), theResourceName)); + myQueryRoot.addPredicate(myCriteriaBuilder.equal(theJoin.get("myParamName"), theParamName)); + myQueryRoot.addPredicate(myCriteriaBuilder.equal(theJoin.get("myMissing"), theMissing)); + } + + Predicate combineParamIndexPredicateWithParamNamePredicate(String theResourceName, String theParamName, From theFrom, Predicate thePredicate) { + if (myDontUseHashesForSearch) { + Predicate resourceTypePredicate = myCriteriaBuilder.equal(theFrom.get("myResourceType"), theResourceName); + Predicate paramNamePredicate = myCriteriaBuilder.equal(theFrom.get("myParamName"), theParamName); + Predicate outerPredicate = myCriteriaBuilder.and(resourceTypePredicate, paramNamePredicate, thePredicate); + return outerPredicate; + } + + long hashIdentity = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); + Predicate hashIdentityPredicate = myCriteriaBuilder.equal(theFrom.get("myHashIdentity"), hashIdentity); + return myCriteriaBuilder.and(hashIdentityPredicate, thePredicate); + } + + Predicate createPredicateNumeric(String theResourceName, + String theParamName, + From theFrom, + CriteriaBuilder builder, + IQueryParameterType theParam, + ParamPrefixEnum thePrefix, + BigDecimal theValue, + final Expression thePath, + String invalidMessageName) { + Predicate num; + // Per discussions with Grahame Grieve and James Agnew on 11/13/19, modified logic for EQUAL and NOT_EQUAL operators below so as to + // use exact value matching. The "fuzz amount" matching is still used with the APPROXIMATE operator. + switch (thePrefix) { + case GREATERTHAN: + num = builder.gt(thePath, theValue); + break; + case GREATERTHAN_OR_EQUALS: + num = builder.ge(thePath, theValue); + break; + case LESSTHAN: + num = builder.lt(thePath, theValue); + break; + case LESSTHAN_OR_EQUALS: + num = builder.le(thePath, theValue); + break; + case EQUAL: + num = builder.equal(thePath, theValue); + break; + case NOT_EQUAL: + num = builder.notEqual(thePath, theValue); + break; + case APPROXIMATE: + BigDecimal mul = SearchFuzzUtil.calculateFuzzAmount(thePrefix, theValue); + BigDecimal low = theValue.subtract(mul, MathContext.DECIMAL64); + BigDecimal high = theValue.add(mul, MathContext.DECIMAL64); + Predicate lowPred; + Predicate highPred; + lowPred = builder.ge(thePath.as(BigDecimal.class), low); + highPred = builder.le(thePath.as(BigDecimal.class), high); + num = builder.and(lowPred, highPred); + ourLog.trace("Searching for {} <= val <= {}", low, high); + break; + case ENDS_BEFORE: + case STARTS_AFTER: + default: + String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, invalidMessageName, thePrefix.getValue(), theParam.getValueAsQueryToken(myContext)); + throw new InvalidRequestException(msg); + } + + if (theParamName == null) { + return num; + } + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, num); + } + + static String createLeftAndRightMatchLikeExpression(String likeExpression) { + return "%" + likeExpression.replace("%", "[%]") + "%"; + } + + static String createLeftMatchLikeExpression(String likeExpression) { + return likeExpression.replace("%", "[%]") + "%"; + } + + static String createRightMatchLikeExpression(String likeExpression) { + return "%" + likeExpression.replace("%", "[%]"); + } + + static Predicate[] toArray(List thePredicates) { + return thePredicates.toArray(new Predicate[0]); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IPredicateBuilder.java new file mode 100644 index 00000000000..f7cd30be947 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IPredicateBuilder.java @@ -0,0 +1,35 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.model.api.IQueryParameterType; + +import javax.annotation.Nullable; +import javax.persistence.criteria.Predicate; +import java.util.List; + +public interface IPredicateBuilder { + @Nullable + Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation); +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IndexJoins.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IndexJoins.java new file mode 100644 index 00000000000..f3636677935 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/IndexJoins.java @@ -0,0 +1,40 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import com.google.common.collect.Maps; + +import javax.persistence.criteria.Join; +import java.util.Map; + +public class IndexJoins { + Map> myIndexJoins = Maps.newHashMap(); + + public void put(SearchBuilderJoinKey theKey, Join theJoin) { + myIndexJoins.put(theKey, theJoin); + } + + public Join get(SearchBuilderJoinKey theKey) { + return myIndexJoins.get(theKey); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilder.java new file mode 100644 index 00000000000..1de807105f4 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilder.java @@ -0,0 +1,129 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.*; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.api.server.RequestDetails; + +import javax.persistence.criteria.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class PredicateBuilder { + private final PredicateBuilderCoords myPredicateBuilderCoords; + private final PredicateBuilderDate myPredicateBuilderDate; + private final PredicateBuilderNumber myPredicateBuilderNumber; + private final PredicateBuilderQuantity myPredicateBuilderQuantity; + private final PredicateBuilderReference myPredicateBuilderReference; + private final PredicateBuilderResourceId myPredicateBuilderResourceId; + private final PredicateBuilderString myPredicateBuilderString; + private final PredicateBuilderTag myPredicateBuilderTag; + private final PredicateBuilderToken myPredicateBuilderToken; + private final PredicateBuilderUri myPredicateBuilderUri; + + public PredicateBuilder(SearchBuilder theSearchBuilder, PredicateBuilderFactory thePredicateBuilderFactory) { + myPredicateBuilderCoords = thePredicateBuilderFactory.newPredicateBuilderCoords(theSearchBuilder); + myPredicateBuilderDate = thePredicateBuilderFactory.newPredicateBuilderDate(theSearchBuilder); + myPredicateBuilderNumber = thePredicateBuilderFactory.newPredicateBuilderNumber(theSearchBuilder); + myPredicateBuilderQuantity = thePredicateBuilderFactory.newPredicateBuilderQuantity(theSearchBuilder); + myPredicateBuilderReference = thePredicateBuilderFactory.newPredicateBuilderReference(theSearchBuilder, this); + myPredicateBuilderResourceId = thePredicateBuilderFactory.newPredicateBuilderResourceId(theSearchBuilder); + myPredicateBuilderString = thePredicateBuilderFactory.newPredicateBuilderString(theSearchBuilder); + myPredicateBuilderTag = thePredicateBuilderFactory.newPredicateBuilderTag(theSearchBuilder); + myPredicateBuilderToken = thePredicateBuilderFactory.newPredicateBuilderToken(theSearchBuilder, this); + myPredicateBuilderUri = thePredicateBuilderFactory.newPredicateBuilderUri(theSearchBuilder); + } + + void addPredicateCoords(String theResourceName, String theParamName, List theNextAnd) { + myPredicateBuilderCoords.addPredicate(theResourceName, theParamName, theNextAnd, null); + } + + Predicate addPredicateDate(String theResourceName, String theParamName, List theNextAnd, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderDate.addPredicate(theResourceName, theParamName, theNextAnd, theOperation); + } + + Predicate addPredicateNumber(String theResourceName, String theParamName, List theNextAnd, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderNumber.addPredicate(theResourceName, theParamName, theNextAnd, theOperation); + } + + Predicate addPredicateQuantity(String theResourceName, String theParamName, List theNextAnd, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderQuantity.addPredicate(theResourceName, theParamName, theNextAnd, theOperation); + } + + void addPredicateString(String theResourceName, String theParamName, List theNextAnd) { + myPredicateBuilderString.addPredicate(theResourceName, theParamName, theNextAnd, SearchFilterParser.CompareOperation.sw); + } + + Predicate addPredicateString(String theResourceName, String theParamName, List theNextAnd, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderString.addPredicate(theResourceName, theParamName, theNextAnd, theOperation); + } + + void addPredicateTag(List> theAndOrParams, String theParamName) { + myPredicateBuilderTag.addPredicateTag(theAndOrParams, theParamName); + } + + Predicate addPredicateToken(String theResourceName, String theParamName, List theNextAnd, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderToken.addPredicate(theResourceName, theParamName, theNextAnd, theOperation); + } + + Predicate addPredicateUri(String theResourceName, String theName, List theSingletonList, SearchFilterParser.CompareOperation theOperation) { + return myPredicateBuilderUri.addPredicate(theResourceName, theName, theSingletonList, theOperation); + } + + public void searchForIdsWithAndOr(String theResourceName, String theNextParamName, List> theAndOrParams, RequestDetails theRequest) { + myPredicateBuilderReference.searchForIdsWithAndOr(theResourceName, theNextParamName, theAndOrParams, theRequest); + } + + Subquery createLinkSubquery(String theParameterName, String theTargetResourceType, ArrayList theOrValues, RequestDetails theRequest) { + return myPredicateBuilderReference.createLinkSubquery(true, theParameterName, theTargetResourceType, theOrValues, theRequest); + } + + Predicate createResourceLinkPathPredicate(String theTargetResourceType, String theParamReference, Join theJoin) { + return myPredicateBuilderReference.createResourceLinkPathPredicate(theTargetResourceType, theParamReference, theJoin); + } + + void addPredicateResourceId(List> theAndOrParams, String theResourceName, RequestDetails theRequest) { + myPredicateBuilderResourceId.addPredicateResourceId(theAndOrParams, theResourceName, null, theRequest); + } + + public Predicate addPredicateResourceId(List> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { + return myPredicateBuilderResourceId.addPredicateResourceId(theValues, theResourceName, theOperation, theRequest); + } + + Predicate createPredicateString(IQueryParameterType theLeftValue, String theResourceName, String theName, CriteriaBuilder theBuilder, From theStringJoin) { + return myPredicateBuilderString.createPredicateString(theLeftValue, theResourceName, theName, theBuilder, theStringJoin); + } + + Collection createPredicateToken(List theTokens, String theResourceName, String theName, CriteriaBuilder theBuilder, From theTokenJoin) { + return myPredicateBuilderToken.createPredicateToken(theTokens, theResourceName, theName, theBuilder, theTokenJoin); + } + + Predicate createPredicateDate(IQueryParameterType theLeftValue, String theResourceName, String theName, CriteriaBuilder theBuilder, From theDateJoin) { + return myPredicateBuilderDate.createPredicateDate(theLeftValue, theResourceName, theName, theBuilder, theDateJoin); + } + + Predicate createPredicateQuantity(IQueryParameterType theLeftValue, String theResourceName, String theName, CriteriaBuilder theBuilder, From theDateJoin) { + return myPredicateBuilderQuantity.createPredicateQuantity(theLeftValue, theResourceName, theName, theBuilder, theDateJoin); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoords.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoords.java new file mode 100644 index 00000000000..933b7335e80 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoords.java @@ -0,0 +1,174 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamCoords; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.util.CoordCalculator; +import ca.uhn.fhir.jpa.util.SearchBox; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.model.dstu2.resource.Location; +import ca.uhn.fhir.rest.param.QuantityParam; +import ca.uhn.fhir.rest.param.SpecialParam; +import ca.uhn.fhir.rest.param.TokenParam; +import com.google.common.annotations.VisibleForTesting; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.From; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import java.util.ArrayList; +import java.util.List; + +import static org.apache.commons.lang3.StringUtils.isBlank; + +@Component +@Scope("prototype") +public class PredicateBuilderCoords extends BasePredicateBuilder implements IPredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderCoords.class); + + PredicateBuilderCoords(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + private Predicate createPredicateCoords(IQueryParameterType theParam, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom) { + String latitudeValue; + String longitudeValue; + Double distanceKm = 0.0; + + if (theParam instanceof TokenParam) { // DSTU3 + TokenParam param = (TokenParam) theParam; + String value = param.getValue(); + String[] parts = value.split(":"); + if (parts.length != 2) { + throw new IllegalArgumentException("Invalid position format '" + value + "'. Required format is 'latitude:longitude'"); + } + latitudeValue = parts[0]; + longitudeValue = parts[1]; + if (isBlank(latitudeValue) || isBlank(longitudeValue)) { + throw new IllegalArgumentException("Invalid position format '" + value + "'. Both latitude and longitude must be provided."); + } + QuantityParam distanceParam = myParams.getNearDistanceParam(); + if (distanceParam != null) { + distanceKm = distanceParam.getValue().doubleValue(); + } + } else if (theParam instanceof SpecialParam) { // R4 + SpecialParam param = (SpecialParam) theParam; + String value = param.getValue(); + String[] parts = value.split("\\|"); + if (parts.length < 2 || parts.length > 4) { + throw new IllegalArgumentException("Invalid position format '" + value + "'. Required format is 'latitude|longitude' or 'latitude|longitude|distance' or 'latitude|longitude|distance|units'"); + } + latitudeValue = parts[0]; + longitudeValue = parts[1]; + if (isBlank(latitudeValue) || isBlank(longitudeValue)) { + throw new IllegalArgumentException("Invalid position format '" + value + "'. Both latitude and longitude must be provided."); + } + if (parts.length >= 3) { + String distanceString = parts[2]; + if (!isBlank(distanceString)) { + distanceKm = Double.valueOf(distanceString); + } + } + } else { + throw new IllegalArgumentException("Invalid position type: " + theParam.getClass()); + } + + Predicate latitudePredicate; + Predicate longitudePredicate; + if (distanceKm == 0.0) { + latitudePredicate = theBuilder.equal(theFrom.get("myLatitude"), latitudeValue); + longitudePredicate = theBuilder.equal(theFrom.get("myLongitude"), longitudeValue); + } else if (distanceKm < 0.0) { + throw new IllegalArgumentException("Invalid " + Location.SP_NEAR_DISTANCE + " parameter '" + distanceKm + "' must be >= 0.0"); + } else if (distanceKm > CoordCalculator.MAX_SUPPORTED_DISTANCE_KM) { + throw new IllegalArgumentException("Invalid " + Location.SP_NEAR_DISTANCE + " parameter '" + distanceKm + "' must be <= " + CoordCalculator.MAX_SUPPORTED_DISTANCE_KM); + } else { + double latitudeDegrees = Double.parseDouble(latitudeValue); + double longitudeDegrees = Double.parseDouble(longitudeValue); + + SearchBox box = CoordCalculator.getBox(latitudeDegrees, longitudeDegrees, distanceKm); + latitudePredicate = latitudePredicateFromBox(theBuilder, theFrom, box); + longitudePredicate = longitudePredicateFromBox(theBuilder, theFrom, box); + } + Predicate singleCode = theBuilder.and(latitudePredicate, longitudePredicate); + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } + + private Predicate latitudePredicateFromBox(CriteriaBuilder theBuilder, From theFrom, SearchBox theBox) { + return theBuilder.and( + theBuilder.greaterThanOrEqualTo(theFrom.get("myLatitude"), theBox.getSouthWest().getLatitude()), + theBuilder.lessThanOrEqualTo(theFrom.get("myLatitude"), theBox.getNorthEast().getLatitude()) + ); + } + + @VisibleForTesting + Predicate longitudePredicateFromBox(CriteriaBuilder theBuilder, From theFrom, SearchBox theBox) { + if (theBox.crossesAntiMeridian()) { + return theBuilder.or( + theBuilder.greaterThanOrEqualTo(theFrom.get("myLongitude"), theBox.getNorthEast().getLongitude()), + theBuilder.lessThanOrEqualTo(theFrom.get("myLongitude"), theBox.getSouthWest().getLongitude()) + ); + } + return theBuilder.and( + theBuilder.greaterThanOrEqualTo(theFrom.get("myLongitude"), theBox.getSouthWest().getLongitude()), + theBuilder.lessThanOrEqualTo(theFrom.get("myLongitude"), theBox.getNorthEast().getLongitude()) + ); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation theOperation) { + Join join = createJoin(SearchBuilderJoinEnum.COORDS, theParamName); + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList(); + for (IQueryParameterType nextOr : theList) { + + Predicate singleCode = createPredicateCoords(nextOr, + theResourceName, + theParamName, + myCriteriaBuilder, + join + ); + codePredicates.add(singleCode); + } + + Predicate retVal = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(retVal); + return retVal; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderDate.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderDate.java new file mode 100644 index 00000000000..466182b138f --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderDate.java @@ -0,0 +1,235 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.DateParam; +import ca.uhn.fhir.rest.param.DateRangeParam; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.From; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Component +@Scope("prototype") +public class PredicateBuilderDate extends BasePredicateBuilder implements IPredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderDate.class); + + private Map> myJoinMap; + + PredicateBuilderDate(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + boolean newJoin = false; + if (myJoinMap == null) { + myJoinMap = new HashMap<>(); + } + String key = theResourceName + " " + theParamName; + + Join join = myJoinMap.get(key); + if (join == null) { + join = createJoin(SearchBuilderJoinEnum.DATE, theParamName); + myJoinMap.put(key, join); + newJoin = true; + } + + if (theList.get(0).getMissing() != null) { + Boolean missing = theList.get(0).getMissing(); + addPredicateParamMissing(theResourceName, theParamName, missing, join); + return null; + } + + List codePredicates = new ArrayList<>(); + for (IQueryParameterType nextOr : theList) { + IQueryParameterType params = nextOr; + Predicate p = createPredicateDate(params, + theResourceName, + theParamName, + myCriteriaBuilder, + join, + operation); + codePredicates.add(p); + } + + Predicate orPredicates = myCriteriaBuilder.or(toArray(codePredicates)); + + if (newJoin) { + Predicate identityAndValuePredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, orPredicates); + myQueryRoot.addPredicate(identityAndValuePredicate); + } else { + myQueryRoot.addPredicate(orPredicates); + } + + return orPredicates; + } + + public Predicate createPredicateDate(IQueryParameterType theParam, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom) { + Predicate predicateDate = createPredicateDate(theParam, + theResourceName, + theParamName, + theBuilder, + theFrom, + null); + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, predicateDate); + } + + private Predicate createPredicateDate(IQueryParameterType theParam, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom, + SearchFilterParser.CompareOperation theOperation) { + + Predicate p; + if (theParam instanceof DateParam) { + DateParam date = (DateParam) theParam; + if (!date.isEmpty()) { + DateRangeParam range = new DateRangeParam(date); + p = createPredicateDateFromRange(theBuilder, + theFrom, + range, + theOperation); + } else { + // TODO: handle missing date param? + p = null; + } + } else if (theParam instanceof DateRangeParam) { + DateRangeParam range = (DateRangeParam) theParam; + p = createPredicateDateFromRange(theBuilder, + theFrom, + range, + theOperation); + } else { + throw new IllegalArgumentException("Invalid token type: " + theParam.getClass()); + } + + return p; + } + + private Predicate createPredicateDateFromRange(CriteriaBuilder theBuilder, + From theFrom, + DateRangeParam theRange, + SearchFilterParser.CompareOperation operation) { + Date lowerBound = theRange.getLowerBoundAsInstant(); + Date upperBound = theRange.getUpperBoundAsInstant(); + Predicate lt = null; + Predicate gt = null; + Predicate lb = null; + Predicate ub = null; + + if (operation == SearchFilterParser.CompareOperation.lt) { + if (lowerBound == null) { + throw new InvalidRequestException("lowerBound value not correctly specified for compare operation"); + } + lb = theBuilder.lessThan(theFrom.get("myValueLow"), lowerBound); + } else if (operation == SearchFilterParser.CompareOperation.le) { + if (upperBound == null) { + throw new InvalidRequestException("upperBound value not correctly specified for compare operation"); + } + lb = theBuilder.lessThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); + } else if (operation == SearchFilterParser.CompareOperation.gt) { + if (upperBound == null) { + throw new InvalidRequestException("upperBound value not correctly specified for compare operation"); + } + lb = theBuilder.greaterThan(theFrom.get("myValueHigh"), upperBound); + } else if (operation == SearchFilterParser.CompareOperation.ge) { + if (lowerBound == null) { + throw new InvalidRequestException("lowerBound value not correctly specified for compare operation"); + } + lb = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); + } else if (operation == SearchFilterParser.CompareOperation.ne) { + if ((lowerBound == null) || + (upperBound == null)) { + throw new InvalidRequestException("lowerBound and/or upperBound value not correctly specified for compare operation"); + } + /*Predicate*/ + lt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); + /*Predicate*/ + gt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); + lb = theBuilder.or(lt, + gt); + } else if ((operation == SearchFilterParser.CompareOperation.eq) || + (operation == null)) { + if (lowerBound != null) { + /*Predicate*/ + gt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueLow"), lowerBound); + /*Predicate*/ + lt = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueHigh"), lowerBound); + if (theRange.getLowerBound().getPrefix() == ParamPrefixEnum.STARTS_AFTER || theRange.getLowerBound().getPrefix() == ParamPrefixEnum.EQUAL) { + lb = gt; + } else { + lb = theBuilder.or(gt, lt); + } + } + + if (upperBound != null) { + /*Predicate*/ + gt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueLow"), upperBound); + /*Predicate*/ + lt = theBuilder.lessThanOrEqualTo(theFrom.get("myValueHigh"), upperBound); + if (theRange.getUpperBound().getPrefix() == ParamPrefixEnum.ENDS_BEFORE || theRange.getUpperBound().getPrefix() == ParamPrefixEnum.EQUAL) { + ub = lt; + } else { + ub = theBuilder.or(gt, lt); + } + } + } else { + throw new InvalidRequestException(String.format("Unsupported operator specified, operator=%s", + operation.name())); + } + + ourLog.trace("Date range is {} - {}", lowerBound, upperBound); + + if (lb != null && ub != null) { + return (theBuilder.and(lb, ub)); + } else if (lb != null) { + return (lb); + } else { + return (ub); + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderFactory.java new file mode 100644 index 00000000000..7e05136057f --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderFactory.java @@ -0,0 +1,49 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import org.springframework.beans.factory.annotation.Lookup; +import org.springframework.stereotype.Service; + +@Service +public abstract class PredicateBuilderFactory { + @Lookup + public abstract PredicateBuilderCoords newPredicateBuilderCoords(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderDate newPredicateBuilderDate(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderNumber newPredicateBuilderNumber(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderQuantity newPredicateBuilderQuantity(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderReference newPredicateBuilderReference(SearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder); + @Lookup + public abstract PredicateBuilderResourceId newPredicateBuilderResourceId(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderString newPredicateBuilderString(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderTag newPredicateBuilderTag(SearchBuilder theSearchBuilder); + @Lookup + public abstract PredicateBuilderToken newPredicateBuilderToken(SearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder); + @Lookup + public abstract PredicateBuilderUri newPredicateBuilderUri(SearchBuilder theSearchBuilder); +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderNumber.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderNumber.java new file mode 100644 index 00000000000..21f46c0635c --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderNumber.java @@ -0,0 +1,111 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamNumber; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.NumberParam; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.Expression; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; + +@Component +@Scope("prototype") +class PredicateBuilderNumber extends BasePredicateBuilder implements IPredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderNumber.class); + + PredicateBuilderNumber(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + Join join = createJoin(SearchBuilderJoinEnum.NUMBER, theParamName); + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList<>(); + for (IQueryParameterType nextOr : theList) { + + if (nextOr instanceof NumberParam) { + NumberParam param = (NumberParam) nextOr; + + BigDecimal value = param.getValue(); + if (value == null) { + continue; + } + + final Expression fromObj = join.get("myValue"); + ParamPrefixEnum prefix = defaultIfNull(param.getPrefix(), ParamPrefixEnum.EQUAL); + if (operation == SearchFilterParser.CompareOperation.ne) { + prefix = ParamPrefixEnum.NOT_EQUAL; + } else if (operation == SearchFilterParser.CompareOperation.lt) { + prefix = ParamPrefixEnum.LESSTHAN; + } else if (operation == SearchFilterParser.CompareOperation.le) { + prefix = ParamPrefixEnum.LESSTHAN_OR_EQUALS; + } else if (operation == SearchFilterParser.CompareOperation.gt) { + prefix = ParamPrefixEnum.GREATERTHAN; + } else if (operation == SearchFilterParser.CompareOperation.ge) { + prefix = ParamPrefixEnum.GREATERTHAN_OR_EQUALS; + } else if (operation == SearchFilterParser.CompareOperation.eq) { + prefix = ParamPrefixEnum.EQUAL; + } else if (operation != null) { + throw new IllegalArgumentException("Invalid operator specified for number type"); + } + + + String invalidMessageName = "invalidNumberPrefix"; + + Predicate predicateNumeric = createPredicateNumeric(theResourceName, theParamName, join, myCriteriaBuilder, nextOr, prefix, value, fromObj, invalidMessageName); + Predicate predicateOuter = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, predicateNumeric); + codePredicates.add(predicateOuter); + + } else { + throw new IllegalArgumentException("Invalid token type: " + nextOr.getClass()); + } + + } + + Predicate predicate = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(predicate); + return predicate; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderQuantity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderQuantity.java new file mode 100644 index 00000000000..e9737ee56df --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderQuantity.java @@ -0,0 +1,193 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.model.base.composite.BaseQuantityDt; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import ca.uhn.fhir.rest.param.QuantityParam; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.*; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; +import static org.apache.commons.lang3.StringUtils.isBlank; + +@Component +@Scope("prototype") +class PredicateBuilderQuantity extends BasePredicateBuilder implements IPredicateBuilder { + + PredicateBuilderQuantity(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + Join join = createJoin(SearchBuilderJoinEnum.QUANTITY, theParamName); + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList(); + for (IQueryParameterType nextOr : theList) { + + Predicate singleCode = createPredicateQuantity(nextOr, + theResourceName, + theParamName, + myCriteriaBuilder, + join, + operation); + codePredicates.add(singleCode); + } + + Predicate retVal = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(retVal); + return retVal; + } + + public Predicate createPredicateQuantity(IQueryParameterType theParam, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom) { + return createPredicateQuantity(theParam, + theResourceName, + theParamName, + theBuilder, + theFrom, + null); + } + + private Predicate createPredicateQuantity(IQueryParameterType theParam, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom, + SearchFilterParser.CompareOperation operation) { + String systemValue; + String unitsValue; + ParamPrefixEnum cmpValue = null; + BigDecimal valueValue; + + if (operation == SearchFilterParser.CompareOperation.ne) { + cmpValue = ParamPrefixEnum.NOT_EQUAL; + } else if (operation == SearchFilterParser.CompareOperation.lt) { + cmpValue = ParamPrefixEnum.LESSTHAN; + } else if (operation == SearchFilterParser.CompareOperation.le) { + cmpValue = ParamPrefixEnum.LESSTHAN_OR_EQUALS; + } else if (operation == SearchFilterParser.CompareOperation.gt) { + cmpValue = ParamPrefixEnum.GREATERTHAN; + } else if (operation == SearchFilterParser.CompareOperation.ge) { + cmpValue = ParamPrefixEnum.GREATERTHAN_OR_EQUALS; + } else if (operation == SearchFilterParser.CompareOperation.eq) { + cmpValue = ParamPrefixEnum.EQUAL; + } else if (operation != null) { + throw new IllegalArgumentException("Invalid operator specified for quantity type"); + } + + if (theParam instanceof BaseQuantityDt) { + BaseQuantityDt param = (BaseQuantityDt) theParam; + systemValue = param.getSystemElement().getValueAsString(); + unitsValue = param.getUnitsElement().getValueAsString(); + if (operation == null) { + cmpValue = ParamPrefixEnum.forValue(param.getComparatorElement().getValueAsString()); + } + valueValue = param.getValueElement().getValue(); + } else if (theParam instanceof QuantityParam) { + QuantityParam param = (QuantityParam) theParam; + systemValue = param.getSystem(); + unitsValue = param.getUnits(); + if (operation == null) { + cmpValue = param.getPrefix(); + } + valueValue = param.getValue(); + } else { + throw new IllegalArgumentException("Invalid quantity type: " + theParam.getClass()); + } + + if (myDontUseHashesForSearch) { + Predicate system = null; + if (!isBlank(systemValue)) { + system = theBuilder.equal(theFrom.get("mySystem"), systemValue); + } + + Predicate code = null; + if (!isBlank(unitsValue)) { + code = theBuilder.equal(theFrom.get("myUnits"), unitsValue); + } + + cmpValue = defaultIfNull(cmpValue, ParamPrefixEnum.EQUAL); + final Expression path = theFrom.get("myValue"); + String invalidMessageName = "invalidQuantityPrefix"; + + Predicate num = createPredicateNumeric(theResourceName, null, theFrom, theBuilder, theParam, cmpValue, valueValue, path, invalidMessageName); + + Predicate singleCode; + if (system == null && code == null) { + singleCode = num; + } else if (system == null) { + singleCode = theBuilder.and(code, num); + } else if (code == null) { + singleCode = theBuilder.and(system, num); + } else { + singleCode = theBuilder.and(system, code, num); + } + + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } + + Predicate hashPredicate; + if (!isBlank(systemValue) && !isBlank(unitsValue)) { + long hash = ResourceIndexedSearchParamQuantity.calculateHashSystemAndUnits(theResourceName, theParamName, systemValue, unitsValue); + hashPredicate = myCriteriaBuilder.equal(theFrom.get("myHashIdentitySystemAndUnits"), hash); + } else if (!isBlank(unitsValue)) { + long hash = ResourceIndexedSearchParamQuantity.calculateHashUnits(theResourceName, theParamName, unitsValue); + hashPredicate = myCriteriaBuilder.equal(theFrom.get("myHashIdentityAndUnits"), hash); + } else { + long hash = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); + hashPredicate = myCriteriaBuilder.equal(theFrom.get("myHashIdentity"), hash); + } + + cmpValue = defaultIfNull(cmpValue, ParamPrefixEnum.EQUAL); + final Expression path = theFrom.get("myValue"); + String invalidMessageName = "invalidQuantityPrefix"; + + Predicate numericPredicate = createPredicateNumeric(theResourceName, null, theFrom, theBuilder, theParam, cmpValue, valueValue, path, invalidMessageName); + + return theBuilder.and(hashPredicate, numericPredicate); + } + + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java new file mode 100644 index 00000000000..6306487cabf --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderReference.java @@ -0,0 +1,939 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.*; +import ca.uhn.fhir.interceptor.api.HookParams; +import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; +import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.jpa.dao.*; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.model.entity.*; +import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.ResourceMetaParams; +import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; +import ca.uhn.fhir.jpa.searchparam.util.SourceParam; +import ca.uhn.fhir.jpa.util.JpaInterceptorBroadcaster; +import ca.uhn.fhir.model.api.IQueryParameterAnd; +import ca.uhn.fhir.model.api.IQueryParameterOr; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.QualifiedParamList; +import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.param.*; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.*; +import java.util.*; +import java.util.stream.Collectors; + +import static org.apache.commons.lang3.StringUtils.*; + +@Component +@Scope("prototype") +class PredicateBuilderReference extends BasePredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderReference.class); + + @Autowired + IdHelperService myIdHelperService; + @Autowired + ISearchParamRegistry mySearchParamRegistry; + @Autowired + MatchUrlService myMatchUrlService; + @Autowired + DaoRegistry myDaoRegistry; + @Autowired + private IInterceptorBroadcaster myInterceptorBroadcaster; + + private final PredicateBuilder myPredicateBuilder; + + PredicateBuilderReference(SearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder) { + super(theSearchBuilder); + myPredicateBuilder = thePredicateBuilder; + } + + /** + * Add reference predicate to the current search + */ + + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation, + RequestDetails theRequest) { + + //Is this just to ensure the chain has been split correctly??? + assert theParamName.contains(".") == false; + + if ((operation != null) && + (operation != SearchFilterParser.CompareOperation.eq) && + (operation != SearchFilterParser.CompareOperation.ne)) { + throw new InvalidRequestException("Invalid operator specified for reference predicate. Supported operators for reference predicate are \"eq\" and \"ne\"."); + } + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing()); + return null; + } + + Join join = createJoin(SearchBuilderJoinEnum.REFERENCE, theParamName); + + List targetIds = new ArrayList<>(); + List targetQualifiedUrls = new ArrayList<>(); + + for (int orIdx = 0; orIdx < theList.size(); orIdx++) { + IQueryParameterType nextOr = theList.get(orIdx); + + if (nextOr instanceof ReferenceParam) { + ReferenceParam ref = (ReferenceParam) nextOr; + + if (isBlank(ref.getChain())) { + + /* + * Handle non-chained search, e.g. Patient?organization=Organization/123 + */ + + IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); + + if (dt.hasBaseUrl()) { + if (myDaoConfig.getTreatBaseUrlsAsLocal().contains(dt.getBaseUrl())) { + dt = dt.toUnqualified(); + targetIds.add(dt); + } else { + targetQualifiedUrls.add(dt.getValue()); + } + } else { + targetIds.add(dt); + } + + } else { + + /* + * Handle chained search, e.g. Patient?organization.name=Kwik-e-mart + */ + + return addPredicateReferenceWithChain(theResourceName, theParamName, theList, join, new ArrayList<>(), ref, theRequest); + + } + + } else { + throw new IllegalArgumentException("Invalid token type (expecting ReferenceParam): " + nextOr.getClass()); + } + + } + + List codePredicates = new ArrayList<>(); + + // Resources by ID + List targetPids = myIdHelperService.resolveResourcePersistentIds(targetIds, theRequest); + if (!targetPids.isEmpty()) { + ourLog.debug("Searching for resource link with target PIDs: {}", targetPids); + Predicate pathPredicate; + if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { + pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join); + } else { + pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join).not(); + } + Predicate pidPredicate; + if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { + pidPredicate = join.get("myTargetResourcePid").in(ResourcePersistentId.toLongList(targetPids)); + } else { + pidPredicate = join.get("myTargetResourcePid").in(ResourcePersistentId.toLongList(targetPids)).not(); + } + codePredicates.add(myCriteriaBuilder.and(pathPredicate, pidPredicate)); + } + + // Resources by fully qualified URL + if (!targetQualifiedUrls.isEmpty()) { + ourLog.debug("Searching for resource link with target URLs: {}", targetQualifiedUrls); + Predicate pathPredicate; + if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { + pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join); + } else { + pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, join).not(); + } + Predicate pidPredicate; + if ((operation == null) || (operation == SearchFilterParser.CompareOperation.eq)) { + pidPredicate = join.get("myTargetResourceUrl").in(targetQualifiedUrls); + } else { + pidPredicate = join.get("myTargetResourceUrl").in(targetQualifiedUrls).not(); + } + codePredicates.add(myCriteriaBuilder.and(pathPredicate, pidPredicate)); + } + + if (codePredicates.size() > 0) { + Predicate predicate = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(predicate); + return predicate; + } else { + // Add a predicate that will never match + Predicate pidPredicate = join.get("myTargetResourcePid").in(-1L); + myQueryRoot.clearPredicates(); + myQueryRoot.addPredicate(pidPredicate); + return pidPredicate; + } + } + + /** + * This is for handling queries like the following: /Observation?device.identifier=urn:system|foo in which we use a chain + * on the device. + */ + private Predicate addPredicateReferenceWithChain(String theResourceName, String theParamName, List theList, Join theJoin, List theCodePredicates, ReferenceParam theReferenceParam, RequestDetails theRequest) { + final List> resourceTypes; + if (!theReferenceParam.hasResourceType()) { + + RuntimeSearchParam param = mySearchParamRegistry.getActiveSearchParam(theResourceName, theParamName); + resourceTypes = new ArrayList<>(); + + if (param.hasTargets()) { + Set targetTypes = param.getTargets(); + for (String next : targetTypes) { + resourceTypes.add(myContext.getResourceDefinition(next).getImplementingClass()); + } + } + + if (resourceTypes.isEmpty()) { + RuntimeResourceDefinition resourceDef = myContext.getResourceDefinition(theResourceName); + RuntimeSearchParam searchParamByName = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); + if (searchParamByName == null) { + throw new InternalErrorException("Could not find parameter " + theParamName); + } + String paramPath = searchParamByName.getPath(); + if (paramPath.endsWith(".as(Reference)")) { + paramPath = paramPath.substring(0, paramPath.length() - ".as(Reference)".length()) + "Reference"; + } + + if (paramPath.contains(".extension(")) { + int startIdx = paramPath.indexOf(".extension("); + int endIdx = paramPath.indexOf(')', startIdx); + if (startIdx != -1 && endIdx != -1) { + paramPath = paramPath.substring(0, startIdx + 10) + paramPath.substring(endIdx + 1); + } + } + + BaseRuntimeChildDefinition def = myContext.newTerser().getDefinition(myResourceType, paramPath); + if (def instanceof RuntimeChildChoiceDefinition) { + RuntimeChildChoiceDefinition choiceDef = (RuntimeChildChoiceDefinition) def; + resourceTypes.addAll(choiceDef.getResourceTypes()); + } else if (def instanceof RuntimeChildResourceDefinition) { + RuntimeChildResourceDefinition resDef = (RuntimeChildResourceDefinition) def; + resourceTypes.addAll(resDef.getResourceTypes()); + if (resourceTypes.size() == 1) { + if (resourceTypes.get(0).isInterface()) { + throw new InvalidRequestException("Unable to perform search for unqualified chain '" + theParamName + "' as this SearchParameter does not declare any target types. Add a qualifier of the form '" + theParamName + ":[ResourceType]' to perform this search."); + } + } + } else { + throw new ConfigurationException("Property " + paramPath + " of type " + myResourceName + " is not a resource: " + def.getClass()); + } + } + + if (resourceTypes.isEmpty()) { + for (BaseRuntimeElementDefinition next : myContext.getElementDefinitions()) { + if (next instanceof RuntimeResourceDefinition) { + RuntimeResourceDefinition nextResDef = (RuntimeResourceDefinition) next; + resourceTypes.add(nextResDef.getImplementingClass()); + } + } + } + + } else { + try { + RuntimeResourceDefinition resDef = myContext.getResourceDefinition(theReferenceParam.getResourceType()); + resourceTypes = new ArrayList<>(1); + resourceTypes.add(resDef.getImplementingClass()); + } catch (DataFormatException e) { + throw new InvalidRequestException("Invalid resource type: " + theReferenceParam.getResourceType()); + } + } + + boolean foundChainMatch = false; + List> candidateTargetTypes = new ArrayList<>(); + for (Class nextType : resourceTypes) { + + String chain = theReferenceParam.getChain(); + String remainingChain = null; + int chainDotIndex = chain.indexOf('.'); + if (chainDotIndex != -1) { + remainingChain = chain.substring(chainDotIndex + 1); + chain = chain.substring(0, chainDotIndex); + } + + RuntimeResourceDefinition typeDef = myContext.getResourceDefinition(nextType); + String subResourceName = typeDef.getName(); + + IDao dao = myDaoRegistry.getResourceDao(nextType); + if (dao == null) { + ourLog.debug("Don't have a DAO for type {}", nextType.getSimpleName()); + continue; + } + + int qualifierIndex = chain.indexOf(':'); + String qualifier = null; + if (qualifierIndex != -1) { + qualifier = chain.substring(qualifierIndex); + chain = chain.substring(0, qualifierIndex); + } + + boolean isMeta = ResourceMetaParams.RESOURCE_META_PARAMS.containsKey(chain); + RuntimeSearchParam param = null; + if (!isMeta) { + param = mySearchParamRegistry.getSearchParamByName(typeDef, chain); + if (param == null) { + ourLog.debug("Type {} doesn't have search param {}", nextType.getSimpleName(), param); + continue; + } + } + + ArrayList orValues = Lists.newArrayList(); + + for (IQueryParameterType next : theList) { + String nextValue = next.getValueAsQueryToken(myContext); + IQueryParameterType chainValue = mapReferenceChainToRawParamType(remainingChain, param, theParamName, qualifier, nextType, chain, isMeta, nextValue); + if (chainValue == null) { + continue; + } + foundChainMatch = true; + orValues.add(chainValue); + } + + + Subquery subQ = createLinkSubquery(foundChainMatch, chain, subResourceName, orValues, theRequest); + + Predicate pathPredicate = createResourceLinkPathPredicate(theResourceName, theParamName, theJoin); + Predicate pidPredicate = theJoin.get("myTargetResourcePid").in(subQ); + Predicate andPredicate = myCriteriaBuilder.and(pathPredicate, pidPredicate); + theCodePredicates.add(andPredicate); + candidateTargetTypes.add(nextType); + } + + if (!foundChainMatch) { + throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "invalidParameterChain", theParamName + '.' + theReferenceParam.getChain())); + } + + if (candidateTargetTypes.size() > 1) { + warnAboutPerformanceOnUnqualifiedResources(theParamName, theRequest, candidateTargetTypes); + } + + Predicate predicate = myCriteriaBuilder.or(toArray(theCodePredicates)); + myQueryRoot.addPredicate(predicate); + return predicate; + } + + private void warnAboutPerformanceOnUnqualifiedResources(String theParamName, RequestDetails theRequest, List> theCandidateTargetTypes) { + String message = new StringBuilder() + .append("This search uses an unqualified resource(a parameter in a chain without a resource type). ") + .append("This is less efficient than using a qualified type. ") + .append("[" + theParamName + "] resolves to ["+ theCandidateTargetTypes.stream().map(Class::getSimpleName).collect(Collectors.joining(",")) +"].") + .append("If you know what you're looking for, try qualifying it like this: ") + .append(theCandidateTargetTypes.stream().map(cls -> "[" +cls.getSimpleName() +":"+theParamName+"]").collect(Collectors.joining(" or "))) + .toString(); + StorageProcessingMessage msg = new StorageProcessingMessage() + .setMessage(message); + HookParams params = new HookParams() + .add(RequestDetails.class, theRequest) + .addIfMatchesType(ServletRequestDetails.class, theRequest) + .add(StorageProcessingMessage.class, msg); + JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequest, Pointcut.JPA_PERFTRACE_WARNING, params); + } + + Predicate createResourceLinkPathPredicate(String theResourceName, String theParamName, From from) { + return createResourceLinkPathPredicate(myContext, theParamName, from, theResourceName); + } + + private Predicate createResourceLinkPathPredicate(FhirContext theContext, String theParamName, From theFrom, + String theResourceType) { + RuntimeResourceDefinition resourceDef = theContext.getResourceDefinition(theResourceType); + RuntimeSearchParam param = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); + List path = param.getPathsSplit(); + + /* + * SearchParameters can declare paths on multiple resource + * types. Here we only want the ones that actually apply. + */ + path = new ArrayList<>(path); + + ListIterator iter = path.listIterator(); + while (iter.hasNext()) { + String nextPath = trim(iter.next()); + if (!nextPath.contains(theResourceType + ".")) { + iter.remove(); + } + } + + return theFrom.get("mySourcePath").in(path); + } + + private IQueryParameterType mapReferenceChainToRawParamType(String remainingChain, RuntimeSearchParam param, String theParamName, String qualifier, Class nextType, String chain, boolean isMeta, String resourceId) { + IQueryParameterType chainValue; + if (remainingChain != null) { + if (param == null || param.getParamType() != RestSearchParameterTypeEnum.REFERENCE) { + ourLog.debug("Type {} parameter {} is not a reference, can not chain {}", nextType.getSimpleName(), chain, remainingChain); + return null; + } + + chainValue = new ReferenceParam(); + chainValue.setValueAsQueryToken(myContext, theParamName, qualifier, resourceId); + ((ReferenceParam) chainValue).setChain(remainingChain); + } else if (isMeta) { + IQueryParameterType type = myMatchUrlService.newInstanceType(chain); + type.setValueAsQueryToken(myContext, theParamName, qualifier, resourceId); + chainValue = type; + } else { + chainValue = toParameterType(param, qualifier, resourceId); + } + + return chainValue; + } + + Subquery createLinkSubquery(boolean theFoundChainMatch, String theChain, String theSubResourceName, List theOrValues, RequestDetails theRequest) { + Subquery subQ = myQueryRoot.subquery(Long.class); + /* + * We're doing a chain call, so push the current query root + * and predicate list down and put new ones at the top of the + * stack and run a subquery + */ + myQueryRoot.push(subQ); + subQ.select(myQueryRoot.get("myId").as(Long.class)); + + List> andOrParams = new ArrayList<>(); + andOrParams.add(theOrValues); + + // Create the subquery predicates + myQueryRoot.addPredicate(myCriteriaBuilder.equal(myQueryRoot.get("myResourceType"), theSubResourceName)); + myQueryRoot.addPredicate(myCriteriaBuilder.isNull(myQueryRoot.get("myDeleted"))); + + if (theFoundChainMatch) { + searchForIdsWithAndOr(theSubResourceName, theChain, andOrParams, theRequest); + subQ.where(myQueryRoot.getPredicateArray()); + } + + /* + * Pop the old query root and predicate list back + */ + myQueryRoot.pop(); + return subQ; + } + + void searchForIdsWithAndOr(String theResourceName, String theParamName, List> theAndOrParams, RequestDetails theRequest) { + + if (theAndOrParams.isEmpty()) { + return; + } + + switch (theParamName) { + case IAnyResource.SP_RES_ID: + myPredicateBuilder.addPredicateResourceId(theAndOrParams, theResourceName, theRequest); + break; + + case IAnyResource.SP_RES_LANGUAGE: + addPredicateLanguage(theAndOrParams, + null); + break; + + case Constants.PARAM_HAS: + addPredicateHas(theResourceName, theAndOrParams, theRequest); + break; + + case Constants.PARAM_TAG: + case Constants.PARAM_PROFILE: + case Constants.PARAM_SECURITY: + myPredicateBuilder.addPredicateTag(theAndOrParams, theParamName); + break; + + case Constants.PARAM_SOURCE: + addPredicateSource(theAndOrParams, theRequest); + break; + + default: + + RuntimeSearchParam nextParamDef = mySearchParamRegistry.getActiveSearchParam(theResourceName, theParamName); + if (nextParamDef != null) { + switch (nextParamDef.getParamType()) { + case DATE: + for (List nextAnd : theAndOrParams) { + myPredicateBuilder.addPredicateDate(theResourceName, theParamName, nextAnd, null); + } + break; + case QUANTITY: + for (List nextAnd : theAndOrParams) { + myPredicateBuilder.addPredicateQuantity(theResourceName, theParamName, nextAnd, null); + } + break; + case REFERENCE: + for (List nextAnd : theAndOrParams) { + addPredicate(theResourceName, theParamName, nextAnd, null, theRequest); + } + break; + case STRING: + for (List nextAnd : theAndOrParams) { + myPredicateBuilder.addPredicateString(theResourceName, theParamName, nextAnd, SearchFilterParser.CompareOperation.sw); + } + break; + case TOKEN: + for (List nextAnd : theAndOrParams) { + if ("Location.position".equals(nextParamDef.getPath())) { + myPredicateBuilder.addPredicateCoords(theResourceName, theParamName, nextAnd); + } else { + myPredicateBuilder.addPredicateToken(theResourceName, theParamName, nextAnd, null); + } + } + break; + case NUMBER: + for (List nextAnd : theAndOrParams) { + myPredicateBuilder.addPredicateNumber(theResourceName, theParamName, nextAnd, null); + } + break; + case COMPOSITE: + for (List nextAnd : theAndOrParams) { + addPredicateComposite(theResourceName, nextParamDef, nextAnd); + } + break; + case URI: + for (List nextAnd : theAndOrParams) { + myPredicateBuilder.addPredicateUri(theResourceName, theParamName, nextAnd, SearchFilterParser.CompareOperation.eq); + } + break; + case HAS: + case SPECIAL: + for (List nextAnd : theAndOrParams) { + if ("Location.position".equals(nextParamDef.getPath())) { + myPredicateBuilder.addPredicateCoords(theResourceName, theParamName, nextAnd); + } + } + break; + } + } else { + if (Constants.PARAM_CONTENT.equals(theParamName) || Constants.PARAM_TEXT.equals(theParamName)) { + // These are handled later + } else if (Constants.PARAM_FILTER.equals(theParamName)) { + // Parse the predicates enumerated in the _filter separated by AND or OR... + if (theAndOrParams.get(0).get(0) instanceof StringParam) { + String filterString = ((StringParam) theAndOrParams.get(0).get(0)).getValue(); + SearchFilterParser.Filter filter; + try { + filter = SearchFilterParser.parse(filterString); + } catch (SearchFilterParser.FilterSyntaxException theE) { + throw new InvalidRequestException("Error parsing _filter syntax: " + theE.getMessage()); + } + if (filter != null) { + + if (!myDaoConfig.isFilterParameterEnabled()) { + throw new InvalidRequestException(Constants.PARAM_FILTER + " parameter is disabled on this server"); + } + + // TODO: we clear the predicates below because the filter builds up + // its own collection of predicates. It'd probably be good at some + // point to do something more fancy... + ArrayList holdPredicates = new ArrayList<>(myQueryRoot.getPredicates()); + + Predicate filterPredicate = processFilter(filter, theResourceName, theRequest); + myQueryRoot.clearPredicates(); + myQueryRoot.addPredicates(holdPredicates); + myQueryRoot.addPredicate(filterPredicate); + } + } + + + } else { + throw new InvalidRequestException("Unknown search parameter " + theParamName + " for resource type " + theResourceName); + } + } + break; + } + } + + private Predicate processFilter(SearchFilterParser.Filter theFilter, + String theResourceName, RequestDetails theRequest) { + + if (theFilter instanceof SearchFilterParser.FilterParameter) { + return processFilterParameter((SearchFilterParser.FilterParameter) theFilter, + theResourceName, theRequest); + } else if (theFilter instanceof SearchFilterParser.FilterLogical) { + // Left side + Predicate xPredicate = processFilter(((SearchFilterParser.FilterLogical) theFilter).getFilter1(), + theResourceName, theRequest); + + // Right side + Predicate yPredicate = processFilter(((SearchFilterParser.FilterLogical) theFilter).getFilter2(), + theResourceName, theRequest); + + if (((SearchFilterParser.FilterLogical) theFilter).getOperation() == SearchFilterParser.FilterLogicalOperation.and) { + return myCriteriaBuilder.and(xPredicate, yPredicate); + } else if (((SearchFilterParser.FilterLogical) theFilter).getOperation() == SearchFilterParser.FilterLogicalOperation.or) { + return myCriteriaBuilder.or(xPredicate, yPredicate); + } + } else if (theFilter instanceof SearchFilterParser.FilterParameterGroup) { + return processFilter(((SearchFilterParser.FilterParameterGroup) theFilter).getContained(), + theResourceName, theRequest); + } + return null; + } + + private Predicate processFilterParameter(SearchFilterParser.FilterParameter theFilter, + String theResourceName, RequestDetails theRequest) { + + RuntimeSearchParam searchParam = mySearchParamRegistry.getActiveSearchParam(theResourceName, theFilter.getParamPath().getName()); + + if (searchParam == null) { + throw new InvalidRequestException("Invalid search parameter specified, " + theFilter.getParamPath().getName() + ", for resource type " + theResourceName); + } else if (searchParam.getName().equals(IAnyResource.SP_RES_ID)) { + if (searchParam.getParamType() == RestSearchParameterTypeEnum.TOKEN) { + TokenParam param = new TokenParam(); + param.setValueAsQueryToken(null, + null, + null, + theFilter.getValue()); + return myPredicateBuilder.addPredicateResourceId(Collections.singletonList(Collections.singletonList(param)), myResourceName, theFilter.getOperation(), theRequest); + } else { + throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search"); + } + } else if (searchParam.getName().equals(IAnyResource.SP_RES_LANGUAGE)) { + if (searchParam.getParamType() == RestSearchParameterTypeEnum.STRING) { + return addPredicateLanguage(Collections.singletonList(Collections.singletonList(new StringParam(theFilter.getValue()))), + theFilter.getOperation()); + } else { + throw new InvalidRequestException("Unexpected search parameter type encountered, expected string type for language search"); + } + } else if (searchParam.getName().equals(Constants.PARAM_SOURCE)) { + if (searchParam.getParamType() == RestSearchParameterTypeEnum.TOKEN) { + TokenParam param = new TokenParam(); + param.setValueAsQueryToken(null, null, null, theFilter.getValue()); + return addPredicateSource(Collections.singletonList(param), theFilter.getOperation(), theRequest); + } else { + throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search"); + } + } else { + RestSearchParameterTypeEnum typeEnum = searchParam.getParamType(); + if (typeEnum == RestSearchParameterTypeEnum.URI) { + return myPredicateBuilder.addPredicateUri(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new UriParam(theFilter.getValue())), theFilter.getOperation()); + } else if (typeEnum == RestSearchParameterTypeEnum.STRING) { + return myPredicateBuilder.addPredicateString(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new StringParam(theFilter.getValue())), theFilter.getOperation()); + } else if (typeEnum == RestSearchParameterTypeEnum.DATE) { + return myPredicateBuilder.addPredicateDate(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new DateParam(theFilter.getValue())), theFilter.getOperation()); + } else if (typeEnum == RestSearchParameterTypeEnum.NUMBER) { + return myPredicateBuilder.addPredicateNumber(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new NumberParam(theFilter.getValue())), theFilter.getOperation()); + } else if (typeEnum == RestSearchParameterTypeEnum.REFERENCE) { + String paramName = theFilter.getParamPath().getName(); + SearchFilterParser.CompareOperation operation = theFilter.getOperation(); + String resourceType = null; // The value can either have (Patient/123) or not have (123) a resource type, either way it's not needed here + String chain = (theFilter.getParamPath().getNext() != null) ? theFilter.getParamPath().getNext().toString() : null; + String value = theFilter.getValue(); + ReferenceParam referenceParam = new ReferenceParam(resourceType, chain, value); + return addPredicate(theResourceName, paramName, Collections.singletonList(referenceParam), operation, theRequest); + } else if (typeEnum == RestSearchParameterTypeEnum.QUANTITY) { + return myPredicateBuilder.addPredicateQuantity(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new QuantityParam(theFilter.getValue())), theFilter.getOperation()); + } else if (typeEnum == RestSearchParameterTypeEnum.COMPOSITE) { + throw new InvalidRequestException("Composite search parameters not currently supported with _filter clauses"); + } else if (typeEnum == RestSearchParameterTypeEnum.TOKEN) { + TokenParam param = new TokenParam(); + param.setValueAsQueryToken(null, + null, + null, + theFilter.getValue()); + return myPredicateBuilder.addPredicateToken(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(param), theFilter.getOperation()); + } + } + return null; + } + + private IQueryParameterType toParameterType(RuntimeSearchParam theParam) { + IQueryParameterType qp; + switch (theParam.getParamType()) { + case DATE: + qp = new DateParam(); + break; + case NUMBER: + qp = new NumberParam(); + break; + case QUANTITY: + qp = new QuantityParam(); + break; + case STRING: + qp = new StringParam(); + break; + case TOKEN: + qp = new TokenParam(); + break; + case COMPOSITE: + List compositeOf = theParam.getCompositeOf(); + if (compositeOf.size() != 2) { + throw new InternalErrorException("Parameter " + theParam.getName() + " has " + compositeOf.size() + " composite parts. Don't know how handlt this."); + } + IQueryParameterType leftParam = toParameterType(compositeOf.get(0)); + IQueryParameterType rightParam = toParameterType(compositeOf.get(1)); + qp = new CompositeParam<>(leftParam, rightParam); + break; + case REFERENCE: + qp = new ReferenceParam(); + break; + case SPECIAL: + if ("Location.position".equals(theParam.getPath())) { + qp = new SpecialParam(); + break; + } + case URI: + case HAS: + default: + throw new InternalErrorException("Don't know how to convert param type: " + theParam.getParamType()); + } + return qp; + } + + private IQueryParameterType toParameterType(RuntimeSearchParam theParam, String theQualifier, String theValueAsQueryToken) { + IQueryParameterType qp = toParameterType(theParam); + + qp.setValueAsQueryToken(myContext, theParam.getName(), theQualifier, theValueAsQueryToken); + return qp; + } + + private Predicate addPredicateLanguage(List> theList, + SearchFilterParser.CompareOperation operation) { + for (List nextList : theList) { + + Set values = new HashSet<>(); + for (IQueryParameterType next : nextList) { + if (next instanceof StringParam) { + String nextValue = ((StringParam) next).getValue(); + if (isBlank(nextValue)) { + continue; + } + values.add(nextValue); + } else { + throw new InternalErrorException("Language parameter must be of type " + StringParam.class.getCanonicalName() + " - Got " + next.getClass().getCanonicalName()); + } + } + + if (values.isEmpty()) { + continue; + } + + Predicate predicate = null; + if ((operation == null) || + (operation == SearchFilterParser.CompareOperation.eq)) { + predicate = myQueryRoot.get("myLanguage").as(String.class).in(values); + } else if (operation == SearchFilterParser.CompareOperation.ne) { + predicate = myQueryRoot.get("myLanguage").as(String.class).in(values).not(); + } else { + throw new InvalidRequestException("Unsupported operator specified in language query, only \"eq\" and \"ne\" are supported"); + } + myQueryRoot.addPredicate(predicate); + if (operation != null) { + return predicate; + } + } + + return null; + } + + private void addPredicateSource(List> theAndOrParams, RequestDetails theRequest) { + for (List nextAnd : theAndOrParams) { + addPredicateSource(nextAnd, SearchFilterParser.CompareOperation.eq, theRequest); + } + } + + private Predicate addPredicateSource(List theList, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { + if (myDaoConfig.getStoreMetaSourceInformation() == DaoConfig.StoreMetaSourceInformationEnum.NONE) { + String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "sourceParamDisabled"); + throw new InvalidRequestException(msg); + } + + Join join = myQueryRoot.join("myProvenance", JoinType.LEFT); + + List codePredicates = new ArrayList<>(); + + for (IQueryParameterType nextParameter : theList) { + SourceParam sourceParameter = new SourceParam(nextParameter.getValueAsQueryToken(myContext)); + String sourceUri = sourceParameter.getSourceUri(); + String requestId = sourceParameter.getRequestId(); + Predicate sourceUriPredicate = myCriteriaBuilder.equal(join.get("mySourceUri"), sourceUri); + Predicate requestIdPredicate = myCriteriaBuilder.equal(join.get("myRequestId"), requestId); + if (isNotBlank(sourceUri) && isNotBlank(requestId)) { + codePredicates.add(myCriteriaBuilder.and(sourceUriPredicate, requestIdPredicate)); + } else if (isNotBlank(sourceUri)) { + codePredicates.add(sourceUriPredicate); + } else if (isNotBlank(requestId)) { + codePredicates.add(requestIdPredicate); + } + } + + Predicate retVal = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(retVal); + return retVal; + } + + private void addPredicateHas(String theResourceType, List> theHasParameters, RequestDetails theRequest) { + + for (List nextOrList : theHasParameters) { + + String targetResourceType = null; + String paramReference = null; + String parameterName = null; + + String paramName = null; + List parameters = new ArrayList<>(); + for (IQueryParameterType nextParam : nextOrList) { + HasParam next = (HasParam) nextParam; + targetResourceType = next.getTargetResourceType(); + paramReference = next.getReferenceFieldName(); + parameterName = next.getParameterName(); + paramName = parameterName.replaceAll("\\..*", ""); + parameters.add(QualifiedParamList.singleton(null, next.getValueAsQueryToken(myContext))); + } + + if (paramName == null) { + continue; + } + + RuntimeResourceDefinition targetResourceDefinition; + try { + targetResourceDefinition = myContext.getResourceDefinition(targetResourceType); + } catch (DataFormatException e) { + throw new InvalidRequestException("Invalid resource type: " + targetResourceType); + } + + assert parameterName != null; + + //Ensure that the name of the search param + // (e.g. the `code` in Patient?_has:Observation:subject:code=sys|val) + // exists on the target resource type. + RuntimeSearchParam owningParameterDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramName); + if (owningParameterDef == null) { + throw new InvalidRequestException("Unknown parameter name: " + targetResourceType + ':' + parameterName); + } + + //Ensure that the name of the back-referenced search param on the target (e.g. the `subject` in Patient?_has:Observation:subject:code=sys|val) + //exists on the target resource. + owningParameterDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramReference); + if (owningParameterDef == null) { + throw new InvalidRequestException("Unknown parameter name: " + targetResourceType + ':' + paramReference); + } + + RuntimeSearchParam paramDef = mySearchParamRegistry.getSearchParamByName(targetResourceDefinition, paramName); + + IQueryParameterAnd> parsedParam = (IQueryParameterAnd>) ParameterUtil.parseQueryParams(myContext, paramDef, paramName, parameters); + + ArrayList orValues = Lists.newArrayList(); + + for (IQueryParameterOr next : parsedParam.getValuesAsQueryTokens()) { + orValues.addAll(next.getValuesAsQueryTokens()); + } + //Handle internal chain inside the has. + if (parameterName.contains(".")) { + String chainedPartOfParameter = getChainedPart(parameterName); + orValues.stream() + .filter(qp -> qp instanceof ReferenceParam) + .map(qp -> (ReferenceParam)qp) + .forEach(rp -> rp.setChain(getChainedPart(chainedPartOfParameter))); + } + + Subquery subQ = myPredicateBuilder.createLinkSubquery(paramName, targetResourceType, orValues, theRequest); + Join join = myQueryRoot.join("myResourceLinksAsTarget", JoinType.LEFT); + + Predicate pathPredicate = myPredicateBuilder.createResourceLinkPathPredicate(targetResourceType, paramReference, join); + Predicate sourceTypePredicate = myCriteriaBuilder.equal(join.get("myTargetResourceType"), theResourceType); + Predicate sourcePidPredicate = join.get("mySourceResourcePid").in(subQ); + Predicate andPredicate = myCriteriaBuilder.and(pathPredicate, sourcePidPredicate, sourceTypePredicate); + myQueryRoot.addPredicate(andPredicate); + } + } + + private String getChainedPart(String parameter) { + return parameter.substring(parameter.indexOf(".") + 1); + } + + private void addPredicateComposite(String theResourceName, RuntimeSearchParam theParamDef, List theNextAnd) { + // TODO: fail if missing is set for a composite query + + IQueryParameterType or = theNextAnd.get(0); + if (!(or instanceof CompositeParam)) { + throw new InvalidRequestException("Invalid type for composite param (must be " + CompositeParam.class.getSimpleName() + ": " + or.getClass()); + } + CompositeParam cp = (CompositeParam) or; + + RuntimeSearchParam left = theParamDef.getCompositeOf().get(0); + IQueryParameterType leftValue = cp.getLeftValue(); + myQueryRoot.addPredicate(createCompositeParamPart(theResourceName, myQueryRoot.getRoot(), left, leftValue)); + + RuntimeSearchParam right = theParamDef.getCompositeOf().get(1); + IQueryParameterType rightValue = cp.getRightValue(); + myQueryRoot.addPredicate(createCompositeParamPart(theResourceName, myQueryRoot.getRoot(), right, rightValue)); + + } + + private Predicate createCompositeParamPart(String theResourceName, Root theRoot, RuntimeSearchParam theParam, IQueryParameterType leftValue) { + Predicate retVal = null; + switch (theParam.getParamType()) { + case STRING: { + From stringJoin = theRoot.join("myParamsString", JoinType.INNER); + retVal = myPredicateBuilder.createPredicateString(leftValue, theResourceName, theParam.getName(), myCriteriaBuilder, stringJoin); + break; + } + case TOKEN: { + From tokenJoin = theRoot.join("myParamsToken", JoinType.INNER); + List tokens = Collections.singletonList(leftValue); + Collection tokenPredicates = myPredicateBuilder.createPredicateToken(tokens, theResourceName, theParam.getName(), myCriteriaBuilder, tokenJoin); + retVal = myCriteriaBuilder.and(tokenPredicates.toArray(new Predicate[0])); + break; + } + case DATE: { + From dateJoin = theRoot.join("myParamsDate", JoinType.INNER); + retVal = myPredicateBuilder.createPredicateDate(leftValue, theResourceName, theParam.getName(), myCriteriaBuilder, dateJoin); + break; + } + case QUANTITY: { + From dateJoin = theRoot.join("myParamsQuantity", JoinType.INNER); + retVal = myPredicateBuilder.createPredicateQuantity(leftValue, theResourceName, theParam.getName(), myCriteriaBuilder, dateJoin); + break; + } + case COMPOSITE: + case HAS: + case NUMBER: + case REFERENCE: + case URI: + case SPECIAL: + break; + } + + if (retVal == null) { + throw new InvalidRequestException("Don't know how to handle composite parameter with type of " + theParam.getParamType()); + } + + return retVal; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderResourceId.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderResourceId.java new file mode 100644 index 00000000000..137b86cfd18 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderResourceId.java @@ -0,0 +1,137 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import org.hl7.fhir.r4.model.IdType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.annotation.Nullable; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Component +@Scope("prototype") +class PredicateBuilderResourceId extends BasePredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderResourceId.class); + + @Autowired + IdHelperService myIdHelperService; + + PredicateBuilderResourceId(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Nullable + Predicate addPredicateResourceId(List> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) { + + Predicate nextPredicate = createPredicate(myQueryRoot.getRoot(), theResourceName, theValues, theOperation); + + if (nextPredicate != null) { + myQueryRoot.addPredicate(nextPredicate); + return nextPredicate; + } + + return null; + } + + @Nullable + private Predicate createPredicate(Root theRoot, String theResourceName, List> theValues, SearchFilterParser.CompareOperation theOperation) { + Predicate nextPredicate = null; + + Set allOrPids = null; + + for (List nextValue : theValues) { + Set orPids = new HashSet<>(); + boolean haveValue = false; + for (IQueryParameterType next : nextValue) { + String value = next.getValueAsQueryToken(myContext); + if (value != null && value.startsWith("|")) { + value = value.substring(1); + } + + IdType valueAsId = new IdType(value); + if (isNotBlank(value)) { + haveValue = true; + try { + ResourcePersistentId pid = myIdHelperService.resolveResourcePersistentIds(theResourceName, valueAsId.getIdPart()); + orPids.add(pid); + } catch (ResourceNotFoundException e) { + // This is not an error in a search, it just results in no matchesFhirResourceDaoR4InterceptorTest + ourLog.debug("Resource ID {} was requested but does not exist", valueAsId.getIdPart()); + } + } + } + if (haveValue) { + if (allOrPids == null) { + allOrPids = orPids; + } else { + allOrPids.retainAll(orPids); + } + + } + } + + if (allOrPids != null && allOrPids.isEmpty()) { + + // This will never match + nextPredicate = myCriteriaBuilder.equal(theRoot.get("myId").as(Long.class), -1); + + } else if (allOrPids != null) { + + SearchFilterParser.CompareOperation operation = defaultIfNull(theOperation, SearchFilterParser.CompareOperation.eq); + assert operation == SearchFilterParser.CompareOperation.eq || operation == SearchFilterParser.CompareOperation.ne; + List codePredicates = new ArrayList<>(); + switch (operation) { + default: + case eq: + codePredicates.add(theRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(allOrPids))); + nextPredicate = myCriteriaBuilder.and(toArray(codePredicates)); + break; + case ne: + codePredicates.add(theRoot.get("myId").as(Long.class).in(ResourcePersistentId.toLongList(allOrPids)).not()); + nextPredicate = myCriteriaBuilder.and(toArray(codePredicates)); + break; + } + + } + + return nextPredicate; + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderString.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderString.java new file mode 100644 index 00000000000..221db21ae11 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderString.java @@ -0,0 +1,221 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.util.StringNormalizer; +import ca.uhn.fhir.model.api.IPrimitiveDatatype; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.From; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import java.util.ArrayList; +import java.util.List; + +@Component +@Scope("prototype") +class PredicateBuilderString extends BasePredicateBuilder implements IPredicateBuilder { + @Autowired + DaoConfig myDaoConfig; + + PredicateBuilderString(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + Join join = createJoin(SearchBuilderJoinEnum.STRING, theParamName); + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList<>(); + for (IQueryParameterType nextOr : theList) { + IQueryParameterType theParameter = nextOr; + Predicate singleCode = createPredicateString(theParameter, + theResourceName, + theParamName, + myCriteriaBuilder, + join, + operation); + codePredicates.add(singleCode); + } + + Predicate retVal = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(retVal); + return retVal; + } + + public Predicate createPredicateString(IQueryParameterType theParameter, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom) { + return createPredicateString(theParameter, + theResourceName, + theParamName, + theBuilder, + theFrom, + null); + } + + private Predicate createPredicateString(IQueryParameterType theParameter, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom, + SearchFilterParser.CompareOperation operation) { + String rawSearchTerm; + if (theParameter instanceof TokenParam) { + TokenParam id = (TokenParam) theParameter; + if (!id.isText()) { + throw new IllegalStateException("Trying to process a text search on a non-text token parameter"); + } + rawSearchTerm = id.getValue(); + } else if (theParameter instanceof StringParam) { + StringParam id = (StringParam) theParameter; + rawSearchTerm = id.getValue(); + if (id.isContains()) { + if (!myDaoConfig.isAllowContainsSearches()) { + throw new MethodNotAllowedException(":contains modifier is disabled on this server"); + } + } + } else if (theParameter instanceof IPrimitiveDatatype) { + IPrimitiveDatatype id = (IPrimitiveDatatype) theParameter; + rawSearchTerm = id.getValueAsString(); + } else { + throw new IllegalArgumentException("Invalid token type: " + theParameter.getClass()); + } + + if (rawSearchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) { + throw new InvalidRequestException("Parameter[" + theParamName + "] has length (" + rawSearchTerm.length() + ") that is longer than maximum allowed (" + + ResourceIndexedSearchParamString.MAX_LENGTH + "): " + rawSearchTerm); + } + + if (myDontUseHashesForSearch) { + String likeExpression = StringNormalizer.normalizeString(rawSearchTerm); + if (myDaoConfig.isAllowContainsSearches()) { + if (theParameter instanceof StringParam) { + if (((StringParam) theParameter).isContains()) { + likeExpression = createLeftAndRightMatchLikeExpression(likeExpression); + } else { + likeExpression = createLeftMatchLikeExpression(likeExpression); + } + } else { + likeExpression = createLeftMatchLikeExpression(likeExpression); + } + } else { + likeExpression = createLeftMatchLikeExpression(likeExpression); + } + + Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); + if (theParameter instanceof StringParam && ((StringParam) theParameter).isExact()) { + Predicate exactCode = theBuilder.equal(theFrom.get("myValueExact"), rawSearchTerm); + singleCode = theBuilder.and(singleCode, exactCode); + } + + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } + boolean exactMatch = theParameter instanceof StringParam && ((StringParam) theParameter).isExact(); + if (exactMatch) { + // Exact match + Long hash = ResourceIndexedSearchParamString.calculateHashExact(theResourceName, theParamName, rawSearchTerm); + return theBuilder.equal(theFrom.get("myHashExact").as(Long.class), hash); + } else { + // Normalized Match + String normalizedString = StringNormalizer.normalizeString(rawSearchTerm); + String likeExpression; + if ((theParameter instanceof StringParam) && + (((((StringParam) theParameter).isContains()) && + (myDaoConfig.isAllowContainsSearches())) || + (operation == SearchFilterParser.CompareOperation.co))) { + likeExpression = createLeftAndRightMatchLikeExpression(normalizedString); + } else if ((operation != SearchFilterParser.CompareOperation.ne) && + (operation != SearchFilterParser.CompareOperation.gt) && + (operation != SearchFilterParser.CompareOperation.lt) && + (operation != SearchFilterParser.CompareOperation.ge) && + (operation != SearchFilterParser.CompareOperation.le)) { + if (operation == SearchFilterParser.CompareOperation.ew) { + likeExpression = createRightMatchLikeExpression(normalizedString); + } else { + likeExpression = createLeftMatchLikeExpression(normalizedString); + } + } else { + likeExpression = normalizedString; + } + + Predicate predicate; + if ((operation == null) || + (operation == SearchFilterParser.CompareOperation.sw)) { + Long hash = ResourceIndexedSearchParamString.calculateHashNormalized(myDaoConfig.getModelConfig(), theResourceName, theParamName, normalizedString); + Predicate hashCode = theBuilder.equal(theFrom.get("myHashNormalizedPrefix").as(Long.class), hash); + Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = theBuilder.and(hashCode, singleCode); + } else if ((operation == SearchFilterParser.CompareOperation.ew) || + (operation == SearchFilterParser.CompareOperation.co)) { + Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.eq) { + Long hash = ResourceIndexedSearchParamString.calculateHashNormalized(myDaoConfig.getModelConfig(), theResourceName, theParamName, normalizedString); + Predicate hashCode = theBuilder.equal(theFrom.get("myHashNormalizedPrefix").as(Long.class), hash); + Predicate singleCode = theBuilder.like(theFrom.get("myValueNormalized").as(String.class), normalizedString); + predicate = theBuilder.and(hashCode, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.ne) { + Predicate singleCode = theBuilder.notEqual(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.gt) { + Predicate singleCode = theBuilder.greaterThan(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.lt) { + Predicate singleCode = theBuilder.lessThan(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.ge) { + Predicate singleCode = theBuilder.greaterThanOrEqualTo(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else if (operation == SearchFilterParser.CompareOperation.le) { + Predicate singleCode = theBuilder.lessThanOrEqualTo(theFrom.get("myValueNormalized").as(String.class), likeExpression); + predicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, singleCode); + } else { + throw new IllegalArgumentException("Don't yet know how to handle operation " + operation + " on a string"); + } + + return predicate; + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderTag.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderTag.java new file mode 100644 index 00000000000..f5f4e0a4700 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderTag.java @@ -0,0 +1,183 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.entity.ResourceTag; +import ca.uhn.fhir.jpa.model.entity.TagDefinition; +import ca.uhn.fhir.jpa.model.entity.TagTypeEnum; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.param.TokenParamModifier; +import ca.uhn.fhir.rest.param.UriParam; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.tuple.Pair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.*; +import java.util.List; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Component +@Scope("prototype") +class PredicateBuilderTag extends BasePredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderTag.class); + + PredicateBuilderTag(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + void addPredicateTag(List> theList, String theParamName) { + TagTypeEnum tagType; + if (Constants.PARAM_TAG.equals(theParamName)) { + tagType = TagTypeEnum.TAG; + } else if (Constants.PARAM_PROFILE.equals(theParamName)) { + tagType = TagTypeEnum.PROFILE; + } else if (Constants.PARAM_SECURITY.equals(theParamName)) { + tagType = TagTypeEnum.SECURITY_LABEL; + } else { + throw new IllegalArgumentException("Param name: " + theParamName); // shouldn't happen + } + + List> notTags = Lists.newArrayList(); + for (List nextAndParams : theList) { + for (IQueryParameterType nextOrParams : nextAndParams) { + if (nextOrParams instanceof TokenParam) { + TokenParam param = (TokenParam) nextOrParams; + if (param.getModifier() == TokenParamModifier.NOT) { + if (isNotBlank(param.getSystem()) || isNotBlank(param.getValue())) { + notTags.add(Pair.of(param.getSystem(), param.getValue())); + } + } + } + } + } + + for (List nextAndParams : theList) { + boolean haveTags = false; + for (IQueryParameterType nextParamUncasted : nextAndParams) { + if (nextParamUncasted instanceof TokenParam) { + TokenParam nextParam = (TokenParam) nextParamUncasted; + if (isNotBlank(nextParam.getValue())) { + haveTags = true; + } else if (isNotBlank(nextParam.getSystem())) { + throw new InvalidRequestException("Invalid " + theParamName + " parameter (must supply a value/code and not just a system): " + nextParam.getValueAsQueryToken(myContext)); + } + } else { + UriParam nextParam = (UriParam) nextParamUncasted; + if (isNotBlank(nextParam.getValue())) { + haveTags = true; + } + } + } + if (!haveTags) { + continue; + } + + boolean paramInverted = false; + List> tokens = Lists.newArrayList(); + for (IQueryParameterType nextOrParams : nextAndParams) { + String code; + String system; + if (nextOrParams instanceof TokenParam) { + TokenParam nextParam = (TokenParam) nextOrParams; + code = nextParam.getValue(); + system = nextParam.getSystem(); + if (nextParam.getModifier() == TokenParamModifier.NOT) { + paramInverted = true; + } + } else { + UriParam nextParam = (UriParam) nextOrParams; + code = nextParam.getValue(); + system = null; + } + + if (isNotBlank(code)) { + tokens.add(Pair.of(system, code)); + } + } + + if (tokens.isEmpty()) { + continue; + } + + if (paramInverted) { + ourLog.debug("Searching for _tag:not"); + + Subquery subQ = myQueryRoot.subquery(Long.class); + Root subQfrom = subQ.from(ResourceTag.class); + subQ.select(subQfrom.get("myResourceId").as(Long.class)); + + myQueryRoot.addPredicate( + myCriteriaBuilder.not( + myCriteriaBuilder.in( + myQueryRoot.get("myId") + ).value(subQ) + ) + ); + + Subquery defJoin = subQ.subquery(Long.class); + Root defJoinFrom = defJoin.from(TagDefinition.class); + defJoin.select(defJoinFrom.get("myId").as(Long.class)); + + subQ.where(subQfrom.get("myTagId").as(Long.class).in(defJoin)); + + Predicate tagListPredicate = createPredicateTagList(defJoinFrom, myCriteriaBuilder, tagType, tokens); + defJoin.where(tagListPredicate); + + continue; + } + + Join tagJoin = myQueryRoot.join("myTags", JoinType.LEFT); + From defJoin = tagJoin.join("myTag"); + + Predicate tagListPredicate = createPredicateTagList(defJoin, myCriteriaBuilder, tagType, tokens); + myQueryRoot.addPredicate(tagListPredicate); + + } + + } + + private Predicate createPredicateTagList(Path theDefJoin, CriteriaBuilder theBuilder, TagTypeEnum theTagType, List> theTokens) { + Predicate typePredicate = theBuilder.equal(theDefJoin.get("myTagType"), theTagType); + + List orPredicates = Lists.newArrayList(); + for (Pair next : theTokens) { + Predicate codePredicate = theBuilder.equal(theDefJoin.get("myCode"), next.getRight()); + if (isNotBlank(next.getLeft())) { + Predicate systemPredicate = theBuilder.equal(theDefJoin.get("mySystem"), next.getLeft()); + orPredicates.add(theBuilder.and(typePredicate, systemPredicate, codePredicate)); + } else { + orPredicates.add(theBuilder.and(typePredicate, codePredicate)); + } + } + + return theBuilder.or(toArray(orPredicates)); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java new file mode 100644 index 00000000000..5ba6374c4ae --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderToken.java @@ -0,0 +1,352 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.BaseRuntimeChildDefinition; +import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.context.RuntimeSearchParam; +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; +import ca.uhn.fhir.util.VersionIndependentConcept; +import ca.uhn.fhir.jpa.term.api.ITermReadSvc; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; +import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; +import ca.uhn.fhir.rest.param.NumberParam; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.param.TokenParamModifier; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import com.google.common.collect.Sets; +import org.hibernate.query.criteria.internal.CriteriaBuilderImpl; +import org.hibernate.query.criteria.internal.predicate.BooleanStaticAssertionPredicate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.*; +import java.util.*; +import java.util.stream.Collectors; + +import static org.apache.commons.lang3.StringUtils.*; + +@Component +@Scope("prototype") +class PredicateBuilderToken extends BasePredicateBuilder implements IPredicateBuilder { + @Autowired + private ITermReadSvc myTerminologySvc; + @Autowired + private ISearchParamRegistry mySearchParamRegistry; + private final PredicateBuilder myPredicateBuilder; + + PredicateBuilderToken(SearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder) { + super(theSearchBuilder); + myPredicateBuilder = thePredicateBuilder; + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + if (theList.get(0).getMissing() != null) { + Join join = createJoin(SearchBuilderJoinEnum.TOKEN, theParamName); + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList<>(); + List tokens = new ArrayList<>(); + for (IQueryParameterType nextOr : theList) { + + if (nextOr instanceof TokenParam) { + TokenParam id = (TokenParam) nextOr; + if (id.isText()) { + myPredicateBuilder.addPredicateString(theResourceName, theParamName, theList); + break; + } + } + + tokens.add(nextOr); + } + + if (tokens.isEmpty()) { + return null; + } + + Join join = createJoin(SearchBuilderJoinEnum.TOKEN, theParamName); + Collection singleCode = createPredicateToken(tokens, theResourceName, theParamName, myCriteriaBuilder, join, operation); + assert singleCode != null; + codePredicates.addAll(singleCode); + + Predicate spPredicate = myCriteriaBuilder.or(toArray(codePredicates)); + myQueryRoot.addPredicate(spPredicate); + return spPredicate; + } + + public Collection createPredicateToken(Collection theParameters, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom) { + return createPredicateToken( + theParameters, + theResourceName, + theParamName, + theBuilder, + theFrom, + null); + } + + private Collection createPredicateToken(Collection theParameters, + String theResourceName, + String theParamName, + CriteriaBuilder theBuilder, + From theFrom, + SearchFilterParser.CompareOperation operation) { + final List codes = new ArrayList<>(); + + TokenParamModifier modifier = null; + for (IQueryParameterType nextParameter : theParameters) { + + String code; + String system; + if (nextParameter instanceof TokenParam) { + TokenParam id = (TokenParam) nextParameter; + system = id.getSystem(); + code = (id.getValue()); + modifier = id.getModifier(); + } else if (nextParameter instanceof BaseIdentifierDt) { + BaseIdentifierDt id = (BaseIdentifierDt) nextParameter; + system = id.getSystemElement().getValueAsString(); + code = (id.getValueElement().getValue()); + } else if (nextParameter instanceof BaseCodingDt) { + BaseCodingDt id = (BaseCodingDt) nextParameter; + system = id.getSystemElement().getValueAsString(); + code = (id.getCodeElement().getValue()); + } else if (nextParameter instanceof NumberParam) { + NumberParam number = (NumberParam) nextParameter; + system = null; + code = number.getValueAsQueryToken(myContext); + } else { + throw new IllegalArgumentException("Invalid token type: " + nextParameter.getClass()); + } + + if (system != null && system.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { + throw new InvalidRequestException( + "Parameter[" + theParamName + "] has system (" + system.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + system); + } + + if (code != null && code.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { + throw new InvalidRequestException( + "Parameter[" + theParamName + "] has code (" + code.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + code); + } + + /* + * Process token modifiers (:in, :below, :above) + */ + + if (modifier == TokenParamModifier.IN) { + codes.addAll(myTerminologySvc.expandValueSet(null, code)); + } else if (modifier == TokenParamModifier.ABOVE) { + system = determineSystemIfMissing(theParamName, code, system); + validateHaveSystemAndCodeForToken(theParamName, code, system); + codes.addAll(myTerminologySvc.findCodesAbove(system, code)); + } else if (modifier == TokenParamModifier.BELOW) { + system = determineSystemIfMissing(theParamName, code, system); + validateHaveSystemAndCodeForToken(theParamName, code, system); + codes.addAll(myTerminologySvc.findCodesBelow(system, code)); + } else { + codes.add(new VersionIndependentConcept(system, code)); + } + + } + + List sortedCodesList = codes + .stream() + .filter(t -> t.getCode() != null || t.getSystem() != null) + .sorted() + .distinct() + .collect(Collectors.toList()); + + if (codes.isEmpty()) { + // This will never match anything + return Collections.singletonList(new BooleanStaticAssertionPredicate((CriteriaBuilderImpl) theBuilder, false)); + } + + List retVal = new ArrayList<>(); + + // System only + List systemOnlyCodes = sortedCodesList.stream().filter(t -> isBlank(t.getCode())).collect(Collectors.toList()); + if (!systemOnlyCodes.isEmpty()) { + retVal.add(addPredicate(theResourceName, theParamName, theBuilder, theFrom, systemOnlyCodes, modifier, SearchBuilderTokenModeEnum.SYSTEM_ONLY)); + } + + // Code only + List codeOnlyCodes = sortedCodesList.stream().filter(t -> t.getSystem() == null).collect(Collectors.toList()); + if (!codeOnlyCodes.isEmpty()) { + retVal.add(addPredicate(theResourceName, theParamName, theBuilder, theFrom, codeOnlyCodes, modifier, SearchBuilderTokenModeEnum.VALUE_ONLY)); + } + + // System and code + List systemAndCodeCodes = sortedCodesList.stream().filter(t -> isNotBlank(t.getCode()) && t.getSystem() != null).collect(Collectors.toList()); + if (!systemAndCodeCodes.isEmpty()) { + retVal.add(addPredicate(theResourceName, theParamName, theBuilder, theFrom, systemAndCodeCodes, modifier, SearchBuilderTokenModeEnum.SYSTEM_AND_VALUE)); + } + + return retVal; + } + + private String determineSystemIfMissing(String theParamName, String code, String theSystem) { + String retVal = theSystem; + if (retVal == null) { + RuntimeResourceDefinition resourceDef = myContext.getResourceDefinition(myResourceName); + RuntimeSearchParam param = mySearchParamRegistry.getSearchParamByName(resourceDef, theParamName); + if (param != null) { + Set valueSetUris = Sets.newHashSet(); + for (String nextPath : param.getPathsSplit()) { + BaseRuntimeChildDefinition def = myContext.newTerser().getDefinition(myResourceType, nextPath); + if (def instanceof BaseRuntimeDeclaredChildDefinition) { + String valueSet = ((BaseRuntimeDeclaredChildDefinition) def).getBindingValueSet(); + if (isNotBlank(valueSet)) { + valueSetUris.add(valueSet); + } + } + } + if (valueSetUris.size() == 1) { + String valueSet = valueSetUris.iterator().next(); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setFailOnMissingCodeSystem(false); + List candidateCodes = myTerminologySvc.expandValueSet(options, valueSet); + for (VersionIndependentConcept nextCandidate : candidateCodes) { + if (nextCandidate.getCode().equals(code)) { + retVal = nextCandidate.getSystem(); + break; + } + } + } + } + } + return retVal; + } + + private void validateHaveSystemAndCodeForToken(String theParamName, String theCode, String theSystem) { + String systemDesc = defaultIfBlank(theSystem, "(missing)"); + String codeDesc = defaultIfBlank(theCode, "(missing)"); + if (isBlank(theCode)) { + String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "invalidCodeMissingSystem", theParamName, systemDesc, codeDesc); + throw new InvalidRequestException(msg); + } + if (isBlank(theSystem)) { + String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, "invalidCodeMissingCode", theParamName, systemDesc, codeDesc); + throw new InvalidRequestException(msg); + } + } + + private Predicate addPredicate(String theResourceName, String theParamName, CriteriaBuilder theBuilder, From theFrom, List theTokens, TokenParamModifier theModifier, SearchBuilderTokenModeEnum theTokenMode) { + if (myDontUseHashesForSearch) { + final Path systemExpression = theFrom.get("mySystem"); + final Path valueExpression = theFrom.get("myValue"); + + List orPredicates = new ArrayList<>(); + switch (theTokenMode) { + case SYSTEM_ONLY: { + List systems = theTokens.stream().map(t -> t.getSystem()).collect(Collectors.toList()); + Predicate orPredicate = systemExpression.in(systems); + orPredicates.add(orPredicate); + break; + } + case VALUE_ONLY: + List codes = theTokens.stream().map(t -> t.getCode()).collect(Collectors.toList()); + Predicate orPredicate = valueExpression.in(codes); + orPredicates.add(orPredicate); + break; + case SYSTEM_AND_VALUE: + for (VersionIndependentConcept next : theTokens) { + orPredicates.add(theBuilder.and( + toEqualOrIsNullPredicate(systemExpression, next.getSystem()), + toEqualOrIsNullPredicate(valueExpression, next.getCode()) + )); + } + break; + } + + Predicate or = theBuilder.or(orPredicates.toArray(new Predicate[0])); + if (theModifier == TokenParamModifier.NOT) { + or = theBuilder.not(or); + } + + return combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, theFrom, or); + } + + /* + * Note: A null system value means "match any system", but + * an empty-string system value means "match values that + * explicitly have no system". + */ + Expression hashField; + List values; + switch (theTokenMode) { + case SYSTEM_ONLY: + hashField = theFrom.get("myHashSystem").as(Long.class); + values = theTokens + .stream() + .map(t -> ResourceIndexedSearchParamToken.calculateHashSystem(theResourceName, theParamName, t.getSystem())) + .collect(Collectors.toList()); + break; + case VALUE_ONLY: + hashField = theFrom.get("myHashValue").as(Long.class); + values = theTokens + .stream() + .map(t -> ResourceIndexedSearchParamToken.calculateHashValue(theResourceName, theParamName, t.getCode())) + .collect(Collectors.toList()); + break; + case SYSTEM_AND_VALUE: + default: + hashField = theFrom.get("myHashSystemAndValue").as(Long.class); + values = theTokens + .stream() + .map(t -> ResourceIndexedSearchParamToken.calculateHashSystemAndValue(theResourceName, theParamName, t.getSystem(), t.getCode())) + .collect(Collectors.toList()); + break; + } + + Predicate predicate = hashField.in(values); + if (theModifier == TokenParamModifier.NOT) { + Predicate identityPredicate = theBuilder.equal(theFrom.get("myHashIdentity").as(Long.class), BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName)); + Predicate disjunctionPredicate = theBuilder.not(predicate); + predicate = theBuilder.and(identityPredicate, disjunctionPredicate); + } + return predicate; + } + + private Expression toEqualOrIsNullPredicate(Path theExpression, T theCode) { + if (theCode == null) { + return myCriteriaBuilder.isNull(theExpression); + } + return myCriteriaBuilder.equal(theExpression, theCode); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderUri.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderUri.java new file mode 100644 index 00000000000..cb94fa7fe2e --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderUri.java @@ -0,0 +1,181 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.dao.data.IResourceIndexedSearchParamUriDao; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.UriParam; +import ca.uhn.fhir.rest.param.UriParamQualifierEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +@Component +@Scope("prototype") +class PredicateBuilderUri extends BasePredicateBuilder implements IPredicateBuilder { + private static final Logger ourLog = LoggerFactory.getLogger(PredicateBuilderUri.class); + @Autowired + private IResourceIndexedSearchParamUriDao myResourceIndexedSearchParamUriDao; + + PredicateBuilderUri(SearchBuilder theSearchBuilder) { + super(theSearchBuilder); + } + + @Override + public Predicate addPredicate(String theResourceName, + String theParamName, + List theList, + SearchFilterParser.CompareOperation operation) { + + Join join = createJoin(SearchBuilderJoinEnum.URI, theParamName); + + if (theList.get(0).getMissing() != null) { + addPredicateParamMissing(theResourceName, theParamName, theList.get(0).getMissing(), join); + return null; + } + + List codePredicates = new ArrayList<>(); + for (IQueryParameterType nextOr : theList) { + + if (nextOr instanceof UriParam) { + UriParam param = (UriParam) nextOr; + + String value = param.getValue(); + if (value == null) { + continue; + } + + if (param.getQualifier() == UriParamQualifierEnum.ABOVE) { + + /* + * :above is an inefficient query- It means that the user is supplying a more specific URL (say + * http://example.com/foo/bar/baz) and that we should match on any URLs that are less + * specific but otherwise the same. For example http://example.com and http://example.com/foo would both + * match. + * + * We do this by querying the DB for all candidate URIs and then manually checking each one. This isn't + * very efficient, but this is also probably not a very common type of query to do. + * + * If we ever need to make this more efficient, lucene could certainly be used as an optimization. + */ + ourLog.info("Searching for candidate URI:above parameters for Resource[{}] param[{}]", myResourceName, theParamName); + Collection candidates = myResourceIndexedSearchParamUriDao.findAllByResourceTypeAndParamName(myResourceName, theParamName); + List toFind = new ArrayList<>(); + for (String next : candidates) { + if (value.length() >= next.length()) { + if (value.substring(0, next.length()).equals(next)) { + toFind.add(next); + } + } + } + + if (toFind.isEmpty()) { + continue; + } + + Predicate uriPredicate = join.get("myUri").as(String.class).in(toFind); + Predicate hashAndUriPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, uriPredicate); + codePredicates.add(hashAndUriPredicate); + + } else if (param.getQualifier() == UriParamQualifierEnum.BELOW) { + + Predicate uriPredicate = myCriteriaBuilder.like(join.get("myUri").as(String.class), createLeftMatchLikeExpression(value)); + Predicate hashAndUriPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, theParamName, join, uriPredicate); + codePredicates.add(hashAndUriPredicate); + + } else { + if (myDontUseHashesForSearch) { + Predicate predicate = myCriteriaBuilder.equal(join.get("myUri").as(String.class), value); + codePredicates.add(predicate); + } else { + + Predicate uriPredicate = null; + if (operation == null || operation == SearchFilterParser.CompareOperation.eq) { + long hashUri = ResourceIndexedSearchParamUri.calculateHashUri(theResourceName, theParamName, value); + Predicate hashPredicate = myCriteriaBuilder.equal(join.get("myHashUri"), hashUri); + codePredicates.add(hashPredicate); + } else if (operation == SearchFilterParser.CompareOperation.ne) { + uriPredicate = myCriteriaBuilder.notEqual(join.get("myUri").as(String.class), value); + } else if (operation == SearchFilterParser.CompareOperation.co) { + uriPredicate = myCriteriaBuilder.like(join.get("myUri").as(String.class), createLeftAndRightMatchLikeExpression(value)); + } else if (operation == SearchFilterParser.CompareOperation.gt) { + uriPredicate = myCriteriaBuilder.greaterThan(join.get("myUri").as(String.class), value); + } else if (operation == SearchFilterParser.CompareOperation.lt) { + uriPredicate = myCriteriaBuilder.lessThan(join.get("myUri").as(String.class), value); + } else if (operation == SearchFilterParser.CompareOperation.ge) { + uriPredicate = myCriteriaBuilder.greaterThanOrEqualTo(join.get("myUri").as(String.class), value); + } else if (operation == SearchFilterParser.CompareOperation.le) { + uriPredicate = myCriteriaBuilder.lessThanOrEqualTo(join.get("myUri").as(String.class), value); + } else if (operation == SearchFilterParser.CompareOperation.sw) { + uriPredicate = myCriteriaBuilder.like(join.get("myUri").as(String.class), createLeftMatchLikeExpression(value)); + } else if (operation == SearchFilterParser.CompareOperation.ew) { + uriPredicate = myCriteriaBuilder.like(join.get("myUri").as(String.class), createRightMatchLikeExpression(value)); + } else { + throw new IllegalArgumentException(String.format("Unsupported operator specified in _filter clause, %s", + operation.toString())); + } + + if (uriPredicate != null) { + long hashIdentity = BaseResourceIndexedSearchParam.calculateHashIdentity(theResourceName, theParamName); + Predicate hashIdentityPredicate = myCriteriaBuilder.equal(join.get("myHashIdentity"), hashIdentity); + codePredicates.add(myCriteriaBuilder.and(hashIdentityPredicate, uriPredicate)); + } + } + } + + } else { + throw new IllegalArgumentException("Invalid URI type: " + nextOr.getClass()); + } + + } + + /* + * If we haven't found any of the requested URIs in the candidates, then we'll + * just add a predicate that can never match + */ + if (codePredicates.isEmpty()) { + Predicate predicate = myCriteriaBuilder.isNull(join.get("myMissing").as(String.class)); + myQueryRoot.addPredicate(predicate); + return null; + } + + Predicate orPredicate = myCriteriaBuilder.or(toArray(codePredicates)); + + Predicate outerPredicate = combineParamIndexPredicateWithParamNamePredicate(theResourceName, + theParamName, + join, + orPredicate); + myQueryRoot.addPredicate(outerPredicate); + return outerPredicate; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRoot.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRoot.java new file mode 100644 index 00000000000..3eeeed71efe --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRoot.java @@ -0,0 +1,102 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; + +import javax.persistence.criteria.*; +import java.util.List; +import java.util.Stack; + +public class QueryRoot { + private final Stack myQueryRootStack = new Stack<>(); + private boolean myHasIndexJoins; + + public void push(AbstractQuery theResourceTableQuery) { + myQueryRootStack.push(new QueryRootEntry(theResourceTableQuery)); + } + + private QueryRootEntry top() { + return myQueryRootStack.peek(); + } + + void pop() { + myQueryRootStack.pop(); + } + + public Root getRoot() { + return top().getRoot(); + } + + public Path get(String theAttributeName) { + return top().get(theAttributeName); + } + + public Join join(String theAttributeName, JoinType theJoinType) { + return top().join(theAttributeName, theJoinType); + } + + public Join getIndexJoin(SearchBuilderJoinKey theKey) { + return top().getIndexJoin(theKey); + } + + public void addPredicate(Predicate thePredicate) { + top().addPredicate(thePredicate); + } + + public void addPredicates(List thePredicates) { + top().addPredicates(thePredicates); + } + + public Predicate[] getPredicateArray() { + return top().getPredicateArray(); + } + + void putIndex(SearchBuilderJoinKey theKey, Join theJoin) { + myHasIndexJoins = true; + top().putIndex(theKey, theJoin); + } + + void clearPredicates() { + top().clearPredicates(); + } + + List getPredicates() { + return top().getPredicates(); + } + + public void where(Predicate theAnd) { + top().where(theAnd); + } + + Subquery subquery(Class theClass) { + return top().subquery(theClass); + } + + public boolean hasIndexJoins() { + return myHasIndexJoins; + } + + public void setHasIndexJoins(boolean theHasIndexJoins) { + myHasIndexJoins = true; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRootEntry.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRootEntry.java new file mode 100644 index 00000000000..55a49cb6e21 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/QueryRootEntry.java @@ -0,0 +1,89 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceTable; + +import javax.persistence.criteria.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class QueryRootEntry { + private final AbstractQuery myResourceTableQuery; + private final Root myResourceTableRoot; + private final ArrayList myPredicates = new ArrayList<>(); + private final IndexJoins myIndexJoins = new IndexJoins(); + + public QueryRootEntry(AbstractQuery theResourceTableQuery) { + myResourceTableQuery = theResourceTableQuery; + myResourceTableRoot = theResourceTableQuery.from(ResourceTable.class); + } + + public Root getRoot() { + return myResourceTableRoot; + } + + public Path get(String theAttributeName) { + return myResourceTableRoot.get(theAttributeName); + } + + public Join join(String theAttributeName, JoinType theJoinType) { + return myResourceTableRoot.join(theAttributeName, theJoinType); + } + + public Join getIndexJoin(SearchBuilderJoinKey theKey) { + return myIndexJoins.get(theKey); + } + + public void addPredicate(Predicate thePredicate) { + myPredicates.add(thePredicate); + } + + public void addPredicates(List thePredicates) { + myPredicates.addAll(thePredicates); + } + + public Predicate[] getPredicateArray() { + return myPredicates.toArray(new Predicate[0]); + } + + void putIndex(SearchBuilderJoinKey theKey, Join theJoin) { + myIndexJoins.put(theKey, theJoin); + } + + void clearPredicates() { + myPredicates.clear(); + } + + List getPredicates() { + return Collections.unmodifiableList(myPredicates); + } + + public void where(Predicate theAnd) { + myResourceTableQuery.where(theAnd); + } + + Subquery subquery(Class theClass) { + return myResourceTableQuery.subquery(theClass); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/IJpaValidationSupportDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinEnum.java similarity index 73% rename from hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/IJpaValidationSupportDstu3.java rename to hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinEnum.java index 645d8d00d55..48bcb346b61 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/IJpaValidationSupportDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinEnum.java @@ -1,12 +1,10 @@ -package ca.uhn.fhir.jpa.dao.dstu3; +package ca.uhn.fhir.jpa.dao.predicate; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; - -/* +/*- * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +20,14 @@ import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; * #L% */ -public interface IJpaValidationSupportDstu3 extends IValidationSupport { +public enum SearchBuilderJoinEnum { + DATE, + NUMBER, + QUANTITY, + REFERENCE, + STRING, + TOKEN, + URI, + COORDS } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinKey.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinKey.java new file mode 100644 index 00000000000..3e15dbc870c --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderJoinKey.java @@ -0,0 +1,55 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +public class SearchBuilderJoinKey { + private final SearchBuilderJoinEnum myJoinType; + private final String myParamName; + + public SearchBuilderJoinKey(String theParamName, SearchBuilderJoinEnum theJoinType) { + super(); + myParamName = theParamName; + myJoinType = theJoinType; + } + + @Override + public boolean equals(Object theObj) { + if (!(theObj instanceof SearchBuilderJoinKey)) { + return false; + } + SearchBuilderJoinKey obj = (SearchBuilderJoinKey) theObj; + return new EqualsBuilder() + .append(myParamName, obj.myParamName) + .append(myJoinType, obj.myJoinType) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder() + .append(myParamName) + .append(myJoinType) + .toHashCode(); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/IJpaValidationSupportR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderTokenModeEnum.java similarity index 72% rename from hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/IJpaValidationSupportR5.java rename to hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderTokenModeEnum.java index 972e863a1c9..f17a53ba277 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/IJpaValidationSupportR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchBuilderTokenModeEnum.java @@ -1,12 +1,10 @@ -package ca.uhn.fhir.jpa.dao.r5; +package ca.uhn.fhir.jpa.dao.predicate; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; - -/* +/*- * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +20,8 @@ import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; * #L% */ -public interface IJpaValidationSupportR5 extends IValidationSupport { - // nothing yet +public enum SearchBuilderTokenModeEnum { + SYSTEM_ONLY, + VALUE_ONLY, + SYSTEM_AND_VALUE } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchFilterParser.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFilterParser.java similarity index 98% rename from hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchFilterParser.java rename to hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFilterParser.java index af38832f56a..7a1ce46ebe8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchFilterParser.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFilterParser.java @@ -1,10 +1,10 @@ -package ca.uhn.fhir.jpa.dao; +package ca.uhn.fhir.jpa.dao.predicate; /*- * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -544,7 +544,7 @@ public class SearchFilterParser { return FValueType; } - public void setValueType(FilterValueType FValueType) { + void setValueType(FilterValueType FValueType) { this.FValueType = FValueType; } @@ -602,7 +602,7 @@ public class SearchFilterParser { } } - static class FilterSyntaxException extends Exception { + public static class FilterSyntaxException extends Exception { FilterSyntaxException(String theMessage) { super(theMessage); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtil.java new file mode 100644 index 00000000000..527aa24008a --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtil.java @@ -0,0 +1,49 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.rest.param.ParamPrefixEnum; + +import java.math.BigDecimal; + +public interface SearchFuzzUtil { + /** + * Figures out the tolerance for a search. For example, if the user is searching for 4.00, this method + * returns 0.005 because we shold actually match values which are + * 4 (+/-) 0.005 according to the FHIR specs. + */ + static BigDecimal calculateFuzzAmount(ParamPrefixEnum cmpValue, BigDecimal theValue) { + if (cmpValue == ParamPrefixEnum.APPROXIMATE) { + return theValue.multiply(new BigDecimal(0.1)); + } else { + String plainString = theValue.toPlainString(); + int dotIdx = plainString.indexOf('.'); + if (dotIdx == -1) { + return new BigDecimal(0.5); + } + + int precision = plainString.length() - (dotIdx); + double mul = Math.pow(10, -precision); + double val = mul * 5.0d; + return new BigDecimal(val); + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaValidationSupport.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaValidationSupport.java deleted file mode 100644 index 56c9e051653..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaValidationSupport.java +++ /dev/null @@ -1,138 +0,0 @@ -package ca.uhn.fhir.jpa.dao.r4; - -/*- - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.DaoRegistry; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.param.UriParam; -import org.hl7.fhir.instance.model.api.IAnyResource; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; - -import javax.annotation.PostConstruct; - -public abstract class BaseJpaValidationSupport { - - private static final Logger ourLog = LoggerFactory.getLogger(BaseJpaValidationSupport.class); - - @Autowired - private FhirContext myR4Ctx; - @Autowired - private DaoRegistry myDaoRegistry; - private IFhirResourceDao myStructureDefinitionDao; - private IFhirResourceDao myValueSetDao; - private IFhirResourceDao myQuestionnaireDao; - private IFhirResourceDao myCodeSystemDao; - private IFhirResourceDao myImplementationGuideDao; - - @SuppressWarnings({"unchecked", "unused"}) - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - IdType id = new IdType(theUri); - boolean localReference = false; - if (id.hasBaseUrl() == false && id.hasIdPart() == true) { - localReference = true; - } - - String resourceName = myR4Ctx.getResourceDefinition(theClass).getName(); - IBundleProvider search; - if ("ValueSet".equals(resourceName)) { - if (localReference) { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(IAnyResource.SP_RES_ID, new StringParam(theUri)); - search = myValueSetDao.search(params); - if (search.size() == 0) { - params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(ValueSet.SP_URL, new UriParam(theUri)); - search = myValueSetDao.search(params); - } - } else { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(ValueSet.SP_URL, new UriParam(theUri)); - search = myValueSetDao.search(params); - } - } else if ("StructureDefinition".equals(resourceName)) { - // Don't allow the core FHIR definitions to be overwritten - if (theUri.startsWith("http://hl7.org/fhir/StructureDefinition/")) { - String typeName = theUri.substring("http://hl7.org/fhir/StructureDefinition/".length()); - if (myR4Ctx.getElementDefinition(typeName) != null) { - return null; - } - } - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(StructureDefinition.SP_URL, new UriParam(theUri)); - search = myStructureDefinitionDao.search(params); - } else if ("Questionnaire".equals(resourceName)) { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - if (localReference) { - params.add(IAnyResource.SP_RES_ID, new StringParam(id.getIdPart())); - } else { - params.add(Questionnaire.SP_URL, new UriParam(id.getValue())); - } - search = myQuestionnaireDao.search(params); - } else if ("CodeSystem".equals(resourceName)) { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(CodeSystem.SP_URL, new UriParam(theUri)); - search = myCodeSystemDao.search(params); - } else if ("ImplementationGuide".equals(resourceName)) { - SearchParameterMap params = new SearchParameterMap(); - params.setLoadSynchronousUpTo(1); - params.add(ImplementationGuide.SP_URL, new UriParam(theUri)); - search = myImplementationGuideDao.search(params); - } else { - throw new IllegalArgumentException("Can't fetch resource type: " + resourceName); - } - - Integer size = search.size(); - if (size == null || size == 0) { - return null; - } - - if (size > 1) { - ourLog.warn("Found multiple {} instances with URL search value of: {}", resourceName, theUri); - } - - return (T) search.getResources(0, 1).get(0); - } - - @PostConstruct - public void start() { - myStructureDefinitionDao = myDaoRegistry.getResourceDao("StructureDefinition"); - myValueSetDao = myDaoRegistry.getResourceDao("ValueSet"); - myQuestionnaireDao = myDaoRegistry.getResourceDao("Questionnaire"); - myCodeSystemDao = myDaoRegistry.getResourceDao("CodeSystem"); - myImplementationGuideDao = myDaoRegistry.getResourceDao("ImplementationGuide"); - } - - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoBundleR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoBundleR4.java index 388df8a46da..536fdbc0e68 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoBundleR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoBundleR4.java @@ -8,7 +8,7 @@ import org.hl7.fhir.r4.model.Bundle.BundleType; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java index 47f5a4b37d2..40b4a1eb390 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCodeSystemR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,13 @@ package ca.uhn.fhir.jpa.dao.r4; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; -import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao; import ca.uhn.fhir.jpa.entity.TermCodeSystem; +import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; @@ -38,7 +38,6 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.Coding; @@ -59,7 +58,7 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { + public IValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode()); boolean haveCode = theCode != null && theCode.isEmpty() == false; boolean haveSystem = theSystem != null && theSystem.isEmpty() == false; @@ -103,10 +102,10 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao implements IFhirResourceDaoSearchParameter { - public static final DefaultProfileValidationSupport VALIDATION_SUPPORT = new DefaultProfileValidationSupport(); - @Autowired - private IFhirSystemDao mySystemDao; @Autowired private ISearchParamExtractor mySearchParamExtractor; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoStructureDefinitionR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoStructureDefinitionR4.java index bb1f005d737..203c44d02da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoStructureDefinitionR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoStructureDefinitionR4.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.jpa.dao.r4; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoStructureDefinition; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; import org.hl7.fhir.r4.model.StructureDefinition; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ public class FhirResourceDaoStructureDefinitionR4 extends BaseHapiFhirResourceDa @Override public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) { - StructureDefinition output = myValidationSupport.generateSnapshot(theInput, theUrl, theWebUrl, theName); + StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(myValidationSupport, theInput, theUrl, theWebUrl, theName); Validate.notNull(output); return output; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSubscriptionR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSubscriptionR4.java index f026a3f2f00..c51ec3f4461 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSubscriptionR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoSubscriptionR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ public class FhirResourceDaoSubscriptionR4 extends BaseHapiFhirResourceDao private DefaultProfileValidationSupport myDefaultProfileValidationSupport; private IValidationSupport myValidationSupport; + @Autowired + private IFhirResourceDaoCodeSystem myCodeSystemDao; @Override public void start() { super.start(); - myValidationSupport = getApplicationContext().getBean(IValidationSupport.class,"myJpaValidationSupportChainR4" ); + myValidationSupport = getApplicationContext().getBean(IValidationSupport.class, "myJpaValidationSupportChain"); } - @Autowired - private IFhirResourceDaoCodeSystem myCodeSystemDao; - @Override public ValueSet expand(IIdType theId, String theFilter, RequestDetails theRequestDetails) { ValueSet source = read(theId, theRequestDetails); @@ -87,62 +88,19 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao } private ValueSet doExpand(ValueSet theSource) { - - /* - * If all of the code systems are supported by the HAPI FHIR terminology service, let's - * use that as it's more efficient. - */ - - boolean allSystemsAreSuppportedByTerminologyService = true; - for (ConceptSetComponent next : theSource.getCompose().getInclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - for (ConceptSetComponent next : theSource.getCompose().getExclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - if (allSystemsAreSuppportedByTerminologyService) { - return myTerminologySvc.expandValueSetInMemory(theSource, null); - } - - HapiWorkerContext workerContext = new HapiWorkerContext(getContext(), myValidationSupport); - - ValueSetExpansionOutcome outcome = workerContext.expand(theSource, null); - - ValueSet retVal = outcome.getValueset(); - retVal.setStatus(PublicationStatus.ACTIVE); - - return retVal; + IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, null, theSource); + validateHaveExpansionOrThrowInternalErrorException(retVal); + return (ValueSet) retVal.getValueSet(); } private ValueSet doExpand(ValueSet theSource, int theOffset, int theCount) { - boolean allSystemsAreSuppportedByTerminologyService = true; - for (ConceptSetComponent next : theSource.getCompose().getInclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - for (ConceptSetComponent next : theSource.getCompose().getExclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - if (allSystemsAreSuppportedByTerminologyService) { - return myTerminologySvc.expandValueSet(theSource, theOffset, theCount); - } - - HapiWorkerContext workerContext = new HapiWorkerContext(getContext(), myValidationSupport); - - ValueSetExpansionOutcome outcome = workerContext.expand(theSource, null); - - ValueSet retVal = outcome.getValueset(); - retVal.setStatus(PublicationStatus.ACTIVE); - - return retVal; + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(theOffset) + .setCount(theCount); + IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, options, theSource); + validateHaveExpansionOrThrowInternalErrorException(retVal); + return (ValueSet) retVal.getValueSet(); } @Override @@ -284,8 +242,8 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao @Override public ValidateCodeResult validateCode(IPrimitiveType theValueSetIdentifier, IIdType theId, IPrimitiveType theCode, - IPrimitiveType theSystem, IPrimitiveType theDisplay, Coding theCoding, - CodeableConcept theCodeableConcept, RequestDetails theRequestDetails) { + IPrimitiveType theSystem, IPrimitiveType theDisplay, Coding theCoding, + CodeableConcept theCodeableConcept, RequestDetails theRequestDetails) { List valueSetIds = Collections.emptyList(); @@ -306,9 +264,9 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao if (theId != null) { vs = read(theId, theRequestDetails); } else if (haveIdentifierParam) { - vs = myDefaultProfileValidationSupport.fetchValueSet(getContext(), theValueSetIdentifier.getValue()); + vs = (ValueSet) myDefaultProfileValidationSupport.fetchValueSet(theValueSetIdentifier.getValue()); if (vs == null) { - vs = myValidationSupport.fetchValueSet(getContext(), theValueSetIdentifier.getValue()); + vs = (ValueSet) myValidationSupport.fetchValueSet(theValueSetIdentifier.getValue()); if (vs == null) { throw new InvalidRequestException("Unknown ValueSet identifier: " + theValueSetIdentifier.getValue()); } @@ -321,7 +279,7 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao } // String code = theCode.getValue(); // String system = toStringOrNull(theSystem); - IContextValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(theCode, theSystem, null, null); + IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(theCode, theSystem, null, null); if (result.isFound()) { ValidateCodeResult retVal = new ValidateCodeResult(true, "Found code", result.getCodeDisplay()); return retVal; @@ -331,7 +289,7 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao if (vs != null) { ValidateCodeResult result; if (myDaoConfig.isPreExpandValueSets() && !isBuiltInValueSet && myTerminologySvc.isValueSetPreExpandedForCodeValidation(vs)) { - result = myTerminologySvc.validateCodeIsInPreExpandedValueSet(vs, toStringOrNull(theSystem), toStringOrNull(theCode), toStringOrNull(theDisplay), theCoding, theCodeableConcept); + result = myTerminologySvc.validateCodeIsInPreExpandedValueSet(new ValidationOptions(), vs, toStringOrNull(theSystem), toStringOrNull(theCode), toStringOrNull(theDisplay), theCoding, theCodeableConcept); } else { ValueSet expansion = doExpand(vs); List contains = expansion.getExpansion().getContains(); @@ -356,7 +314,7 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao } private ValidateCodeResult validateCodeIsInContains(List contains, String theSystem, String theCode, - Coding theCoding, CodeableConcept theCodeableConcept) { + Coding theCoding, CodeableConcept theCodeableConcept) { for (ValueSetExpansionContainsComponent nextCode : contains) { ValidateCodeResult result = validateCodeIsInContains(nextCode.getContains(), theSystem, theCode, theCoding, theCodeableConcept); if (result != null) { @@ -409,5 +367,15 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao return retVal; } + public static void validateHaveExpansionOrThrowInternalErrorException(IValidationSupport.ValueSetExpansionOutcome theRetVal) { + if (theRetVal != null && theRetVal.getValueSet() == null) { + throw new InternalErrorException("Unable to expand ValueSet: " + theRetVal.getError()); + } + + if (theRetVal == null) { + throw new InternalErrorException("Unable to expand ValueSet"); + } + } + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4.java index ccbc4f873d7..de22ffa0e04 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/JpaValidationSupportR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/JpaValidationSupportR4.java deleted file mode 100644 index df97d08064d..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/JpaValidationSupportR4.java +++ /dev/null @@ -1,102 +0,0 @@ -package ca.uhn.fhir.jpa.dao.r4; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; - -import javax.transaction.Transactional; -import javax.transaction.Transactional.TxType; -import java.util.Collections; -import java.util.List; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -@Transactional(value = TxType.REQUIRED) -public class JpaValidationSupportR4 extends BaseJpaValidationSupport implements IJpaValidationSupportR4 { - - /** - * Constructor - */ - public JpaValidationSupportR4() { - super(); - } - - - @Override - @Transactional(value = TxType.SUPPORTS) - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - return fetchResource(theCtx, CodeSystem.class, theSystem); - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String theSystem) { - return fetchResource(theCtx, ValueSet.class, theSystem); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return fetchResource(theCtx, StructureDefinition.class, theUrl); - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - return false; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public IValidationSupport.CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theSystemUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/TransactionProcessorVersionAdapterR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/TransactionProcessorVersionAdapterR4.java index fe0d4a309f6..90057674df8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/TransactionProcessorVersionAdapterR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/TransactionProcessorVersionAdapterR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoBundleR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoBundleR5.java index 26468114ca6..8710edcbb1c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoBundleR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoBundleR5.java @@ -12,7 +12,7 @@ import static org.apache.commons.lang3.StringUtils.defaultString; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoCodeSystemR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoCodeSystemR5.java index ff7916f9c20..9814ea9b6b5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoCodeSystemR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoCodeSystemR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,14 @@ package ca.uhn.fhir.jpa.dao.r5; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; -import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao; import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.entity.TermCodeSystem; +import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; @@ -39,7 +39,6 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.hl7.fhir.r5.hapi.validation.ValidationSupportChain; import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.CodeableConcept; import org.hl7.fhir.r5.model.Coding; @@ -56,16 +55,15 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; public class FhirResourceDaoCodeSystemR5 extends BaseHapiFhirResourceDao implements IFhirResourceDaoCodeSystem { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoCodeSystemR5.class); - - @Autowired - private ITermCodeSystemDao myCsDao; - @Autowired - private ValidationSupportChain myValidationSupport; @Autowired protected ITermCodeSystemStorageSvc myTerminologyCodeSystemStorageSvc; @Autowired protected IdHelperService myIdHelperService; @Autowired + private ITermCodeSystemDao myCsDao; + @Autowired + private IValidationSupport myValidationSupport; + @Autowired private FhirContext myFhirContext; @Override @@ -82,7 +80,7 @@ public class FhirResourceDaoCodeSystemR5 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { + public IValidationSupport.LookupCodeResult lookupCode(IPrimitiveType theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode()); boolean haveCode = theCode != null && theCode.isEmpty() == false; boolean haveSystem = theSystem != null && theSystem.isEmpty() == false; @@ -106,10 +104,10 @@ public class FhirResourceDaoCodeSystemR5 extends BaseHapiFhirResourceDao implements IFhirResourceDaoSearchParameter { - public static final DefaultProfileValidationSupport VALIDATION_SUPPORT = new DefaultProfileValidationSupport(); - @Autowired - private IFhirSystemDao mySystemDao; @Autowired private ISearchParamExtractor mySearchParamExtractor; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoStructureDefinitionR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoStructureDefinitionR5.java index 093b347e331..7bd846b32f7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoStructureDefinitionR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoStructureDefinitionR5.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.jpa.dao.r5; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoStructureDefinition; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; import org.hl7.fhir.r5.model.StructureDefinition; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ public class FhirResourceDaoStructureDefinitionR5 extends BaseHapiFhirResourceDa @Override public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) { - StructureDefinition output = myValidationSupport.generateSnapshot(theInput, theUrl, theWebUrl, theName); + StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(myValidationSupport, theInput, theUrl, theWebUrl, theName); Validate.notNull(output); return output; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoSubscriptionR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoSubscriptionR5.java index 10880183624..617b3dfa104 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoSubscriptionR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoSubscriptionR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,29 +20,20 @@ package ca.uhn.fhir.jpa.dao.r5; * #L% */ -import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoSubscription; import ca.uhn.fhir.jpa.dao.data.ISubscriptionTableDao; import ca.uhn.fhir.jpa.entity.SubscriptionTable; import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; import ca.uhn.fhir.jpa.model.entity.ResourceTable; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r5.model.Subscription; -import org.hl7.fhir.r5.model.codesystems.SubscriptionChannelType; import org.springframework.beans.factory.annotation.Autowired; -import javax.annotation.Nullable; import java.util.Date; -import static org.apache.commons.lang3.StringUtils.isBlank; - public class FhirResourceDaoSubscriptionR5 extends BaseHapiFhirResourceDao implements IFhirResourceDaoSubscription { @Autowired @@ -57,7 +48,7 @@ public class FhirResourceDaoSubscriptionR5 extends BaseHapiFhirResourceDao private ITermReadSvc myHapiTerminologySvc; @Autowired - private DefaultProfileValidationSupport myDefaultProfileValidationSupport; + @Qualifier("myDefaultProfileValidationSupport") + private IValidationSupport myDefaultProfileValidationSupport; private IValidationSupport myValidationSupport; @@ -71,7 +74,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao @Override public void start() { super.start(); - myValidationSupport = getApplicationContext().getBean(org.hl7.fhir.r5.hapi.ctx.IValidationSupport.class,"myJpaValidationSupportChainR5" ); + myValidationSupport = getApplicationContext().getBean(IValidationSupport.class,"myJpaValidationSupportChain" ); } @Override @@ -87,74 +90,19 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao } private ValueSet doExpand(ValueSet theSource) { + IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, null, theSource); + validateHaveExpansionOrThrowInternalErrorException(retVal); + return (ValueSet) retVal.getValueSet(); - /* - * If all of the code systems are supported by the HAPI FHIR terminology service, let's - * use that as it's more efficient. - */ - - boolean allSystemsAreSuppportedByTerminologyService = true; - for (ConceptSetComponent next : theSource.getCompose().getInclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - for (ConceptSetComponent next : theSource.getCompose().getExclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - if (allSystemsAreSuppportedByTerminologyService) { - return (ValueSet) myTerminologySvc.expandValueSet(theSource); - } - - HapiWorkerContext workerContext = new HapiWorkerContext(getContext(), myValidationSupport); - - ValueSetExpansionOutcome outcome = workerContext.expand(theSource, null); - - ValueSet retVal = outcome.getValueset(); - retVal.setStatus(PublicationStatus.ACTIVE); - - return retVal; - - // ValueSetExpansionComponent expansion = outcome.getValueset().getExpansion(); - // - // ValueSet retVal = new ValueSet(); - // retVal.getMeta().setLastUpdated(new Date()); - // retVal.setExpansion(expansion); - // return retVal; } private ValueSet doExpand(ValueSet theSource, int theOffset, int theCount) { - - /* - * If all of the code systems are supported by the HAPI FHIR terminology service, let's - * use that as it's more efficient. - */ - - boolean allSystemsAreSuppportedByTerminologyService = true; - for (ConceptSetComponent next : theSource.getCompose().getInclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - for (ConceptSetComponent next : theSource.getCompose().getExclude()) { - if (!isBlank(next.getSystem()) && !myTerminologySvc.supportsSystem(next.getSystem())) { - allSystemsAreSuppportedByTerminologyService = false; - } - } - if (allSystemsAreSuppportedByTerminologyService) { - return (ValueSet) myTerminologySvc.expandValueSet(theSource, theOffset, theCount); - } - - HapiWorkerContext workerContext = new HapiWorkerContext(getContext(), myValidationSupport); - - ValueSetExpansionOutcome outcome = workerContext.expand(theSource, null); - - ValueSet retVal = outcome.getValueset(); - retVal.setStatus(PublicationStatus.ACTIVE); - - return retVal; + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(theOffset) + .setCount(theCount); + IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, options, theSource); + validateHaveExpansionOrThrowInternalErrorException(retVal); + return (ValueSet) retVal.getValueSet(); } @Override @@ -172,7 +120,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao ConceptSetComponent include = source.getCompose().addInclude(); ConceptSetFilterComponent filter = include.addFilter(); filter.setProperty("display"); - filter.setOp(FilterOperator.EQUAL); + filter.setOp(Enumerations.FilterOperator.EQUAL); filter.setValue(theFilter); } @@ -207,7 +155,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao ConceptSetComponent include = source.getCompose().addInclude(); ConceptSetFilterComponent filter = include.addFilter(); filter.setProperty("display"); - filter.setOp(FilterOperator.EQUAL); + filter.setOp(Enumerations.FilterOperator.EQUAL); filter.setValue(theFilter); } @@ -289,7 +237,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao private void addFilterIfPresent(String theFilter, ConceptSetComponent include) { if (ElementUtil.isEmpty(include.getConcept())) { if (isNotBlank(theFilter)) { - include.addFilter().setProperty("display").setOp(FilterOperator.EQUAL).setValue(theFilter); + include.addFilter().setProperty("display").setOp(Enumerations.FilterOperator.EQUAL).setValue(theFilter); } } } @@ -318,9 +266,9 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao if (theId != null) { vs = read(theId, theRequestDetails); } else if (haveIdentifierParam) { - vs = myDefaultProfileValidationSupport.fetchValueSet(getContext(), theValueSetIdentifier.getValue()); + vs = (ValueSet) myDefaultProfileValidationSupport.fetchValueSet(theValueSetIdentifier.getValue()); if (vs == null) { - vs = myValidationSupport.fetchValueSet(getContext(), theValueSetIdentifier.getValue()); + vs = (ValueSet) myValidationSupport.fetchValueSet(theValueSetIdentifier.getValue()); if (vs == null) { throw new InvalidRequestException("Unknown ValueSet identifier: " + theValueSetIdentifier.getValue()); } @@ -333,7 +281,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao } // String code = theCode.getValue(); // String system = toStringOrNull(theSystem); - IContextValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(theCode, theSystem, null, null); + IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(theCode, theSystem, null, null); if (result.isFound()) { ValidateCodeResult retVal = new ValidateCodeResult(true, "Found code", result.getCodeDisplay()); return retVal; @@ -343,7 +291,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao if (vs != null) { ValidateCodeResult result; if (myDaoConfig.isPreExpandValueSets() && !isBuiltInValueSet && myTerminologySvc.isValueSetPreExpandedForCodeValidation(vs)) { - result = myTerminologySvc.validateCodeIsInPreExpandedValueSet(vs, toStringOrNull(theSystem), toStringOrNull(theCode), toStringOrNull(theDisplay), theCoding, theCodeableConcept); + result = myTerminologySvc.validateCodeIsInPreExpandedValueSet(new ValidationOptions(), vs, toStringOrNull(theSystem), toStringOrNull(theCode), toStringOrNull(theDisplay), theCoding, theCodeableConcept); } else { ValueSet expansion = doExpand(vs); List contains = expansion.getExpansion().getContains(); @@ -412,7 +360,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao if (myDaoConfig.isPreExpandValueSets() && !retVal.isUnchangedInCurrentOperation()) { if (retVal.getDeleted() == null) { ValueSet valueSet = (ValueSet) theResource; - myHapiTerminologySvc.storeTermValueSet(retVal, org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSet)); + myHapiTerminologySvc.storeTermValueSet(retVal, org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(valueSet)); } else { myHapiTerminologySvc.deleteValueSetAndChildren(retVal); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirSystemDaoR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirSystemDaoR5.java index f571d9703ca..fc8095ec204 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirSystemDaoR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirSystemDaoR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/JpaValidationSupportR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/JpaValidationSupportR5.java deleted file mode 100644 index 0435480351d..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/JpaValidationSupportR5.java +++ /dev/null @@ -1,104 +0,0 @@ -package ca.uhn.fhir.jpa.dao.r5; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.r4.BaseJpaValidationSupport; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; - -import javax.transaction.Transactional; -import javax.transaction.Transactional.TxType; -import java.util.Collections; -import java.util.List; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -@Transactional(value = TxType.REQUIRED) -public class JpaValidationSupportR5 extends BaseJpaValidationSupport implements IJpaValidationSupportR5 { - - /** - * Constructor - */ - public JpaValidationSupportR5() { - super(); - } - - - @Override - @Transactional(value = TxType.SUPPORTS) - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - return fetchResource(theCtx, CodeSystem.class, theSystem); - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String theSystem) { - return fetchResource(theCtx, ValueSet.class, theSystem); - } - - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return fetchResource(theCtx, StructureDefinition.class, theUrl); - } - - @Override - @Transactional(value = TxType.SUPPORTS) - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - return false; - } - - - @Override - @Transactional(value = TxType.SUPPORTS) - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theSystemUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/TransactionProcessorVersionAdapterR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/TransactionProcessorVersionAdapterR5.java index 6f73d0942e1..ac7ad867d7d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/TransactionProcessorVersionAdapterR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/TransactionProcessorVersionAdapterR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.dao.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictFinderService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictFinderService.java index 403d5f220e9..dca6286de04 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictFinderService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictFinderService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.delete; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictList.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictList.java index b925a81a25d..bd5eb74bf92 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictList.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictList.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.delete; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictOutcome.java index 2bb1af3b572..f7cb4dae5ff 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.delete; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictService.java index 82e45f64832..e575041cd91 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/DeleteConflictService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.delete; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionEntity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionEntity.java index eaa2a56e081..0dbc296b3f5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionEntity.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionFileEntity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionFileEntity.java index 420dd6244ef..2ab656fc0e0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionFileEntity.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportCollectionFileEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportJobEntity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportJobEntity.java index 63433928d25..f7a022dd31c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportJobEntity.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BulkExportJobEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceReindexJobEntity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceReindexJobEntity.java index 5a06a127537..95aa9be98d5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceReindexJobEntity.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceReindexJobEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java index 2dbc8f881c0..553336e9e90 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java index 89e1015eee3..d0d904c3b3d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java @@ -13,7 +13,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.persistence.*; -import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.*; @@ -23,7 +22,7 @@ import static org.apache.commons.lang3.StringUtils.left; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,8 +42,8 @@ import static org.apache.commons.lang3.StringUtils.left; @Table(name = "HFJ_SEARCH", uniqueConstraints = { @UniqueConstraint(name = "IDX_SEARCH_UUID", columnNames = "SEARCH_UUID") }, indexes = { - @Index(name = "IDX_SEARCH_LASTRETURNED", columnList = "SEARCH_LAST_RETURNED"), - @Index(name = "IDX_SEARCH_RESTYPE_HASHS", columnList = "RESOURCE_TYPE,SEARCH_QUERY_STRING_HASH,CREATED") + @Index(name = "IDX_SEARCH_RESTYPE_HASHS", columnList = "RESOURCE_TYPE,SEARCH_QUERY_STRING_HASH,CREATED"), + @Index(name = "IDX_SEARCH_CREATED", columnList = "CREATED") }) public class Search implements ICachedSearchDetails, Serializable { @@ -90,11 +89,6 @@ public class Search implements ICachedSearchDetails, Serializable { private Long myResourceId; @Column(name = "RESOURCE_TYPE", length = 200, nullable = true) private String myResourceType; - @NotNull - @Temporal(TemporalType.TIMESTAMP) - @Column(name = "SEARCH_LAST_RETURNED", nullable = false, updatable = false) - @OptimisticLock(excluded = true) - private Date mySearchLastReturned; @Lob() @Basic(fetch = FetchType.LAZY) @Column(name = "SEARCH_QUERY_STRING", nullable = true, updatable = false, length = MAX_SEARCH_QUERY_STRING) @@ -261,14 +255,6 @@ public class Search implements ICachedSearchDetails, Serializable { myResourceType = theResourceType; } - public Date getSearchLastReturned() { - return mySearchLastReturned; - } - - public void setSearchLastReturned(Date theDate) { - mySearchLastReturned = theDate; - } - public String getSearchQueryString() { return mySearchQueryString; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchInclude.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchInclude.java index f29f6fafa55..546169c68de 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchInclude.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchInclude.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchResult.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchResult.java index 62536ccb5d7..c4de805116d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchResult.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchResult.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchTypeEnum.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchTypeEnum.java index 3b6ecd570b2..376d9e801a0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchTypeEnum.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SearchTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SubscriptionTable.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SubscriptionTable.java index b40ad86f0dc..109e541a329 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SubscriptionTable.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/SubscriptionTable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystem.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystem.java index a15ca22fd5c..ce89811024b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystem.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystem.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ public class TermCodeSystem implements Serializable { @Column(name = "CODE_SYSTEM_URI", nullable = false, length = MAX_URL_LENGTH) private String myCodeSystemUri; - @OneToOne() + @OneToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CURRENT_VERSION_PID", referencedColumnName = "PID", nullable = true, foreignKey = @ForeignKey(name = "FK_TRMCODESYSTEM_CURVER")) private TermCodeSystemVersion myCurrentVersion; @Column(name = "CURRENT_VERSION_PID", nullable = true, insertable = false, updatable = false) @@ -57,7 +57,7 @@ public class TermCodeSystem implements Serializable { @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_CODESYSTEM_PID") @Column(name = "PID") private Long myPid; - @OneToOne() + @OneToOne(fetch = FetchType.LAZY) @JoinColumn(name = "RES_ID", referencedColumnName = "RES_ID", nullable = false, updatable = false, foreignKey = @ForeignKey(name = "FK_TRMCODESYSTEM_RES")) private ResourceTable myResource; @Column(name = "RES_ID", insertable = false, updatable = false) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystemVersion.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystemVersion.java index a0de29a76a8..c87f76e3d3e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystemVersion.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermCodeSystemVersion.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class TermCodeSystemVersion implements Serializable { @Column(name = "PID") private Long myId; - @OneToOne() + @OneToOne(fetch = FetchType.LAZY) @JoinColumn(name = "RES_ID", referencedColumnName = "RES_ID", nullable = false, updatable = false, foreignKey = @ForeignKey(name = "FK_CODESYSVER_RES_ID")) private ResourceTable myResource; @@ -64,7 +64,7 @@ public class TermCodeSystemVersion implements Serializable { * This was added in HAPI FHIR 3.3.0 and is nullable just to avoid migration * issued. It should be made non-nullable at some point. */ - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CODESYSTEM_PID", referencedColumnName = "PID", nullable = true, foreignKey = @ForeignKey(name = "FK_CODESYSVER_CS_ID")) private TermCodeSystem myCodeSystem; @@ -72,7 +72,7 @@ public class TermCodeSystemVersion implements Serializable { private Long myCodeSystemPid; @SuppressWarnings("unused") - @OneToOne(mappedBy = "myCurrentVersion", optional = true) + @OneToOne(mappedBy = "myCurrentVersion", optional = true, fetch = FetchType.LAZY) private TermCodeSystem myCodeSystemHavingThisVersionAsCurrentVersionIfAny; @Column(name = "CS_DISPLAY", nullable = true, updatable = false, length = MAX_VERSION_LENGTH) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java index 5f61a8147a9..7373c8e9952 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,10 +20,10 @@ package ca.uhn.fhir.jpa.entity; * #L% */ -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum; import ca.uhn.fhir.jpa.search.DeferConceptIndexingInterceptor; -import ca.uhn.fhir.jpa.term.VersionIndependentConcept; +import ca.uhn.fhir.util.VersionIndependentConcept; import ca.uhn.fhir.util.ValidateUtil; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; @@ -65,7 +65,7 @@ public class TermConcept implements Serializable { @Temporal(TemporalType.TIMESTAMP) @Column(name = "CONCEPT_UPDATED", nullable = true) private Date myUpdated; - @ManyToOne() + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CODESYSTEM_PID", referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_CONCEPT_PID_CS_PID")) private TermCodeSystemVersion myCodeSystem; @Column(name = "CODESYSTEM_PID", insertable = false, updatable = false) @@ -79,11 +79,11 @@ public class TermConcept implements Serializable { @Field(name = "myDisplayPhonetic", index = org.hibernate.search.annotations.Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "autocompletePhoneticAnalyzer")) }) private String myDisplay; - @OneToMany(mappedBy = "myConcept", orphanRemoval = false) + @OneToMany(mappedBy = "myConcept", orphanRemoval = false, fetch = FetchType.LAZY) @Field(name = "PROPmyProperties", analyzer = @Analyzer(definition = "termConceptPropertyAnalyzer")) @FieldBridge(impl = TermConceptPropertyFieldBridge.class) private Collection myProperties; - @OneToMany(mappedBy = "myConcept", orphanRemoval = false) + @OneToMany(mappedBy = "myConcept", orphanRemoval = false, fetch = FetchType.LAZY) private Collection myDesignations; @Id() @SequenceGenerator(name = "SEQ_CONCEPT_PID", sequenceName = "SEQ_CONCEPT_PID") @@ -97,7 +97,7 @@ public class TermConcept implements Serializable { @Column(name = "PARENT_PIDS", nullable = true) private String myParentPids; @OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "myChild") - private Collection myParents; + private List myParents; @Column(name = "CODE_SEQUENCE", nullable = true) private Integer mySequence; @@ -269,7 +269,7 @@ public class TermConcept implements Serializable { return myParentPids; } - public Collection getParents() { + public List getParents() { if (myParents == null) { myParents = new ArrayList<>(); } @@ -388,15 +388,15 @@ public class TermConcept implements Serializable { return b.build(); } - public List toValidationProperties() { - List retVal = new ArrayList<>(); + public List toValidationProperties() { + List retVal = new ArrayList<>(); for (TermConceptProperty next : getProperties()) { switch (next.getType()) { case STRING: - retVal.add(new IContextValidationSupport.StringConceptProperty(next.getKey(), next.getValue())); + retVal.add(new IValidationSupport.StringConceptProperty(next.getKey(), next.getValue())); break; case CODING: - retVal.add(new IContextValidationSupport.CodingConceptProperty(next.getKey(), next.getCodeSystem(), next.getValue(), next.getDisplay())); + retVal.add(new IValidationSupport.CodingConceptProperty(next.getKey(), next.getCodeSystem(), next.getValue(), next.getDisplay())); break; default: throw new IllegalStateException("Don't know how to handle " + next.getType()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptDesignation.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptDesignation.java index 616caa1b817..61cfcf80ee2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptDesignation.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptDesignation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ public class TermConceptDesignation implements Serializable { public static final int MAX_LENGTH = 500; public static final int MAX_VAL_LENGTH = 2000; - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CONCEPT_PID", referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_CONCEPTDESIG_CONCEPT")) private TermConcept myConcept; @Id() @@ -62,7 +62,7 @@ public class TermConceptDesignation implements Serializable { * * @since 3.5.0 */ - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CS_VER_PID", nullable = true, referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_CONCEPTDESIG_CSV")) private TermCodeSystemVersion myCodeSystemVersion; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMap.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMap.java index 24e1dda2797..0e3f1af6c79 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMap.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMap.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroup.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroup.java index d11ae915f46..e1eecfcdcb8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroup.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroup.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElement.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElement.java index f182b16165e..0f43adb81ae 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElement.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElement.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElementTarget.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElementTarget.java index d463f7dddfb..763e03cf695 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElementTarget.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptMapGroupElementTarget.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptParentChildLink.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptParentChildLink.java index 221a9325bd1..2ceceabe931 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptParentChildLink.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptParentChildLink.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,14 +32,14 @@ import java.io.Serializable; public class TermConceptParentChildLink implements Serializable { private static final long serialVersionUID = 1L; - @ManyToOne() + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CHILD_PID", nullable = false, referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_TERM_CONCEPTPC_CHILD")) private TermConcept myChild; @Column(name = "CHILD_PID", insertable = false, updatable = false) private Long myChildPid; - @ManyToOne() + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CODESYSTEM_PID", nullable = false, foreignKey = @ForeignKey(name = "FK_TERM_CONCEPTPC_CS")) private TermCodeSystemVersion myCodeSystem; @@ -47,7 +47,7 @@ public class TermConceptParentChildLink implements Serializable { @Fields({@Field(name = "myCodeSystemVersionPid")}) private long myCodeSystemVersionPid; - @ManyToOne(cascade = {}) + @ManyToOne(fetch = FetchType.LAZY, cascade = {}) @JoinColumn(name = "PARENT_PID", nullable = false, referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_TERM_CONCEPTPC_PARENT")) private TermConcept myParent; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptProperty.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptProperty.java index d83bf36c1f5..8bdbd909b24 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptProperty.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptProperty.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ public class TermConceptProperty implements Serializable { private static final int MAX_LENGTH = 500; static final int MAX_PROPTYPE_ENUM_LENGTH = 6; - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CONCEPT_PID", referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_CONCEPTPROP_CONCEPT")) private TermConcept myConcept; /** @@ -52,7 +52,7 @@ public class TermConceptProperty implements Serializable { * * @since 3.5.0 */ - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CS_VER_PID", nullable = true, referencedColumnName = "PID", foreignKey = @ForeignKey(name = "FK_CONCEPTPROP_CSV")) private TermCodeSystemVersion myCodeSystemVersion; @Id() diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyFieldBridge.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyFieldBridge.java index ee45b58c6fd..a7843699cee 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyFieldBridge.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyFieldBridge.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyTypeEnum.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyTypeEnum.java index e8364f213af..0db0cd1bbe1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyTypeEnum.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConceptPropertyTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java index 34cf7546e54..48811e9256b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConcept.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConcept.java index e219439239f..793de0d6084 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConcept.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConcept.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptDesignation.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptDesignation.java index 7cb0f4c5eba..bca66a3792b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptDesignation.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptDesignation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,9 +33,7 @@ import java.io.Serializable; import static org.apache.commons.lang3.StringUtils.left; import static org.apache.commons.lang3.StringUtils.length; -@Table(name = "TRM_VALUESET_C_DESIGNATION", indexes = { - @Index(name = "IDX_VALUESET_C_DSGNTN_VAL", columnList = "VAL") -}) +@Table(name = "TRM_VALUESET_C_DESIGNATION") @Entity() public class TermValueSetConceptDesignation implements Serializable { private static final long serialVersionUID = 1L; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptView.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptView.java index 835dd022033..6d4eaf94bd7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptView.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetConceptView.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetPreExpansionStatusEnum.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetPreExpansionStatusEnum.java index 914be418ee2..ed991186c97 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetPreExpansionStatusEnum.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSetPreExpansionStatusEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.entity; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/JpaStorageServices.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/JpaStorageServices.java index 92614f3b61b..070cbefc0b2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/JpaStorageServices.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/JpaStorageServices.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.graphql; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class JpaStorageServices extends BaseHapiFhirDao implement private IFhirResourceDao getDao(String theResourceType) { RuntimeResourceDefinition typeDef = getContext().getResourceDefinition(theResourceType); - return getDao(typeDef.getImplementingClass()); + return myDaoRegistry.getResourceDaoOrNull(typeDef.getImplementingClass()); } @Transactional(propagation = Propagation.NEVER) @@ -59,7 +59,7 @@ public class JpaStorageServices extends BaseHapiFhirDao implement public void listResources(Object theAppInfo, String theType, List theSearchParams, List theMatches) throws FHIRException { RuntimeResourceDefinition typeDef = getContext().getResourceDefinition(theType); - IFhirResourceDao dao = getDao(typeDef.getImplementingClass()); + IFhirResourceDao dao = myDaoRegistry.getResourceDaoOrNull(typeDef.getImplementingClass()); SearchParameterMap params = new SearchParameterMap(); params.setLoadSynchronousUpTo(MAX_SEARCH_SIZE); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/CascadingDeleteInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/CascadingDeleteInterceptor.java index 08bcc663da0..4143451d345 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/CascadingDeleteInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/CascadingDeleteInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.interceptor; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaConsentContextServices.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaConsentContextServices.java index 09aa55c5977..6fb8d124d33 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaConsentContextServices.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaConsentContextServices.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.interceptor; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaPreResourceAccessDetails.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaPreResourceAccessDetails.java index e8b68472fbe..77fa992ed6b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaPreResourceAccessDetails.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/JpaPreResourceAccessDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.interceptor; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,6 @@ public class JpaPreResourceAccessDetails implements IPreResourceAccessDetails { public IBaseResource getResource(int theIndex) { if (myResources == null) { myResources = new ArrayList<>(myResourcePids.size()); - // FIXME: JA don't call interceptors for this query mySearchBuilderSupplier.call().loadResourcesByPid(myResourcePids, Collections.emptySet(), myResources, false, null); } return myResources.get(theIndex); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/PerformanceTracingLoggingInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/PerformanceTracingLoggingInterceptor.java index 0d2e18ccb2e..a01b6f08203 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/PerformanceTracingLoggingInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/interceptor/PerformanceTracingLoggingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.interceptor; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java index 861e285e4f0..eda0b7aefb3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java @@ -25,7 +25,7 @@ import java.util.TreeSet; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java index 078fc7d5878..03ec15d2cbc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCompositionDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCompositionDstu2.java index 883f8b292a1..92255d52592 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCompositionDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCompositionDstu2.java @@ -12,7 +12,7 @@ import org.hl7.fhir.instance.model.api.IBaseBundle; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderEncounterDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderEncounterDstu2.java index 82ed14f38fe..d7d45cdfa8f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderEncounterDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderEncounterDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderMessageHeaderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderMessageHeaderDstu2.java index 041b9e83ca1..9d24876404c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderMessageHeaderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderMessageHeaderDstu2.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.model.dstu2.resource.MessageHeader; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java index 8f93558c07f..a0b9ffed6ea 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java @@ -8,7 +8,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderStructureDefinitionDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderStructureDefinitionDstu2.java index c7c419d4bfa..2952a908abd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderStructureDefinitionDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderStructureDefinitionDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java index 7266056600e..cb6209e3833 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.provider; * #L% */ -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; @@ -102,7 +102,7 @@ public class BaseJpaResourceProviderValueSetDstu2 extends JpaResourceProviderDst startRequest(theServletRequest); try { IFhirResourceDaoCodeSystem dao = (IFhirResourceDaoCodeSystem) getDao(); - IContextValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); + IValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); if (result.isFound() == false) { throw new ResourceNotFoundException("Unable to find code[" + result.getSearchedForCode() + "] in system[" + result.getSearchedForSystem() + "]"); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java index 2be9cbb1862..467d591e233 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProviderDstu2Plus.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProviderDstu2Plus.java index 8e7c8d51da7..f238457e97e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProviderDstu2Plus.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProviderDstu2Plus.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/GraphQLProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/GraphQLProvider.java index 66b641a8fd1..4c668129f13 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/GraphQLProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/GraphQLProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.provider; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.annotation.GraphQL; import ca.uhn.fhir.rest.annotation.GraphQLQuery; import ca.uhn.fhir.rest.annotation.IdParam; @@ -35,8 +35,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnclassifiedServerFailureException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.utilities.graphql.IGraphQLEngine; @@ -71,28 +70,28 @@ public class GraphQLProvider { * @param theValidationSupport The HAPI Validation Support object, or null * @param theStorageServices The storage services (this object will be used to retrieve various resources as required by the GraphQL engine) */ - public GraphQLProvider(@Nonnull FhirContext theFhirContext, @Nullable IContextValidationSupport theValidationSupport, @Nonnull IGraphQLStorageServices theStorageServices) { + public GraphQLProvider(@Nonnull FhirContext theFhirContext, @Nullable IValidationSupport theValidationSupport, @Nonnull IGraphQLStorageServices theStorageServices) { Validate.notNull(theFhirContext, "theFhirContext must not be null"); Validate.notNull(theStorageServices, "theStorageServices must not be null"); switch (theFhirContext.getVersion().getVersion()) { case DSTU3: { - IValidationSupport validationSupport = (IValidationSupport) theValidationSupport; - validationSupport = ObjectUtils.defaultIfNull(validationSupport, new org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport()); + IValidationSupport validationSupport = theValidationSupport; + validationSupport = ObjectUtils.defaultIfNull(validationSupport, new DefaultProfileValidationSupport(theFhirContext)); org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext workerContext = new org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext(theFhirContext, validationSupport); engineFactory = () -> new org.hl7.fhir.dstu3.utils.GraphQLEngine(workerContext); break; } case R4: { - org.hl7.fhir.r4.hapi.ctx.IValidationSupport validationSupport = (org.hl7.fhir.r4.hapi.ctx.IValidationSupport) theValidationSupport; - validationSupport = ObjectUtils.defaultIfNull(validationSupport, new org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport()); + IValidationSupport validationSupport = theValidationSupport; + validationSupport = ObjectUtils.defaultIfNull(validationSupport, new DefaultProfileValidationSupport(theFhirContext)); org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext workerContext = new org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext(theFhirContext, validationSupport); engineFactory = () -> new org.hl7.fhir.r4.utils.GraphQLEngine(workerContext); break; } case R5: { - org.hl7.fhir.r5.hapi.ctx.IValidationSupport validationSupport = (org.hl7.fhir.r5.hapi.ctx.IValidationSupport) theValidationSupport; - validationSupport = ObjectUtils.defaultIfNull(validationSupport, new org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport()); + IValidationSupport validationSupport = theValidationSupport; + validationSupport = ObjectUtils.defaultIfNull(validationSupport, new DefaultProfileValidationSupport(theFhirContext)); org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext workerContext = new org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext(theFhirContext, validationSupport); engineFactory = () -> new org.hl7.fhir.r5.utils.GraphQLEngine(workerContext); break; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/IJpaSystemProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/IJpaSystemProvider.java index 61f6b52283c..2ebfc63277e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/IJpaSystemProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/IJpaSystemProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java index 0b52beb5c2a..1bc36a3c1d6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProviderDstu2.java index d20cf9a2c96..543d2a7dcf0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProviderDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaSystemProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaSystemProviderDstu2.java index 95c2fce80f5..bf30d291811 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaSystemProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaSystemProviderDstu2.java @@ -38,7 +38,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java index 24d881ad2d9..829ac7b9f9b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProvider.java index f2ba4f54161..90a27e56c48 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/TerminologyUploaderProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,6 @@ import ca.uhn.fhir.util.ValidateUtil; import com.google.common.base.Charsets; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; -import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; @@ -53,9 +52,15 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.trim; +import static org.hl7.fhir.convertors.conv30_40.CodeSystem30_40.convertCodeSystem; public class TerminologyUploaderProvider extends BaseJpaProvider { @@ -226,9 +231,9 @@ public class TerminologyUploaderProvider extends BaseJpaProvider { b.append(ConceptHandler.DISPLAY); b.append("\n"); for (Map.Entry nextEntry : codes.entrySet()) { - b.append(nextEntry.getKey()); + b.append(csvEscape(nextEntry.getKey())); b.append(","); - b.append(defaultString(nextEntry.getValue())); + b.append(csvEscape(nextEntry.getValue())); b.append("\n"); } byte[] bytes = b.toString().getBytes(Charsets.UTF_8); @@ -245,9 +250,9 @@ public class TerminologyUploaderProvider extends BaseJpaProvider { b.append(HierarchyHandler.PARENT); b.append("\n"); for (Map.Entry nextEntry : codeToParentCodes.entries()) { - b.append(nextEntry.getKey()); + b.append(csvEscape(nextEntry.getKey())); b.append(","); - b.append(defaultString(nextEntry.getValue())); + b.append(csvEscape(nextEntry.getValue())); b.append("\n"); } byte[] bytes = b.toString().getBytes(Charsets.UTF_8); @@ -267,10 +272,10 @@ public class TerminologyUploaderProvider extends BaseJpaProvider { CodeSystem nextCodeSystem; switch (getContext().getVersion().getVersion()) { case DSTU3: - nextCodeSystem = VersionConvertor_30_40.convertCodeSystem((org.hl7.fhir.dstu3.model.CodeSystem) theCodeSystem); + nextCodeSystem = convertCodeSystem((org.hl7.fhir.dstu3.model.CodeSystem) theCodeSystem); break; case R5: - nextCodeSystem = org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem((org.hl7.fhir.r5.model.CodeSystem) theCodeSystem); + nextCodeSystem = org.hl7.fhir.convertors.conv40_50.CodeSystem40_50.convertCodeSystem((org.hl7.fhir.r5.model.CodeSystem) theCodeSystem); break; default: nextCodeSystem = (CodeSystem) theCodeSystem; @@ -354,7 +359,6 @@ public class TerminologyUploaderProvider extends BaseJpaProvider { return retVal; } - private static class FileBackedFileDescriptor implements ITermLoaderSvc.FileDescriptor { private final File myNextFile; @@ -376,4 +380,13 @@ public class TerminologyUploaderProvider extends BaseJpaProvider { } } } + + private static String csvEscape(String theValue) { + return '"' + + theValue + .replace("\"", "\"\"") + .replace("\n", "\\n") + .replace("\r", "") + + '"'; + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java index 999a3ab677b..df9ea5ce9f5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #L% */ -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.rest.annotation.Operation; @@ -53,7 +53,7 @@ public class BaseJpaResourceProviderCodeSystemDstu3 extends JpaResourceProviderD startRequest(theServletRequest); try { IFhirResourceDaoCodeSystem dao = (IFhirResourceDaoCodeSystem) getDao(); - IContextValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); + IValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); result.throwNotFoundIfAppropriate(); return (Parameters) result.toParameters(theRequestDetails.getFhirContext(), theProperties); } catch (FHIRException e) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCompositionDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCompositionDstu3.java index 53327f9919e..aef3b5345f1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCompositionDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCompositionDstu3.java @@ -23,7 +23,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java index ea66f294d43..0f42082bbef 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ package ca.uhn.fhir.jpa.provider.dstu3; */ import ca.uhn.fhir.jpa.dao.IFhirResourceDaoConceptMap; +import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.jpa.term.TranslationRequest; import ca.uhn.fhir.jpa.term.TranslationResult; -import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Operation; import ca.uhn.fhir.rest.annotation.OperationParam; @@ -31,11 +31,21 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.BooleanType; +import org.hl7.fhir.dstu3.model.CodeType; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.ConceptMap; +import org.hl7.fhir.dstu3.model.IdType; +import org.hl7.fhir.dstu3.model.Parameters; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.dstu3.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import javax.servlet.http.HttpServletRequest; +import static org.hl7.fhir.convertors.conv30_40.Parameters30_40.convertParameters; + public class BaseJpaResourceProviderConceptMapDstu3 extends JpaResourceProviderDstu3 { @Operation(name = JpaConstants.OPERATION_TRANSLATE, idempotent = true, returnParameters = { @OperationParam(name = "result", type = BooleanType.class, min = 1, max = 1), @@ -129,7 +139,7 @@ public class BaseJpaResourceProviderConceptMapDstu3 extends JpaResourceProviderD TranslationResult result = dao.translate(translationRequest, theRequestDetails); // Convert from R4 to DSTU3 - return VersionConvertor_30_40.convertParameters(result.toParameters()); + return convertParameters(result.toParameters()); } catch (FHIRException fe) { throw new InternalErrorException(fe); } finally { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderEncounterDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderEncounterDstu3.java index 7cf5bf044e1..c291b38fc65 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderEncounterDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderEncounterDstu3.java @@ -7,7 +7,7 @@ import org.hl7.fhir.dstu3.model.*; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderMessageHeaderDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderMessageHeaderDstu3.java index 9dc5c15fb03..ca2916c87e2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderMessageHeaderDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderMessageHeaderDstu3.java @@ -6,7 +6,7 @@ import org.hl7.fhir.dstu3.model.MessageHeader; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java index 90ad56cf0a5..115e1b24825 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java @@ -29,7 +29,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderStructureDefinitionDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderStructureDefinitionDstu3.java index d322a661b2a..04741a42b52 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderStructureDefinitionDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderStructureDefinitionDstu3.java @@ -19,7 +19,7 @@ import org.hl7.fhir.dstu3.model.StructureDefinition; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderValueSetDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderValueSetDstu3.java index 0d28d7ecf73..75b3e4d646e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderValueSetDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderValueSetDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaConformanceProviderDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaConformanceProviderDstu3.java index d113b8d3a3b..2652680b93b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaConformanceProviderDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaConformanceProviderDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaResourceProviderDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaResourceProviderDstu3.java index e031757ef31..42aec253031 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaResourceProviderDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaResourceProviderDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.dstu3; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,17 +21,28 @@ package ca.uhn.fhir.jpa.provider.dstu3; */ import ca.uhn.fhir.jpa.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.provider.BaseJpaResourceProvider; import ca.uhn.fhir.jpa.model.util.JpaConstants; -import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.jpa.provider.BaseJpaResourceProvider; +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Operation; +import ca.uhn.fhir.rest.annotation.OperationParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.annotation.Validate; import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.ValidationModeEnum; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.BooleanType; +import org.hl7.fhir.dstu3.model.IdType; +import org.hl7.fhir.dstu3.model.IntegerType; +import org.hl7.fhir.dstu3.model.Meta; +import org.hl7.fhir.dstu3.model.Parameters; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -41,6 +52,7 @@ import javax.servlet.http.HttpServletRequest; import static ca.uhn.fhir.jpa.model.util.JpaConstants.OPERATION_META; import static ca.uhn.fhir.jpa.model.util.JpaConstants.OPERATION_META_ADD; import static ca.uhn.fhir.jpa.model.util.JpaConstants.OPERATION_META_DELETE; +import static org.hl7.fhir.convertors.conv30_40.Parameters30_40.convertParameters; public class JpaResourceProviderDstu3 extends BaseJpaResourceProvider { @@ -91,7 +103,7 @@ public class JpaResourceProviderDstu3 extends BaseJpaRes RequestDetails theRequest) { org.hl7.fhir.r4.model.Parameters retVal = super.doExpunge(theIdParam, theLimit, theExpungeDeletedResources, theExpungeOldVersions, null, theRequest); try { - return VersionConvertor_30_40.convertParameters(retVal); + return convertParameters(retVal); } catch (FHIRException e) { throw new InternalErrorException(e); } @@ -107,7 +119,7 @@ public class JpaResourceProviderDstu3 extends BaseJpaRes RequestDetails theRequest) { org.hl7.fhir.r4.model.Parameters retVal = super.doExpunge(null, theLimit, theExpungeDeletedResources, theExpungeOldVersions, null, theRequest); try { - return VersionConvertor_30_40.convertParameters(retVal); + return convertParameters(retVal); } catch (FHIRException e) { throw new InternalErrorException(e); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaSystemProviderDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaSystemProviderDstu3.java index 5643a9623c1..c1f1970a0c1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaSystemProviderDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/JpaSystemProviderDstu3.java @@ -3,17 +3,26 @@ package ca.uhn.fhir.jpa.provider.dstu3; import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl.Suggestion; import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; -import ca.uhn.fhir.jpa.provider.BaseJpaSystemProviderDstu2Plus; import ca.uhn.fhir.jpa.model.util.JpaConstants; +import ca.uhn.fhir.jpa.provider.BaseJpaSystemProviderDstu2Plus; import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Operation; +import ca.uhn.fhir.rest.annotation.OperationParam; +import ca.uhn.fhir.rest.annotation.Transaction; +import ca.uhn.fhir.rest.annotation.TransactionParam; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; -import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.BooleanType; +import org.hl7.fhir.dstu3.model.Bundle; +import org.hl7.fhir.dstu3.model.DecimalType; +import org.hl7.fhir.dstu3.model.IntegerType; +import org.hl7.fhir.dstu3.model.Meta; +import org.hl7.fhir.dstu3.model.Parameters; import org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IIdType; @@ -29,12 +38,13 @@ import java.util.TreeMap; import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.hl7.fhir.convertors.conv30_40.Parameters30_40.convertParameters; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,7 +82,7 @@ public class JpaSystemProviderDstu3 extends BaseJpaSystemProviderDstu2Plus dao = (IFhirResourceDaoCodeSystem) getDao(); - IContextValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); + IValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); result.throwNotFoundIfAppropriate(); return (Parameters) result.toParameters(theRequestDetails.getFhirContext(), theProperties); } finally { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderCompositionR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderCompositionR4.java index ef395292c0d..58016d2bdb2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderCompositionR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderCompositionR4.java @@ -24,7 +24,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderConceptMapR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderConceptMapR4.java index 544670c2a5b..d5c4ffce826 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderConceptMapR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderConceptMapR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderEncounterR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderEncounterR4.java index a84de04ac48..86664f14a6b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderEncounterR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderEncounterR4.java @@ -7,7 +7,7 @@ import org.hl7.fhir.r4.model.*; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderMessageHeaderR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderMessageHeaderR4.java index f4158da734e..6abaf950b83 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderMessageHeaderR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderMessageHeaderR4.java @@ -6,7 +6,7 @@ import org.hl7.fhir.r4.model.MessageHeader; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java index b291c2aa827..b654300b501 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java @@ -29,7 +29,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderStructureDefinitionR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderStructureDefinitionR4.java index f95d890eb96..4cf3ca560ad 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderStructureDefinitionR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderStructureDefinitionR4.java @@ -19,7 +19,7 @@ import org.hl7.fhir.r4.model.StructureDefinition; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderValueSetR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderValueSetR4.java index f7f9f8c2a33..85c10708717 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderValueSetR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderValueSetR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaConformanceProviderR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaConformanceProviderR4.java index ced5735562b..6454b05125f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaConformanceProviderR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaConformanceProviderR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaResourceProviderR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaResourceProviderR4.java index 6d6f60cdf6f..219d8aa5d5e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaResourceProviderR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaResourceProviderR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r4; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaSystemProviderR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaSystemProviderR4.java index bc61881c6e2..c6f4d189335 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaSystemProviderR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/JpaSystemProviderR4.java @@ -31,7 +31,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java index ea68d481789..7dff5abba67 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #L% */ -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.rest.annotation.Operation; @@ -55,7 +55,7 @@ public class BaseJpaResourceProviderCodeSystemR5 extends JpaResourceProviderR5 dao = (IFhirResourceDaoCodeSystem) getDao(); - IContextValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); + IValidationSupport.LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); result.throwNotFoundIfAppropriate(); return (Parameters) result.toParameters(theRequestDetails.getFhirContext(), theProperties); } finally { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCompositionR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCompositionR5.java index 9cb7b13cd66..867e9833ad4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCompositionR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCompositionR5.java @@ -24,7 +24,7 @@ import java.util.List; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderConceptMapR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderConceptMapR5.java index cbfee586ba4..4e31249c355 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderConceptMapR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderConceptMapR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -122,7 +122,7 @@ public class BaseJpaResourceProviderConceptMapR5 extends JpaResourceProviderR5 dao = (IFhirResourceDaoConceptMap) getDao(); TranslationResult result = dao.translate(translationRequest, theRequestDetails); org.hl7.fhir.r4.model.Parameters parameters = result.toParameters(); - return org.hl7.fhir.convertors.conv40_50.Parameters.convertParameters(parameters); + return org.hl7.fhir.convertors.conv40_50.Parameters40_50.convertParameters(parameters); } finally { endRequest(theServletRequest); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderEncounterR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderEncounterR5.java index ae21613a354..40e9d16e8e3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderEncounterR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderEncounterR5.java @@ -20,7 +20,7 @@ import org.hl7.fhir.r5.model.UnsignedIntType; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderMessageHeaderR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderMessageHeaderR5.java index 6c2d8696022..6f5d237619b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderMessageHeaderR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderMessageHeaderR5.java @@ -6,7 +6,7 @@ import org.hl7.fhir.r5.model.MessageHeader; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java index 9bbe26a11c0..4fc2ce3503c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java @@ -29,7 +29,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderStructureDefinitionR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderStructureDefinitionR5.java index c1945fa4a3f..eef88f9a17a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderStructureDefinitionR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderStructureDefinitionR5.java @@ -19,7 +19,7 @@ import org.hl7.fhir.r5.model.StructureDefinition; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderValueSetR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderValueSetR5.java index 6ef5a0fd6ae..addd59aabf1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderValueSetR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderValueSetR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaConformanceProviderR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaConformanceProviderR5.java index 1d65424a338..ba2226b2f8c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaConformanceProviderR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaConformanceProviderR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaResourceProviderR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaResourceProviderR5.java index 3a1ee24bd86..ef86e4f478b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaResourceProviderR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaResourceProviderR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.provider.r5; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,7 @@ public class JpaResourceProviderR5 extends BaseJpaResour RequestDetails theRequest) { org.hl7.fhir.r4.model.Parameters parameters = super.doExpunge(theIdParam, theLimit, theExpungeDeletedResources, theExpungeOldVersions, null, theRequest); - return org.hl7.fhir.convertors.conv40_50.Parameters.convertParameters(parameters); + return org.hl7.fhir.convertors.conv40_50.Parameters40_50.convertParameters(parameters); } @@ -99,7 +99,7 @@ public class JpaResourceProviderR5 extends BaseJpaResour @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) BooleanType theExpungeOldVersions, RequestDetails theRequest) { org.hl7.fhir.r4.model.Parameters parameters = super.doExpunge(null, theLimit, theExpungeDeletedResources, theExpungeOldVersions, null, theRequest); - return org.hl7.fhir.convertors.conv40_50.Parameters.convertParameters(parameters); + return org.hl7.fhir.convertors.conv40_50.Parameters40_50.convertParameters(parameters); } @Operation(name = OPERATION_META, idempotent = true, returnParameters = { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaSystemProviderR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaSystemProviderR5.java index 1c00f2902cf..4a99a931bbe 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaSystemProviderR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/JpaSystemProviderR5.java @@ -31,7 +31,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public class JpaSystemProviderR5 extends BaseJpaSystemProviderDstu2Plus systemDao = myDaoRegistry.getSystemDao(); - PersistedJpaBundleProvider provider = new PersistedJpaBundleProvider(theRequestDetails, theId, systemDao); + PersistedJpaBundleProvider provider = new PersistedJpaBundleProvider(theRequestDetails, theId, systemDao, mySearchBuilderFactory); if (!provider.ensureSearchEntityLoaded()) { return null; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/DeferConceptIndexingInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/DeferConceptIndexingInterceptor.java index c144eec9314..ffb293eb5da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/DeferConceptIndexingInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/DeferConceptIndexingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/ISearchCoordinatorSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/ISearchCoordinatorSvc.java index c22604fc868..c7e983558b1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/ISearchCoordinatorSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/ISearchCoordinatorSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.search; * #L% */ -import ca.uhn.fhir.jpa.dao.IDao; +import ca.uhn.fhir.jpa.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.api.CacheControlDirective; @@ -37,7 +37,7 @@ public interface ISearchCoordinatorSvc { List getResources(String theUuid, int theFrom, int theTo, @Nullable RequestDetails theRequestDetails); - IBundleProvider registerSearch(IDao theCallingDao, SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, @Nullable RequestDetails theRequestDetails); + IBundleProvider registerSearch(IFhirResourceDao theCallingDao, SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, @Nullable RequestDetails theRequestDetails); /** * Fetch the total number of search results for the given currently executing search, if one is currently executing and diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/IStaleSearchDeletingSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/IStaleSearchDeletingSvc.java index cdc9c398804..6c6b82549c2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/IStaleSearchDeletingSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/IStaleSearchDeletingSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/LuceneSearchMappingFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/LuceneSearchMappingFactory.java index 75bb87271c7..6719671c656 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/LuceneSearchMappingFactory.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/LuceneSearchMappingFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java index 75eea399406..b2999af3bde 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,10 @@ import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.dao.IDao; import ca.uhn.fhir.jpa.dao.ISearchBuilder; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.dao.SearchBuilderFactory; import ca.uhn.fhir.jpa.entity.Search; import ca.uhn.fhir.jpa.entity.SearchTypeEnum; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.BaseHasResource; import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable; import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; @@ -60,20 +61,22 @@ public class PersistedJpaBundleProvider implements IBundleProvider { private static final Logger ourLog = LoggerFactory.getLogger(PersistedJpaBundleProvider.class); private final RequestDetails myRequest; private FhirContext myContext; - private IDao myDao; + private final IDao myDao; private EntityManager myEntityManager; private PlatformTransactionManager myPlatformTransactionManager; private ISearchCoordinatorSvc mySearchCoordinatorSvc; private ISearchCacheSvc mySearchCacheSvc; private Search mySearchEntity; - private String myUuid; + private final String myUuid; private boolean myCacheHit; private IInterceptorBroadcaster myInterceptorBroadcaster; + private final SearchBuilderFactory mySearchBuilderFactory; - public PersistedJpaBundleProvider(RequestDetails theRequest, String theSearchUuid, IDao theDao) { + public PersistedJpaBundleProvider(RequestDetails theRequest, String theSearchUuid, IDao theDao, SearchBuilderFactory theSearchBuilderFactory) { myRequest = theRequest; myUuid = theSearchUuid; myDao = theDao; + mySearchBuilderFactory = theSearchBuilderFactory; } /** @@ -170,11 +173,9 @@ public class PersistedJpaBundleProvider implements IBundleProvider { // No resources to fetch (e.g. we did a _summary=count search) return Collections.emptyList(); } - final ISearchBuilder sb = myDao.newSearchBuilder(); - String resourceName = mySearchEntity.getResourceType(); Class resourceType = myContext.getResourceDefinition(resourceName).getImplementingClass(); - sb.setType(resourceType, resourceName); + final ISearchBuilder sb = mySearchBuilderFactory.newSearchBuilder(myDao, resourceName, resourceType); final List pidsSubList = mySearchCoordinatorSvc.getResources(myUuid, theFromIndex, theToIndex, myRequest); @@ -226,10 +227,14 @@ public class PersistedJpaBundleProvider implements IBundleProvider { template.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theStatus) { - ensureSearchEntityLoaded(); + boolean entityLoaded = ensureSearchEntityLoaded(); + assert entityLoaded; } }); + assert mySearchEntity != null; + assert mySearchEntity.getSearchType() != null; + switch (mySearchEntity.getSearchType()) { case HISTORY: return template.execute(theStatus -> doHistoryInTransaction(theFromIndex, theToIndex)); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaSearchFirstPageBundleProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaSearchFirstPageBundleProvider.java index 23a95ae587e..9105001de1f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaSearchFirstPageBundleProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaSearchFirstPageBundleProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,9 @@ package ca.uhn.fhir.jpa.search; import ca.uhn.fhir.jpa.dao.IDao; import ca.uhn.fhir.jpa.dao.ISearchBuilder; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.dao.SearchBuilderFactory; import ca.uhn.fhir.jpa.entity.Search; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.search.SearchStatusEnum; import ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl.SearchTask; import ca.uhn.fhir.model.api.IResource; @@ -50,8 +51,9 @@ public class PersistedJpaSearchFirstPageBundleProvider extends PersistedJpaBundl private Search mySearch; private PlatformTransactionManager myTxManager; - public PersistedJpaSearchFirstPageBundleProvider(Search theSearch, IDao theDao, SearchTask theSearchTask, ISearchBuilder theSearchBuilder, PlatformTransactionManager theTxManager, RequestDetails theRequest) { - super(theRequest, theSearch.getUuid(), theDao); + // TODO KHS too many collaborators. This should be a prototype bean + public PersistedJpaSearchFirstPageBundleProvider(Search theSearch, IDao theDao, SearchBuilderFactory theSearchBuilderFactory, SearchTask theSearchTask, ISearchBuilder theSearchBuilder, PlatformTransactionManager theTxManager, RequestDetails theRequest) { + super(theRequest, theSearch.getUuid(), theDao, theSearchBuilderFactory); setSearchEntity(theSearch); mySearchTask = theSearchTask; mySearchBuilder = theSearchBuilder; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java index 804c739efb9..7125a415277 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,6 +56,9 @@ import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.rest.server.util.ICachedSearchDetails; import ca.uhn.fhir.util.AsyncUtil; import ca.uhn.fhir.util.StopWatch; +import co.elastic.apm.api.ElasticApm; +import co.elastic.apm.api.Span; +import co.elastic.apm.api.Transaction; import com.google.common.annotations.VisibleForTesting; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -97,6 +100,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchCoordinatorSvcImpl.class); public static final String UNIT_TEST_CAPTURE_STACK = "unit_test_capture_stack"; + public static final Integer INTEGER_0 = Integer.valueOf(0); private final ConcurrentHashMap myIdToSearchTask = new ConcurrentHashMap<>(); @Autowired private FhirContext myContext; @@ -120,6 +124,8 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { private DaoRegistry myDaoRegistry; @Autowired private IPagingProvider myPagingProvider; + @Autowired + private SearchBuilderFactory mySearchBuilderFactory; private int mySyncSize = DEFAULT_SYNC_SIZE; /** @@ -279,14 +285,13 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { } @Override - public IBundleProvider registerSearch(final IDao theCallingDao, final SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, RequestDetails theRequestDetails) { + public IBundleProvider registerSearch(final IFhirResourceDao theCallingDao, final SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, RequestDetails theRequestDetails) { final String searchUuid = UUID.randomUUID().toString(); ourLog.debug("Registering new search {}", searchUuid); Class resourceTypeClass = myContext.getResourceDefinition(theResourceType).getImplementingClass(); - final ISearchBuilder sb = theCallingDao.newSearchBuilder(); - sb.setType(resourceTypeClass, theResourceType); + final ISearchBuilder sb = mySearchBuilderFactory.newSearchBuilder(theCallingDao, theResourceType, resourceTypeClass); sb.setFetchSize(mySyncSize); final Integer loadSynchronousUpTo = getLoadSynchronousUpToOrNull(theCacheControlDirective); @@ -368,7 +373,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { myIdToSearchTask.put(search.getUuid(), task); myExecutor.submit(task); - PersistedJpaSearchFirstPageBundleProvider retVal = new PersistedJpaSearchFirstPageBundleProvider(search, theCallingDao, task, theSb, myManagedTxManager, theRequestDetails); + PersistedJpaSearchFirstPageBundleProvider retVal = new PersistedJpaSearchFirstPageBundleProvider(search, theCallingDao, mySearchBuilderFactory, task, theSb, myManagedTxManager, theRequestDetails); populateBundleProvider(retVal); ourLog.debug("Search initial phase completed in {}ms", w.getMillis()); @@ -404,9 +409,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { .addIfMatchesType(ServletRequestDetails.class, theRequestDetails); JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, theRequestDetails, Pointcut.JPA_PERFTRACE_SEARCH_REUSING_CACHED, params); - mySearchCacheSvc.updateSearchLastReturned(searchToUse, new Date()); - - PersistedJpaBundleProvider retVal = new PersistedJpaBundleProvider(theRequestDetails, searchToUse.getUuid(), theCallingDao); + PersistedJpaBundleProvider retVal = new PersistedJpaBundleProvider(theRequestDetails, searchToUse.getUuid(), theCallingDao, mySearchBuilderFactory); retVal.setCacheHit(true); populateBundleProvider(retVal); @@ -565,6 +568,11 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { myInterceptorBroadcaster = theInterceptorBroadcaster; } + @VisibleForTesting + public void setSearchBuilderFactoryForUnitTest(SearchBuilderFactory theSearchBuilderFactory) { + mySearchBuilderFactory = theSearchBuilderFactory; + } + /** * A search task is a Callable task that runs in * a thread pool to handle an individual search. One instance @@ -596,7 +604,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { private List myPreviouslyAddedResourcePids; private Integer myMaxResultsToFetch; private SearchRuntimeDetails mySearchRuntimeDetails; - + private Transaction myParentTransaction; /** * Constructor */ @@ -609,6 +617,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { mySearchRuntimeDetails = new SearchRuntimeDetails(theRequest, mySearch.getUuid()); mySearchRuntimeDetails.setQueryString(theParams.toNormalizedQueryString(theCallingDao.getContext())); myRequest = theRequest; + myParentTransaction = ElasticApm.currentTransaction(); } /** @@ -644,8 +653,7 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { private ISearchBuilder newSearchBuilder() { Class resourceTypeClass = myContext.getResourceDefinition(myResourceType).getImplementingClass(); - ISearchBuilder sb = myCallingDao.newSearchBuilder(); - sb.setType(resourceTypeClass, myResourceType); + ISearchBuilder sb = mySearchBuilderFactory.newSearchBuilder(myCallingDao, myResourceType, resourceTypeClass); return sb; } @@ -770,10 +778,11 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { if (theResultIter.hasNext() == false) { int skippedCount = theResultIter.getSkippedCount(); + int nonSkippedCount = theResultIter.getNonSkippedCount(); int totalFetched = skippedCount + myCountSavedThisPass + myCountBlockedThisPass; ourLog.trace("MaxToFetch[{}] SkippedCount[{}] CountSavedThisPass[{}] CountSavedThisTotal[{}] AdditionalPrefetchRemaining[{}]", myMaxResultsToFetch, skippedCount, myCountSavedThisPass, myCountSavedTotal, myAdditionalPrefetchThresholdsRemaining); - if (myMaxResultsToFetch != null && totalFetched < myMaxResultsToFetch) { + if (nonSkippedCount == 0 || (myMaxResultsToFetch != null && totalFetched < myMaxResultsToFetch)) { ourLog.trace("Setting search status to FINISHED"); mySearch.setStatus(SearchStatusEnum.FINISHED); mySearch.setTotalCount(myCountSavedTotal); @@ -836,7 +845,8 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { @Override public Void call() { StopWatch sw = new StopWatch(); - + Span span = myParentTransaction.startSpan("db", "query", "search"); + span.setName("FHIR Database Search"); try { // Create an initial search in the DB and give it an ID saveSearch(); @@ -892,7 +902,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { ourLog.error("Failed during search loading after {}ms", sw.getMillis(), t); } myUnsyncedPids.clear(); - Throwable rootCause = ExceptionUtils.getRootCause(t); rootCause = defaultIfNull(rootCause, t); @@ -919,12 +928,13 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, myRequest, Pointcut.JPA_PERFTRACE_SEARCH_FAILED, params); saveSearch(); - + span.captureException(t); } finally { myIdToSearchTask.remove(mySearch.getUuid()); myInitialCollectionLatch.countDown(); markComplete(); + span.end(); } return null; @@ -957,7 +967,9 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { * * before doing anything else. */ - boolean wantOnlyCount = SummaryEnum.COUNT.equals(myParams.getSummaryMode()); + boolean wantOnlyCount = + SummaryEnum.COUNT.equals(myParams.getSummaryMode()) + | INTEGER_0.equals(myParams.getCount()); boolean wantCount = wantOnlyCount || SearchTotalModeEnum.ACCURATE.equals(myParams.getSearchTotalMode()) || @@ -1134,7 +1146,6 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { theSearch.setDeleted(false); theSearch.setUuid(theSearchUuid); theSearch.setCreated(new Date()); - theSearch.setSearchLastReturned(new Date()); theSearch.setTotalCount(null); theSearch.setNumFound(0); theSearch.setPreferredPageSize(theParams.getCount()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java index 1f19823e2c6..4f22d98f8f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.PostConstruct; -import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.DEFAULT_CUTOFF_SLACK; +import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLEANUP_JOB_INTERVAL_MILLIS; /** * Deletes old searches @@ -62,7 +62,7 @@ public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleClusteredJob(DEFAULT_CUTOFF_SLACK, jobDetail); + mySchedulerService.scheduleClusteredJob(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS, jobDetail); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/WarmSearchDefinition.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/WarmSearchDefinition.java index 729584e7654..cb5806fcb5f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/WarmSearchDefinition.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/WarmSearchDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/BaseSearchCacheSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/BaseSearchCacheSvcImpl.java deleted file mode 100644 index f9bdf94df79..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/BaseSearchCacheSvcImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package ca.uhn.fhir.jpa.search.cache; - -/*- - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.jpa.entity.Search; -import ca.uhn.fhir.jpa.model.sched.HapiJob; -import ca.uhn.fhir.jpa.model.sched.ISchedulerService; -import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; -import org.apache.commons.lang3.time.DateUtils; -import org.quartz.JobExecutionContext; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.support.TransactionTemplate; - -import javax.annotation.PostConstruct; -import java.util.Date; -import java.util.Iterator; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -public abstract class BaseSearchCacheSvcImpl implements ISearchCacheSvc { - - @Autowired - private PlatformTransactionManager myTxManager; - @Autowired - private ISchedulerService mySchedulerService; - - private ConcurrentHashMap myUnsyncedLastUpdated = new ConcurrentHashMap<>(); - - @Override - public void updateSearchLastReturned(Search theSearch, Date theDate) { - myUnsyncedLastUpdated.put(theSearch.getId(), theDate); - } - - @PostConstruct - public void scheduleJob() { - ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); - jobDetail.setId(getClass().getName()); - jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); - } - - @Override - public void flushLastUpdated() { - TransactionTemplate txTemplate = new TransactionTemplate(myTxManager); - txTemplate.execute(t -> { - for (Iterator> iter = myUnsyncedLastUpdated.entrySet().iterator(); iter.hasNext(); ) { - Map.Entry next = iter.next(); - flushLastUpdated(next.getKey(), next.getValue()); - iter.remove(); - } - return null; - }); - } - - protected abstract void flushLastUpdated(Long theSearchId, Date theLastUpdated); - - public static class Job implements HapiJob { - @Autowired - private ISearchCacheSvc myTarget; - - @Override - public void execute(JobExecutionContext theContext) { - myTarget.flushLastUpdated(); - } - } - - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchCacheSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchCacheSvcImpl.java index 5bf82275086..8e6b48e81f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchCacheSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchCacheSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.cache; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ import java.util.Date; import java.util.List; import java.util.Optional; -public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { +public class DatabaseSearchCacheSvcImpl implements ISearchCacheSvc { /* * Be careful increasing this number! We use the number of params here in a * DELETE FROM foo WHERE params IN (term,term,term...) @@ -55,18 +55,19 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { */ public static final int DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_STMT = 500; public static final int DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_PAS = 20000; - public static final long DEFAULT_CUTOFF_SLACK = 10 * DateUtils.MILLIS_PER_SECOND; + public static final long SEARCH_CLEANUP_JOB_INTERVAL_MILLIS = 10 * DateUtils.MILLIS_PER_SECOND; + public static final int DEFAULT_MAX_DELETE_CANDIDATES_TO_FIND = 2000; private static final Logger ourLog = LoggerFactory.getLogger(DatabaseSearchCacheSvcImpl.class); private static int ourMaximumResultsToDeleteInOneStatement = DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_STMT; private static int ourMaximumResultsToDeleteInOnePass = DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_PAS; + private static int ourMaximumSearchesToCheckForDeletionCandidacy = DEFAULT_MAX_DELETE_CANDIDATES_TO_FIND; private static Long ourNowForUnitTests; /* * We give a bit of extra leeway just to avoid race conditions where a query result * is being reused (because a new client request came in with the same params) right before * the result is to be deleted */ - private long myCutoffSlack = DEFAULT_CUTOFF_SLACK; - + private long myCutoffSlack = SEARCH_CLEANUP_JOB_INTERVAL_MILLIS; @Autowired private ISearchDao mySearchDao; @Autowired @@ -105,7 +106,6 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { return mySearchDao.findByUuidAndFetchIncludes(theUuid); } - void setSearchDaoForUnitTest(ISearchDao theSearchDao) { mySearchDao = theSearchDao; } @@ -146,11 +146,6 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { } - @Override - protected void flushLastUpdated(Long theSearchId, Date theLastUpdated) { - mySearchDao.updateSearchLastReturned(theSearchId, theLastUpdated); - } - @Transactional(Transactional.TxType.NEVER) @Override public void pollForStaleSearchesAndDeleteThem() { @@ -160,7 +155,7 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { long cutoffMillis = myDaoConfig.getExpireSearchResultsAfterMillis(); if (myDaoConfig.getReuseCachedSearchResultsForMillis() != null) { - cutoffMillis = Math.max(cutoffMillis, myDaoConfig.getReuseCachedSearchResultsForMillis()); + cutoffMillis = cutoffMillis + myDaoConfig.getReuseCachedSearchResultsForMillis(); } final Date cutoff = new Date((now() - cutoffMillis) - myCutoffSlack); @@ -171,18 +166,27 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { ourLog.debug("Searching for searches which are before {}", cutoff); TransactionTemplate tt = new TransactionTemplate(myTxManager); - final Slice toDelete = tt.execute(theStatus -> - mySearchDao.findWhereLastReturnedBefore(cutoff, new Date(), PageRequest.of(0, 2000)) - ); - assert toDelete != null; - for (final Long nextSearchToDelete : toDelete) { + // Mark searches as deleted if they should be + final Slice toMarkDeleted = tt.execute(theStatus -> + mySearchDao.findWhereCreatedBefore(cutoff, new Date(), PageRequest.of(0, ourMaximumSearchesToCheckForDeletionCandidacy)) + ); + assert toMarkDeleted != null; + for (final Long nextSearchToDelete : toMarkDeleted) { ourLog.debug("Deleting search with PID {}", nextSearchToDelete); tt.execute(t -> { mySearchDao.updateDeleted(nextSearchToDelete, true); return null; }); + } + // Delete searches that are marked as deleted + final Slice toDelete = tt.execute(theStatus -> + mySearchDao.findDeleted(PageRequest.of(0, ourMaximumSearchesToCheckForDeletionCandidacy)) + ); + assert toDelete != null; + for (final Long nextSearchToDelete : toDelete) { + ourLog.debug("Deleting search with PID {}", nextSearchToDelete); tt.execute(t -> { deleteSearch(nextSearchToDelete); return null; @@ -198,7 +202,6 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { } } - private void deleteSearch(final Long theSearchPid) { mySearchDao.findById(theSearchPid).ifPresent(searchToDelete -> { mySearchIncludeDao.deleteForSearch(searchToDelete.getId()); @@ -223,7 +226,7 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { // Only delete if we don't have results left in this search if (resultPids.getNumberOfElements() < max) { - ourLog.debug("Deleting search {}/{} - Created[{}] -- Last returned[{}]", searchToDelete.getId(), searchToDelete.getUuid(), new InstantType(searchToDelete.getCreated()), new InstantType(searchToDelete.getSearchLastReturned())); + ourLog.debug("Deleting search {}/{} - Created[{}]", searchToDelete.getId(), searchToDelete.getUuid(), new InstantType(searchToDelete.getCreated())); mySearchDao.deleteByPid(searchToDelete.getId()); } else { ourLog.debug("Purged {} search results for deleted search {}/{}", resultPids.getSize(), searchToDelete.getId(), searchToDelete.getUuid()); @@ -231,6 +234,11 @@ public class DatabaseSearchCacheSvcImpl extends BaseSearchCacheSvcImpl { }); } + @VisibleForTesting + public static void setMaximumSearchesToCheckForDeletionCandidacyForUnitTest(int theMaximumSearchesToCheckForDeletionCandidacy) { + ourMaximumSearchesToCheckForDeletionCandidacy = theMaximumSearchesToCheckForDeletionCandidacy; + } + @VisibleForTesting public static void setMaximumResultsToDeleteInOnePassForUnitTest(int theMaximumResultsToDeleteInOnePass) { ourMaximumResultsToDeleteInOnePass = theMaximumResultsToDeleteInOnePass; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchResultCacheSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchResultCacheSvcImpl.java index 084b6eb9493..35f83842794 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchResultCacheSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/DatabaseSearchResultCacheSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.cache; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchCacheSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchCacheSvc.java index 13e14a189f6..82b35d526e2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchCacheSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchCacheSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.cache; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,20 +78,6 @@ public interface ISearchCacheSvc { */ Collection findCandidatesForReuse(String theResourceType, String theQueryString, int theQueryStringHash, Date theCreatedAfter); - /** - * Mark a search as having been "last used" at the given time. This method may (and probably should) be implemented - * to work asynchronously in order to avoid hammering the database if the search gets reused many times. - * - * @param theSearch The search - * @param theDate The "last returned" timestamp - */ - void updateSearchLastReturned(Search theSearch, Date theDate); - - /** - * This is mostly public for unit tests - */ - void flushLastUpdated(); - /** * This method will be called periodically to delete stale searches. Implementations are not required to do anything * if they have some other mechanism for expiring stale results other than manually looking for them diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchResultCacheSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchResultCacheSvc.java index 7340d5b7b7d..fc86ee36049 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchResultCacheSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/cache/ISearchResultCacheSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.cache; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java index 5f4fe3de927..4195fafa609 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.elastic; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchMappingProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchMappingProvider.java index adf053bf692..04407e5918b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchMappingProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchMappingProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.elastic; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/IResourceReindexingSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/IResourceReindexingSvc.java index cbf0f640fde..c887a67e3e2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/IResourceReindexingSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/IResourceReindexingSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.reindex; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java index deb7ab62ef1..1ab70ed5df4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.reindex; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java index 84c6df873c4..5d8364a361f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.warm; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/ICacheWarmingSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/ICacheWarmingSvc.java index ab1dd8fe1bb..ffc7afb5606 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/ICacheWarmingSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/ICacheWarmingSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.warm; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/WarmCacheEntry.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/WarmCacheEntry.java index ea65c6a5315..d690770c360 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/WarmCacheEntry.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/WarmCacheEntry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.search.warm; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/ISearchParamPresenceSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/ISearchParamPresenceSvc.java index 0a41c3ea5ed..a27cd22eaa4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/ISearchParamPresenceSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/ISearchParamPresenceSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.sp; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/SearchParamPresenceSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/SearchParamPresenceSvcImpl.java index 576fee739fc..925808c3b34 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/SearchParamPresenceSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/sp/SearchParamPresenceSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.sp; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/DaoResourceRetriever.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/DaoResourceRetriever.java index 2cda6bfa57c..c4f5dcea4d4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/DaoResourceRetriever.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/DaoResourceRetriever.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/IResourceModifiedConsumer.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/IResourceModifiedConsumer.java index 729908ba75c..40924bdfbf0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/IResourceModifiedConsumer.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/IResourceModifiedConsumer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ISubscriptionTriggeringSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ISubscriptionTriggeringSvc.java index 33381da2c01..3fdbfd869a0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ISubscriptionTriggeringSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ISubscriptionTriggeringSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionActivatingInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionActivatingInterceptor.java index 0daedc734df..421c5b195d5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionActivatingInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionActivatingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java index e8c64dc5929..ba75e082ee9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionMatcherInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionMatcherInterceptor.java index 92d2e553fa4..7f20e410e30 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionMatcherInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionMatcherInterceptor.java @@ -27,7 +27,7 @@ import javax.annotation.PreDestroy; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java index ab0d21cbdf7..49506449095 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,7 +66,13 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.UUID; -import java.util.concurrent.*; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.RejectedExecutionHandler; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider.RESOURCE_ID; @@ -136,8 +142,8 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc SubscriptionTriggeringJobDetails jobDetails = new SubscriptionTriggeringJobDetails(); jobDetails.setJobId(UUID.randomUUID().toString()); - jobDetails.setRemainingResourceIds(resourceIds.stream().map(t->t.getValue()).collect(Collectors.toList())); - jobDetails.setRemainingSearchUrls(searchUrls.stream().map(t->t.getValue()).collect(Collectors.toList())); + jobDetails.setRemainingResourceIds(resourceIds.stream().map(t -> t.getValue()).collect(Collectors.toList())); + jobDetails.setRemainingSearchUrls(searchUrls.stream().map(t -> t.getValue()).collect(Collectors.toList())); if (theSubscriptionId != null) { jobDetails.setSubscriptionId(theSubscriptionId.getIdPart()); } @@ -386,7 +392,13 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(DateUtils.MILLIS_PER_SECOND, jobDetail); + // Currently jobs ae kept in a local ArrayList so this should be a local job, and + // it can fire frequently without adding load + mySchedulerService.scheduleLocalJob(5 * DateUtils.MILLIS_PER_SECOND, jobDetail); + } + + public int getActiveJobCount() { + return myActiveJobs.size(); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbcache/DaoSubscriptionProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbcache/DaoSubscriptionProvider.java index adc49ef21d3..6931bfd99e9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbcache/DaoSubscriptionProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbcache/DaoSubscriptionProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.dbcache; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/CompositeInMemoryDaoSubscriptionMatcher.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/CompositeInMemoryDaoSubscriptionMatcher.java index 32c1be14a38..6d885a07416 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/CompositeInMemoryDaoSubscriptionMatcher.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/CompositeInMemoryDaoSubscriptionMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.dbmatcher; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java index d81be96328e..b8bcb6dd972 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.dbmatcher; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java index 7aa359816c7..2704aad4bf0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermReadSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,15 @@ package ca.uhn.fhir.jpa.term; */ import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.context.support.IContextValidationSupport; -import ca.uhn.fhir.jpa.dao.*; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.DaoRegistry; +import ca.uhn.fhir.jpa.dao.IDao; +import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; +import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; import ca.uhn.fhir.jpa.dao.data.*; import ca.uhn.fhir.jpa.entity.*; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum; @@ -42,11 +47,13 @@ import ca.uhn.fhir.jpa.util.ScrollableResultsIterator; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.util.UrlUtil; import ca.uhn.fhir.util.ValidateUtil; +import ca.uhn.fhir.util.VersionIndependentConcept; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import com.google.common.annotations.VisibleForTesting; @@ -56,7 +63,11 @@ import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.time.DateUtils; import org.apache.lucene.index.Term; import org.apache.lucene.queries.TermsQuery; -import org.apache.lucene.search.*; +import org.apache.lucene.search.BooleanClause; +import org.apache.lucene.search.BooleanQuery; +import org.apache.lucene.search.Query; +import org.apache.lucene.search.RegexpQuery; +import org.apache.lucene.search.TermQuery; import org.hibernate.ScrollMode; import org.hibernate.ScrollableResults; import org.hibernate.search.jpa.FullTextEntityManager; @@ -70,11 +81,10 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.codesystems.ConceptSubsumptionOutcome; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.quartz.JobExecutionContext; -import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; import org.springframework.transaction.PlatformTransactionManager; @@ -92,20 +102,26 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; import javax.persistence.TypedQuery; -import javax.persistence.criteria.*; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; import javax.validation.constraints.NotNull; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNoneBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; -public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationContextAware { +public abstract class BaseTermReadSvcImpl implements ITermReadSvc { public static final int DEFAULT_FETCH_SIZE = 250; - public static final String VALUESET_LANGUAGES = "http://hl7.org/fhir/ValueSet/languages"; - public static final String VALUESET_MIMETYPES = "http://hl7.org/fhir/ValueSet/mimetypes"; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseTermReadSvcImpl.class); + private static final ValueSetExpansionOptions DEFAULT_EXPANSION_OPTIONS = new ValueSetExpansionOptions(); private static boolean ourLastResultsFromTranslationCache; // For testing. private static boolean ourLastResultsFromTranslationWithReverseCache; // For testing. @Autowired @@ -140,11 +156,9 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo private ITermCodeSystemVersionDao myCodeSystemVersionDao; @Autowired private DaoConfig myDaoConfig; - private IFhirResourceDaoValueSet myValueSetResourceDao; private Cache> myTranslationCache; private Cache> myTranslationWithReverseCache; private int myFetchSize = DEFAULT_FETCH_SIZE; - private ApplicationContext myApplicationContext; private TransactionTemplate myTxTemplate; @Autowired private PlatformTransactionManager myTransactionManager; @@ -160,7 +174,15 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo private ITermDeferredStorageSvc myDeferredStorageSvc; @Autowired(required = false) private ITermCodeSystemStorageSvc myConceptStorageSvc; - private IContextValidationSupport myValidationSupport; + @Autowired + private ApplicationContext myApplicationContext; + private volatile IValidationSupport myJpaValidationSupport; + private volatile IValidationSupport myValidationSupport; + + @Override + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + return supportsSystem(theSystem); + } private void addCodeIfNotAlreadyAdded(IValueSetConceptAccumulator theValueSetCodeAccumulator, Set theAddedCodes, TermConcept theConcept, boolean theAdd, AtomicInteger theCodeCounter) { String codeSystem = theConcept.getCodeSystemVersion().getCodeSystem().getCodeSystemUri(); @@ -277,9 +299,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo deleteValueSet(theResourceTable); } - @Override - @Transactional(propagation = Propagation.REQUIRED) - public ValueSet expandValueSetInMemory(ValueSet theValueSetToExpand, VersionIndependentConcept theWantConceptOrNull) { + private ValueSet expandValueSetInMemory(ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand, VersionIndependentConcept theWantConceptOrNull) { int maxCapacity = myDaoConfig.getMaximumExpansionSize(); ValueSetExpansionComponentWithConceptAccumulator expansionComponent = new ValueSetExpansionComponentWithConceptAccumulator(myContext, maxCapacity); @@ -288,7 +308,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo AtomicInteger codeCounter = new AtomicInteger(0); - expandValueSet(theValueSetToExpand, expansionComponent, codeCounter, theWantConceptOrNull); + expandValueSet(theExpansionOptions, theValueSetToExpand, expansionComponent, codeCounter, theWantConceptOrNull); expansionComponent.setTotal(codeCounter.get()); @@ -299,24 +319,33 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return valueSet; } + @Override + public List expandValueSet(ValueSetExpansionOptions theExpansionOptions, String theValueSet) { + // TODO: DM 2019-09-10 - This is problematic because an incorrect URL that matches ValueSet.id will not be found in the terminology tables but will yield a ValueSet here. Depending on the ValueSet, the expansion may time-out. + + ValueSet valueSet = fetchCanonicalValueSetFromCompleteContext(theValueSet); + if (valueSet == null) { + throwInvalidValueSet(theValueSet); + } + + return expandValueSetAndReturnVersionIndependentConcepts(theExpansionOptions, valueSet, null); + } + @Override @Transactional(propagation = Propagation.REQUIRED) - public ValueSet expandValueSet(ValueSet theValueSetToExpand, int theOffset, int theCount) { + public ValueSet expandValueSet(ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand) { ValidateUtil.isNotNullOrThrowUnprocessableEntity(theValueSetToExpand, "ValueSet to expand can not be null"); Optional optionalTermValueSet; - if (theValueSetToExpand.hasId()) { - ResourcePersistentId valueSetResourcePid = myConceptStorageSvc.getValueSetResourcePid(theValueSetToExpand.getIdElement()); - optionalTermValueSet = myValueSetDao.findByResourcePid(valueSetResourcePid.getIdAsLong()); - } else if (theValueSetToExpand.hasUrl()) { + if (theValueSetToExpand.hasUrl()) { optionalTermValueSet = myValueSetDao.findByUrl(theValueSetToExpand.getUrl()); } else { - throw new UnprocessableEntityException("ValueSet to be expanded must provide either ValueSet.id or ValueSet.url"); + optionalTermValueSet = Optional.empty(); } if (!optionalTermValueSet.isPresent()) { - ourLog.warn("ValueSet is not present in terminology tables. Will perform in-memory expansion without parameters. {}", getValueSetInfo(theValueSetToExpand)); - return expandValueSetInMemory(theValueSetToExpand, null); // In-memory expansion. + ourLog.debug("ValueSet is not present in terminology tables. Will perform in-memory expansion without parameters. {}", getValueSetInfo(theValueSetToExpand)); + return expandValueSetInMemory(theExpansionOptions, theValueSetToExpand, null); // In-memory expansion. } TermValueSet termValueSet = optionalTermValueSet.get(); @@ -324,14 +353,17 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo if (termValueSet.getExpansionStatus() != TermValueSetPreExpansionStatusEnum.EXPANDED) { ourLog.warn("{} is present in terminology tables but not ready for persistence-backed invocation of operation $expand. Will perform in-memory expansion without parameters. Current status: {} | {}", getValueSetInfo(theValueSetToExpand), termValueSet.getExpansionStatus().name(), termValueSet.getExpansionStatus().getDescription()); - return expandValueSetInMemory(theValueSetToExpand, null); // In-memory expansion. + return expandValueSetInMemory(theExpansionOptions, theValueSetToExpand, null); // In-memory expansion. } ValueSet.ValueSetExpansionComponent expansionComponent = new ValueSet.ValueSetExpansionComponent(); expansionComponent.setIdentifier(UUID.randomUUID().toString()); expansionComponent.setTimestamp(new Date()); - populateExpansionComponent(expansionComponent, termValueSet, theOffset, theCount); + ValueSetExpansionOptions expansionOptions = provideExpansionOptions(theExpansionOptions); + int offset = expansionOptions.getOffset(); + int count = expansionOptions.getCount(); + populateExpansionComponent(expansionComponent, termValueSet, offset, count); ValueSet valueSet = new ValueSet(); valueSet.setStatus(Enumerations.PublicationStatus.ACTIVE); @@ -419,12 +451,12 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo @Override @Transactional(propagation = Propagation.REQUIRED) - public void expandValueSet(ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { - expandValueSet(theValueSetToExpand, theValueSetCodeAccumulator, new AtomicInteger(0), null); + public void expandValueSet(ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { + expandValueSet(theExpansionOptions, theValueSetToExpand, theValueSetCodeAccumulator, new AtomicInteger(0), null); } @SuppressWarnings("ConstantConditions") - private void expandValueSet(ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator, AtomicInteger theCodeCounter, VersionIndependentConcept theWantConceptOrNull) { + private void expandValueSet(ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator, AtomicInteger theCodeCounter, VersionIndependentConcept theWantConceptOrNull) { Set addedCodes = new HashSet<>(); StopWatch sw = new StopWatch(); @@ -438,7 +470,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo int queryIndex = i; Boolean shouldContinue = myTxTemplate.execute(t -> { boolean add = true; - return expandValueSetHandleIncludeOrExclude(theValueSetCodeAccumulator, addedCodes, include, add, theCodeCounter, queryIndex, theWantConceptOrNull); + return expandValueSetHandleIncludeOrExclude(theExpansionOptions, theValueSetCodeAccumulator, addedCodes, include, add, theCodeCounter, queryIndex, theWantConceptOrNull); }); if (!shouldContinue) { break; @@ -459,7 +491,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo int queryIndex = i; Boolean shouldContinue = myTxTemplate.execute(t -> { boolean add = false; - return expandValueSetHandleIncludeOrExclude(theValueSetCodeAccumulator, addedCodes, exclude, add, theCodeCounter, queryIndex, null); + return expandValueSetHandleIncludeOrExclude(theExpansionOptions, theValueSetCodeAccumulator, addedCodes, exclude, add, theCodeCounter, queryIndex, null); }); if (!shouldContinue) { break; @@ -510,13 +542,12 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return sb.toString(); } - protected List expandValueSetAndReturnVersionIndependentConcepts(org.hl7.fhir.r4.model.ValueSet theValueSetToExpandR4, VersionIndependentConcept theWantConceptOrNull) { - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent expandedR4 = expandValueSetInMemory(theValueSetToExpandR4, theWantConceptOrNull).getExpansion(); + protected List expandValueSetAndReturnVersionIndependentConcepts(ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpandR4, VersionIndependentConcept theWantConceptOrNull) { + org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent expandedR4 = expandValueSetInMemory(theExpansionOptions, theValueSetToExpandR4, theWantConceptOrNull).getExpansion(); ArrayList retVal = new ArrayList<>(); for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent nextContains : expandedR4.getContains()) { - retVal.add( - new VersionIndependentConcept(nextContains.getSystem(), nextContains.getCode())); + retVal.add(new VersionIndependentConcept(nextContains.getSystem(), nextContains.getCode(), nextContains.getDisplay())); } return retVal; } @@ -524,7 +555,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo /** * @return Returns true if there are potentially more results to process. */ - private Boolean expandValueSetHandleIncludeOrExclude(IValueSetConceptAccumulator theValueSetCodeAccumulator, Set theAddedCodes, ValueSet.ConceptSetComponent theIncludeOrExclude, boolean theAdd, AtomicInteger theCodeCounter, int theQueryIndex, VersionIndependentConcept theWantConceptOrNull) { + private Boolean expandValueSetHandleIncludeOrExclude(@Nullable ValueSetExpansionOptions theExpansionOptions, IValueSetConceptAccumulator theValueSetCodeAccumulator, Set theAddedCodes, ValueSet.ConceptSetComponent theIncludeOrExclude, boolean theAdd, AtomicInteger theCodeCounter, int theQueryIndex, VersionIndependentConcept theWantConceptOrNull) { String system = theIncludeOrExclude.getSystem(); boolean hasSystem = isNotBlank(system); @@ -532,7 +563,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo if (hasSystem) { - if (theWantConceptOrNull != null && theWantConceptOrNull.getSystem() != null && !Constants.codeSystemNotNeeded(theWantConceptOrNull.getSystem()) && !system.equals(theWantConceptOrNull.getSystem())) { + if (theWantConceptOrNull != null && theWantConceptOrNull.getSystem() != null && !system.equals(theWantConceptOrNull.getSystem())) { return false; } @@ -584,11 +615,16 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo .map(t -> new Term("myCode", t)) .collect(Collectors.toList()); if (codes.size() > 0) { - MultiPhraseQuery query = new MultiPhraseQuery(); - query.add(codes.toArray(new Term[0])); + + BooleanQuery.Builder builder = new BooleanQuery.Builder(); + builder.setMinimumNumberShouldMatch(1); + for (Term nextCode : codes) { + builder.add(new TermQuery(nextCode), BooleanClause.Occur.SHOULD); + } + luceneQuery = new BooleanQuery.Builder() .add(luceneQuery, BooleanClause.Occur.MUST) - .add(query, BooleanClause.Occur.MUST) + .add(builder.build(), BooleanClause.Occur.MUST) .build(); } @@ -656,7 +692,17 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo } else { // No CodeSystem matching the URL found in the database. - CodeSystem codeSystemFromContext = getCodeSystemFromContext(system); + CodeSystem codeSystemFromContext = fetchCanonicalCodeSystemFromCompleteContext(system); + if (codeSystemFromContext == null) { + String msg = myContext.getLocalizer().getMessage(BaseTermReadSvcImpl.class, "expansionRefersToUnknownCs", system); + if (provideExpansionOptions(theExpansionOptions).isFailOnMissingCodeSystem()) { + throw new PreconditionFailedException(msg); + } else { + ourLog.warn(msg); + theValueSetCodeAccumulator.addMessage(msg); + return false; + } + } if (!theIncludeOrExclude.getConcept().isEmpty()) { for (ValueSet.ConceptReferenceComponent next : theIncludeOrExclude.getConcept()) { @@ -664,30 +710,16 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo if (theWantConceptOrNull == null || theWantConceptOrNull.getCode().equals(nextCode)) { if (isNoneBlank(system, nextCode) && !theAddedCodes.contains(system + "|" + nextCode)) { - if (codeSystemFromContext != null) { - CodeSystem.ConceptDefinitionComponent code = findCode(codeSystemFromContext.getConcept(), nextCode); - if (code != null) { - String display = code.getDisplay(); - addOrRemoveCode(theValueSetCodeAccumulator, theAddedCodes, theAdd, system, nextCode, display); - } - } else { - - // This code just plain doesn't exist in any known codesystem, but the valueset - // explicitly includes it. We'll trust the valueset in this case. This happens for - // codesytems such a USPS. There is probably a better way to handle this... - addOrRemoveCode(theValueSetCodeAccumulator, theAddedCodes, theAdd, system, nextCode, null); + CodeSystem.ConceptDefinitionComponent code = findCode(codeSystemFromContext.getConcept(), nextCode); + if (code != null) { + String display = code.getDisplay(); + addOrRemoveCode(theValueSetCodeAccumulator, theAddedCodes, theAdd, system, nextCode, display); } + } } } } else { - if (codeSystemFromContext == null) { - String msg = myContext.getLocalizer().getMessage(BaseTermReadSvcImpl.class, "expansionRefersToUnknownCs", system); - ourLog.warn(msg); - theValueSetCodeAccumulator.addMessage(msg); - return false; - } - List concept = codeSystemFromContext.getConcept(); addConceptsToList(theValueSetCodeAccumulator, theAddedCodes, system, concept, theAdd, theWantConceptOrNull); } @@ -699,7 +731,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo for (CanonicalType nextValueSet : theIncludeOrExclude.getValueSet()) { ourLog.debug("Starting {} expansion around ValueSet: {}", (theAdd ? "inclusion" : "exclusion"), nextValueSet.getValueAsString()); - List expanded = expandValueSet(nextValueSet.getValueAsString()); + List expanded = expandValueSet(theExpansionOptions, nextValueSet.getValueAsString()); Map uriToCodeSystem = new HashMap<>(); for (VersionIndependentConcept nextConcept : expanded) { @@ -721,7 +753,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo // This will happen if we're expanding against a built-in (part of FHIR) ValueSet that // isn't actually in the database anywhere Collection emptyCollection = Collections.emptyList(); - addCodeIfNotAlreadyAdded(theValueSetCodeAccumulator, theAddedCodes, emptyCollection, theAdd, theCodeCounter, nextConcept.getSystem(), nextConcept.getCode(), null); + addCodeIfNotAlreadyAdded(theValueSetCodeAccumulator, theAddedCodes, emptyCollection, theAdd, theCodeCounter, nextConcept.getSystem(), nextConcept.getCode(), nextConcept.getDisplay()); } } if (isNoneBlank(nextConcept.getSystem(), nextConcept.getCode()) && !theAdd && theAddedCodes.remove(nextConcept.getSystem() + "|" + nextConcept.getCode())) { @@ -740,6 +772,15 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo } + private @Nonnull + ValueSetExpansionOptions provideExpansionOptions(@Nullable ValueSetExpansionOptions theExpansionOptions) { + if (theExpansionOptions != null) { + return theExpansionOptions; + } else { + return DEFAULT_EXPANSION_OPTIONS; + } + } + private void addOrRemoveCode(IValueSetConceptAccumulator theValueSetCodeAccumulator, Set theAddedCodes, boolean theAdd, String theSystem, String theCode, String theDisplay) { if (theAdd && theAddedCodes.add(theSystem + "|" + theCode)) { theValueSetCodeAccumulator.includeConcept(theSystem, theCode, theDisplay); @@ -1056,9 +1097,11 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo private void expandWithoutHibernateSearch(IValueSetConceptAccumulator theValueSetCodeAccumulator, TermCodeSystemVersion theVersion, Set theAddedCodes, ValueSet.ConceptSetComponent theInclude, String theSystem, boolean theAdd, AtomicInteger theCodeCounter) { ourLog.trace("Hibernate search is not enabled"); + if (theValueSetCodeAccumulator instanceof ValueSetExpansionComponentWithConceptAccumulator) { Validate.isTrue(((ValueSetExpansionComponentWithConceptAccumulator) theValueSetCodeAccumulator).getParameter().isEmpty(), "Can not expand ValueSet with parameters - Hibernate Search is not enabled on this server."); } + Validate.isTrue(theInclude.getFilter().isEmpty(), "Can not expand ValueSet with filters - Hibernate Search is not enabled on this server."); Validate.isTrue(isNotBlank(theSystem), "Can not expand ValueSet without explicit system - Hibernate Search is not enabled on this server."); @@ -1070,7 +1113,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo } for (ValueSet.ConceptReferenceComponent next : theInclude.getConcept()) { - if (!theSystem.equals(theInclude.getSystem()) && !Constants.codeSystemNotNeeded(theSystem)) { + if (!theSystem.equals(theInclude.getSystem()) && isNotBlank(theSystem)) { continue; } addCodeIfNotAlreadyAdded(theValueSetCodeAccumulator, theAddedCodes, null, theAdd, theCodeCounter, theSystem, next.getCode(), next.getDisplay()); @@ -1101,6 +1144,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo } protected ValidateCodeResult validateCodeIsInPreExpandedValueSet( + ValidationOptions theValidationOptions, ValueSet theValueSet, String theSystem, String theCode, String theDisplay, Coding theCoding, CodeableConcept theCodeableConcept) { ValidateUtil.isNotNullOrThrowUnprocessableEntity(theValueSet.hasId(), "ValueSet.id is required"); @@ -1108,7 +1152,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo List concepts = new ArrayList<>(); if (isNotBlank(theCode)) { - if (Constants.codeSystemNotNeeded(theSystem)) { + if (theValidationOptions.isGuessSystem()) { concepts.addAll(myValueSetConceptDao.findByValueSetResourcePidAndCode(valueSetResourcePid.getIdAsLong(), theCode)); } else if (isNotBlank(theSystem)) { concepts.addAll(findByValueSetResourcePidSystemAndCode(valueSetResourcePid, theSystem, theCode)); @@ -1222,6 +1266,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return retVal; } + @Transactional @Override public List findCodesAbove(String theSystem, String theCode) { TermCodeSystem cs = getCodeSystem(theSystem); @@ -1253,6 +1298,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return retVal; } + @Transactional @Override public List findCodesBelow(String theSystem, String theCode) { TermCodeSystem cs = getCodeSystem(theSystem); @@ -1269,17 +1315,8 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return myCodeSystemDao.findByCodeSystemUri(theSystem); } - @Override - public void setApplicationContext(ApplicationContext theApplicationContext) throws BeansException { - myApplicationContext = theApplicationContext; - } - @PostConstruct public void start() { - myValueSetResourceDao = myApplicationContext.getBean(IFhirResourceDaoValueSet.class); - if (myContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) { - myValidationSupport = myApplicationContext.getBean(IContextValidationSupport.class); - } RuleBasedTransactionAttribute rules = new RuleBasedTransactionAttribute(); rules.getRollbackRules().add(new NoRollbackRuleAttribute(ExpansionTooCostlyException.class)); myTxTemplate = new TransactionTemplate(myTransactionManager, rules); @@ -1313,16 +1350,6 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition); } - public static class Job implements HapiJob { - @Autowired - private ITermReadSvc myTerminologySvc; - - @Override - public void execute(JobExecutionContext theContext) { - myTerminologySvc.preExpandDeferredValueSetsToTerminologyTables(); - } - } - @Override @Transactional public void storeTermConceptMapAndChildren(ResourceTable theResourceTable, ConceptMap theConceptMap) { @@ -1396,7 +1423,6 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo TermConceptMapGroupElement termConceptMapGroupElement; for (ConceptMap.SourceElementComponent element : group.getElement()) { if (isBlank(element.getCode())) { - // FIXME: JA - send this to an interceptor message so it can be output continue; } termConceptMapGroupElement = new TermConceptMapGroupElement(); @@ -1469,7 +1495,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo TermValueSet refreshedValueSetToExpand = myValueSetDao.findById(valueSetToExpand.getId()).get(); return getValueSetFromResourceTable(refreshedValueSetToExpand.getResource()); }); - expandValueSet(valueSet, new ValueSetConceptAccumulator(valueSetToExpand, myValueSetDao, myValueSetConceptDao, myValueSetConceptDesignationDao)); + expandValueSet(null, valueSet, new ValueSetConceptAccumulator(valueSetToExpand, myValueSetDao, myValueSetConceptDao, myValueSetConceptDesignationDao)); // We are done with this ValueSet. txTemplate.execute(t -> { @@ -1490,7 +1516,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo } private boolean isNotSafeToPreExpandValueSets() { - return !myDeferredStorageSvc.isStorageQueueEmpty(); + return myDeferredStorageSvc != null && !myDeferredStorageSvc.isStorageQueueEmpty(); } protected abstract ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable); @@ -1578,14 +1604,14 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo protected abstract ValueSet toCanonicalValueSet(IBaseResource theValueSet); - protected IContextValidationSupport.LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { + protected IValidationSupport.LookupCodeResult lookupCode(String theSystem, String theCode) { TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager); return txTemplate.execute(t -> { Optional codeOpt = findCode(theSystem, theCode); if (codeOpt.isPresent()) { TermConcept code = codeOpt.get(); - IContextValidationSupport.LookupCodeResult result = new IContextValidationSupport.LookupCodeResult(); + IValidationSupport.LookupCodeResult result = new IValidationSupport.LookupCodeResult(); result.setCodeSystemDisplayName(code.getCodeSystemVersion().getCodeSystemDisplayName()); result.setCodeSystemVersion(code.getCodeSystemVersion().getCodeSystemVersionId()); result.setSearchedForSystem(theSystem); @@ -1594,7 +1620,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo result.setCodeDisplay(code.getDisplay()); for (TermConceptDesignation next : code.getDesignations()) { - IContextValidationSupport.ConceptDesignation designation = new IContextValidationSupport.ConceptDesignation(); + IValidationSupport.ConceptDesignation designation = new IValidationSupport.ConceptDesignation(); designation.setLanguage(next.getLanguage()); designation.setUseSystem(next.getUseSystem()); designation.setUseCode(next.getUseCode()); @@ -1605,10 +1631,10 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo for (TermConceptProperty next : code.getProperties()) { if (next.getType() == TermConceptPropertyTypeEnum.CODING) { - IContextValidationSupport.CodingConceptProperty property = new IContextValidationSupport.CodingConceptProperty(next.getKey(), next.getCodeSystem(), next.getValue(), next.getDisplay()); + IValidationSupport.CodingConceptProperty property = new IValidationSupport.CodingConceptProperty(next.getKey(), next.getCodeSystem(), next.getValue(), next.getDisplay()); result.getProperties().add(property); } else if (next.getType() == TermConceptPropertyTypeEnum.STRING) { - IContextValidationSupport.StringConceptProperty property = new IContextValidationSupport.StringConceptProperty(next.getKey(), next.getValue()); + IValidationSupport.StringConceptProperty property = new IValidationSupport.StringConceptProperty(next.getKey(), next.getValue()); result.getProperties().add(property); } else { throw new InternalErrorException("Unknown type: " + next.getType()); @@ -1640,13 +1666,6 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo @Override public boolean supportsSystem(String theSystem) { - - // Validation with only a code but no system can happen when validating against a - // valueset, which only the full term service can handle - if (theSystem == null || Constants.codeSystemNotNeeded(theSystem)) { - return true; - } - TermCodeSystem cs = getCodeSystem(theSystem); return cs != null; } @@ -1850,8 +1869,19 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo throw new ResourceNotFoundException("Unknown ValueSet: " + UrlUtil.escapeUrlParam(theValueSet)); } - Optional validateCodeInValueSet(String theValueSetUrl, String theCodeSystem, String theCode) { - IBaseResource valueSet = myValidationSupport.fetchValueSet(myContext, theValueSetUrl); + @Override + public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, 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 null; + } + + Optional validateCodeInValueSet(IValidationSupport theValidationSupport, ConceptValidationOptions theValidationOptions, String theValueSetUrl, String theCodeSystem, String theCode) { + IBaseResource valueSet = theValidationSupport.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 @@ -1859,7 +1889,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo Long pid = IDao.RESOURCE_PID.get((IAnyResource) valueSet); if (pid != null) { if (isValueSetPreExpandedForCodeValidation(valueSet)) { - ValidateCodeResult outcome = validateCodeIsInPreExpandedValueSet(valueSet, theCodeSystem, theCode, null, null, null); + ValidateCodeResult outcome = validateCodeIsInPreExpandedValueSet(new ValidationOptions(), valueSet, theCodeSystem, theCode, null, null, null); if (outcome != null && outcome.isResult()) { return Optional.of(new VersionIndependentConcept(theCodeSystem, theCode)); } @@ -1869,13 +1899,148 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo ValueSet canonicalValueSet = toCanonicalValueSet(valueSet); VersionIndependentConcept wantConcept = new VersionIndependentConcept(theCodeSystem, theCode); - List expansionOutcome = expandValueSetAndReturnVersionIndependentConcepts(canonicalValueSet, wantConcept); + ValueSetExpansionOptions expansionOptions = new ValueSetExpansionOptions() + .setFailOnMissingCodeSystem(false); + + List expansionOutcome = expandValueSetAndReturnVersionIndependentConcepts(expansionOptions, canonicalValueSet, wantConcept); return expansionOutcome .stream() - .filter(t -> (Constants.codeSystemNotNeeded(theCodeSystem) || t.getSystem().equals(theCodeSystem)) && t.getCode().equals(theCode)) + .filter(t -> (theValidationOptions.isInferSystem() || t.getSystem().equals(theCodeSystem)) && t.getCode().equals(theCode)) .findFirst(); } + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + IValidationSupport jpaValidationSupport = provideJpaValidationSupport(); + return jpaValidationSupport.fetchCodeSystem(theSystem); + } + + @Override + public CodeSystem fetchCanonicalCodeSystemFromCompleteContext(String theSystem) { + IValidationSupport validationSupport = provideValidationSupport(); + IBaseResource codeSystem = validationSupport.fetchCodeSystem(theSystem); + if (codeSystem != null) { + codeSystem = toCanonicalCodeSystem(codeSystem); + } + return (CodeSystem) codeSystem; + } + + @Nonnull + private IValidationSupport provideJpaValidationSupport() { + IValidationSupport jpaValidationSupport = myJpaValidationSupport; + if (jpaValidationSupport == null) { + jpaValidationSupport = myApplicationContext.getBean("myJpaValidationSupport", IValidationSupport.class); + myJpaValidationSupport = jpaValidationSupport; + } + return jpaValidationSupport; + } + + @Nonnull + private IValidationSupport provideValidationSupport() { + IValidationSupport validationSupport = myValidationSupport; + if (validationSupport == null) { + validationSupport = myApplicationContext.getBean(IValidationSupport.class); + myValidationSupport = validationSupport; + } + return validationSupport; + } + + public ValueSet fetchCanonicalValueSetFromCompleteContext(String theSystem) { + IValidationSupport validationSupport = provideValidationSupport(); + IBaseResource valueSet = validationSupport.fetchValueSet(theSystem); + if (valueSet != null) { + valueSet = toCanonicalValueSet(valueSet); + } + return (ValueSet) valueSet; + } + + protected abstract CodeSystem toCanonicalCodeSystem(IBaseResource theCodeSystem); + + @Override + public IBaseResource fetchValueSet(String theValueSetUrl) { + return provideJpaValidationSupport().fetchValueSet(theValueSetUrl); + } + + @Override + public FhirContext getFhirContext() { + return myContext; + } + + private void findCodesAbove(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { + List conceptList = theSystem.getConcept(); + for (CodeSystem.ConceptDefinitionComponent next : conceptList) { + addTreeIfItContainsCode(theSystemString, next, theCode, theListToPopulate); + } + } + + @Override + public List findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) { + ArrayList retVal = new ArrayList<>(); + CodeSystem system = (CodeSystem) fetchCanonicalCodeSystemFromCompleteContext(theSystem); + if (system != null) { + findCodesAbove(system, theSystem, theCode, retVal); + } + return retVal; + } + + private void findCodesBelow(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { + List conceptList = theSystem.getConcept(); + findCodesBelow(theSystemString, theCode, theListToPopulate, conceptList); + } + + private void findCodesBelow(String theSystemString, String theCode, List theListToPopulate, List conceptList) { + for (CodeSystem.ConceptDefinitionComponent next : conceptList) { + if (theCode.equals(next.getCode())) { + addAllChildren(theSystemString, next, theListToPopulate); + } else { + findCodesBelow(theSystemString, theCode, theListToPopulate, next.getConcept()); + } + } + } + + @Override + public List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) { + ArrayList retVal = new ArrayList<>(); + CodeSystem system = (CodeSystem) fetchCanonicalCodeSystemFromCompleteContext(theSystem); + if (system != null) { + findCodesBelow(system, theSystem, theCode, retVal); + } + return retVal; + } + + private void addAllChildren(String theSystemString, CodeSystem.ConceptDefinitionComponent theCode, List theListToPopulate) { + if (isNotBlank(theCode.getCode())) { + theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode())); + } + for (CodeSystem.ConceptDefinitionComponent nextChild : theCode.getConcept()) { + addAllChildren(theSystemString, nextChild, theListToPopulate); + } + } + + private boolean addTreeIfItContainsCode(String theSystemString, CodeSystem.ConceptDefinitionComponent theNext, String theCode, List theListToPopulate) { + boolean foundCodeInChild = false; + for (CodeSystem.ConceptDefinitionComponent nextChild : theNext.getConcept()) { + foundCodeInChild |= addTreeIfItContainsCode(theSystemString, nextChild, theCode, theListToPopulate); + } + + if (theCode.equals(theNext.getCode()) || foundCodeInChild) { + theListToPopulate.add(new VersionIndependentConcept(theSystemString, theNext.getCode())); + return true; + } + + return false; + } + + public static class Job implements HapiJob { + @Autowired + private ITermReadSvc myTerminologySvc; + + @Override + public void execute(JobExecutionContext theContext) { + myTerminologySvc.preExpandDeferredValueSetsToTerminologyTables(); + } + } + static List toPersistedConcepts(List theConcept, TermCodeSystemVersion theCodeSystemVersion) { ArrayList retVal = new ArrayList<>(); @@ -1937,13 +2102,6 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo return termConcept; } - private static void extractLinksFromConceptAndChildren(TermConcept theConcept, List theLinks) { - theLinks.addAll(theConcept.getParents()); - for (TermConceptParentChildLink child : theConcept.getChildren()) { - extractLinksFromConceptAndChildren(child.getChild(), theLinks); - } - } - @NotNull private static VersionIndependentConcept toConcept(IPrimitiveType theCodeType, IPrimitiveType theSystemType, IBaseCoding theCodingType) { String code = theCodeType != null ? theCodeType.getValueAsString() : null; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermVersionAdapterSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermVersionAdapterSvcImpl.java index e0d7f53523a..71851210f04 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermVersionAdapterSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseTermVersionAdapterSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IRecordHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IRecordHandler.java index a9cbcfdbbcf..260d2915afd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IRecordHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IRecordHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IValueSetConceptAccumulator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IValueSetConceptAccumulator.java index 0e861db3b4c..db098111343 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IValueSetConceptAccumulator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/IValueSetConceptAccumulator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/LoadedFileDescriptors.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/LoadedFileDescriptors.java index 1278bb1e3df..11ca46d9624 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/LoadedFileDescriptors.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/LoadedFileDescriptors.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java index 91065d40a92..fc6cc291f4e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,17 +24,28 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; -import ca.uhn.fhir.jpa.dao.data.*; +import ca.uhn.fhir.jpa.dao.IHapiJpaRepository; +import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; +import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao; +import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemVersionDao; +import ca.uhn.fhir.jpa.dao.data.ITermConceptDao; +import ca.uhn.fhir.jpa.dao.data.ITermConceptDesignationDao; +import ca.uhn.fhir.jpa.dao.data.ITermConceptParentChildLinkDao; +import ca.uhn.fhir.jpa.dao.data.ITermConceptPropertyDao; import ca.uhn.fhir.jpa.dao.index.IdHelperService; -import ca.uhn.fhir.jpa.entity.*; +import ca.uhn.fhir.jpa.entity.TermCodeSystem; +import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; +import ca.uhn.fhir.jpa.entity.TermConcept; +import ca.uhn.fhir.jpa.entity.TermConceptDesignation; +import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink; +import ca.uhn.fhir.jpa.entity.TermConceptProperty; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.jpa.term.api.ITermVersionAdapterSvc; import ca.uhn.fhir.jpa.term.custom.CustomTerminologySet; -import ca.uhn.fhir.jpa.util.ScrollableResultsIterator; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -42,11 +53,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.ObjectUtil; import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.util.ValidateUtil; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; import org.apache.commons.lang3.Validate; -import org.hibernate.ScrollMode; -import org.hibernate.ScrollableResults; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.ConceptMap; @@ -56,7 +63,6 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; -import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.annotation.Propagation; @@ -67,11 +73,6 @@ import javax.annotation.Nonnull; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -116,11 +117,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { @Override public ResourcePersistentId getValueSetResourcePid(IIdType theIdType) { - return getValueSetResourcePid(theIdType, null); - } - - private ResourcePersistentId getValueSetResourcePid(IIdType theIdType, RequestDetails theRequestDetails) { - return myIdHelperService.translateForcedIdToPid(theIdType, theRequestDetails); + return myIdHelperService.resolveResourcePersistentIds(theIdType.getResourceType(), theIdType.getIdPart()); } @Transactional @@ -143,7 +140,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { TermCodeSystemVersion csv = cs.getCurrentVersion(); Validate.notNull(csv); - CodeSystem codeSystem = myTerminologySvc.getCodeSystemFromContext(theSystem); + CodeSystem codeSystem = myTerminologySvc.fetchCanonicalCodeSystemFromCompleteContext(theSystem); if (codeSystem.getContent() != CodeSystem.CodeSystemContentMode.NOTPRESENT) { throw new InvalidRequestException("CodeSystem with url[" + Constants.codeSystemWithDefaultDescription(theSystem) + "] can not apply a delta - wrong content mode: " + codeSystem.getContent()); } @@ -153,77 +150,13 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { IIdType codeSystemId = cs.getResource().getIdDt(); - // Load all concepts for the code system - Map codeToConceptPid = new HashMap<>(); - { - ourLog.info("Loading all concepts in CodeSystem versionPid[{}] and url[{}]", cs.getPid(), theSystem); - StopWatch sw = new StopWatch(); - CriteriaBuilder criteriaBuilder = myEntityManager.getCriteriaBuilder(); - CriteriaQuery query = criteriaBuilder.createQuery(TermConcept.class); - Root root = query.from(TermConcept.class); - Predicate predicate = criteriaBuilder.equal(root.get("myCodeSystemVersionPid").as(Long.class), csv.getPid()); - query.where(predicate); - TypedQuery typedQuery = myEntityManager.createQuery(query.select(root)); - org.hibernate.query.Query hibernateQuery = (org.hibernate.query.Query) typedQuery; - ScrollableResults scrollableResults = hibernateQuery.scroll(ScrollMode.FORWARD_ONLY); - try (ScrollableResultsIterator scrollableResultsIterator = new ScrollableResultsIterator<>(scrollableResults)) { - while (scrollableResultsIterator.hasNext()) { - TermConcept next = scrollableResultsIterator.next(); - codeToConceptPid.put(next.getCode(), next.getId()); - } - } - ourLog.info("Loaded {} concepts in {}", codeToConceptPid.size(), sw.toString()); - } - - // Load all parent/child links - ListMultimap parentCodeToChildCodes = ArrayListMultimap.create(); - ListMultimap childCodeToParentCodes = ArrayListMultimap.create(); - { - ourLog.info("Loading all parent/child relationships in CodeSystem url[" + theSystem + "]"); - int count = 0; - StopWatch sw = new StopWatch(); - CriteriaBuilder criteriaBuilder = myEntityManager.getCriteriaBuilder(); - CriteriaQuery query = criteriaBuilder.createQuery(TermConceptParentChildLink.class); - Root root = query.from(TermConceptParentChildLink.class); - Predicate predicate = criteriaBuilder.equal(root.get("myCodeSystemVersionPid").as(Long.class), csv.getPid()); - root.fetch("myChild"); - root.fetch("myParent"); - query.where(predicate); - TypedQuery typedQuery = myEntityManager.createQuery(query.select(root)); - org.hibernate.query.Query hibernateQuery = (org.hibernate.query.Query) typedQuery; - ScrollableResults scrollableResults = hibernateQuery.scroll(ScrollMode.FORWARD_ONLY); - try (ScrollableResultsIterator scrollableResultsIterator = new ScrollableResultsIterator<>(scrollableResults)) { - while (scrollableResultsIterator.hasNext()) { - TermConceptParentChildLink next = scrollableResultsIterator.next(); - String parentCode = next.getParent().getCode(); - String childCode = next.getChild().getCode(); - parentCodeToChildCodes.put(parentCode, childCode); - childCodeToParentCodes.put(childCode, parentCode); - count++; - } - } - ourLog.info("Loaded {} parent/child relationships in {}", count, sw.toString()); - } - - // Account for root codes in the parent->child map - for (String nextCode : codeToConceptPid.keySet()) { - if (childCodeToParentCodes.get(nextCode).isEmpty()) { - parentCodeToChildCodes.put("", nextCode); - } - } - UploadStatistics retVal = new UploadStatistics(codeSystemId); + HashMap codeToConcept = new HashMap<>(); // Add root concepts for (TermConcept nextRootConcept : theAdditions.getRootConcepts()) { List parentCodes = Collections.emptyList(); - addConcept(csv, codeToConceptPid, parentCodes, nextRootConcept, parentCodeToChildCodes, retVal, true); - } - - // Add unanchored child concepts - for (TermConcept nextUnanchoredChild : theAdditions.getUnanchoredChildConceptsToParentCodes().keySet()) { - List nextParentCodes = theAdditions.getUnanchoredChildConceptsToParentCodes().get(nextUnanchoredChild); - addConcept(csv, codeToConceptPid, nextParentCodes, nextUnanchoredChild, parentCodeToChildCodes, retVal, true); + addConceptInHierarchy(csv, parentCodes, nextRootConcept, retVal, codeToConcept, 0); } return retVal; @@ -286,7 +219,15 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { * save parent concepts first (it's way too slow to do that) */ if (theConcept.getId() == null) { - retVal += ensureParentsSaved(theConcept.getParents()); + boolean needToSaveParents = false; + for (TermConceptParentChildLink next : theConcept.getParents()) { + if (next.getParent().getId() == null) { + needToSaveParents = true; + } + } + if (needToSaveParents) { + retVal += ensureParentsSaved(theConcept.getParents()); + } } if (theConcept.getId() == null || theConcept.getIndexStatus() == null) { @@ -350,7 +291,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { Validate.notBlank(theCodeSystemResource.getUrl(), "theCodeSystemResource must have a URL"); IIdType csId = myTerminologyVersionAdapterSvc.createOrUpdateCodeSystem(theCodeSystemResource); - ResourcePersistentId codeSystemResourcePid = myIdHelperService.translateForcedIdToPid(csId, theRequest); + ResourcePersistentId codeSystemResourcePid = myIdHelperService.resolveResourcePersistentIds(csId.getResourceType(), csId.getIdPart()); ResourceTable resource = myResourceTableDao.getOne(codeSystemResourcePid.getIdAsLong()); ourLog.info("CodeSystem resource has ID: {}", csId.getValue()); @@ -499,112 +440,118 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { Validate.isTrue(myContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3), "Terminology operations only supported in DSTU3+ mode"); } - private void addConcept(TermCodeSystemVersion theCsv, Map theCodeToConceptPid, Collection theParentCodes, TermConcept theConceptToAdd, ListMultimap theParentCodeToChildCodes, UploadStatistics theStatisticsTracker, boolean theForceResequence) { - TermConcept nextConceptToAdd = theConceptToAdd; + private void addConceptInHierarchy(TermCodeSystemVersion theCsv, Collection theParentCodes, TermConcept theConceptToAdd, UploadStatistics theStatisticsTracker, Map theCodeToConcept, int theSequence) { + TermConcept conceptToAdd = theConceptToAdd; + List childrenToAdd = theConceptToAdd.getChildren(); - String nextCodeToAdd = nextConceptToAdd.getCode(); + String nextCodeToAdd = conceptToAdd.getCode(); String parentDescription = "(root concept)"; - Set parentConcepts = new HashSet<>(); - if (!theParentCodes.isEmpty()) { - parentDescription = "[" + String.join(", ", theParentCodes) + "]"; - for (String nextParentCode : theParentCodes) { - Long nextParentCodePid = theCodeToConceptPid.get(nextParentCode); - if (nextParentCodePid == null) { - throw new InvalidRequestException("Unable to add code \"" + nextCodeToAdd + "\" to unknown parent: " + nextParentCode); - } - parentConcepts.add(myConceptDao.getOne(nextParentCodePid)); - } - } ourLog.info("Saving concept {} with parent {}", theStatisticsTracker.getUpdatedConceptCount(), parentDescription); - if (theCodeToConceptPid.containsKey(nextCodeToAdd)) { - - TermConcept existingCode = myConceptDao.getOne(theCodeToConceptPid.get(nextCodeToAdd)); + Optional existingCodeOpt = myConceptDao.findByCodeSystemAndCode(theCsv, nextCodeToAdd); + List existingParentLinks; + if (existingCodeOpt.isPresent()) { + TermConcept existingCode = existingCodeOpt.get(); existingCode.setIndexStatus(null); - existingCode.setDisplay(nextConceptToAdd.getDisplay()); - nextConceptToAdd = existingCode; - + existingCode.setDisplay(conceptToAdd.getDisplay()); + conceptToAdd = existingCode; + existingParentLinks = conceptToAdd.getParents(); + } else { + existingParentLinks = Collections.emptyList(); } - if (theConceptToAdd.getSequence() == null || theForceResequence) { - // If this is a new code, give it a sequence number based on how many concepts the - // parent already has (or the highest number, if the code has multiple parents) - int sequence = 0; - for (String nextParentCode : theParentCodes) { - theParentCodeToChildCodes.put(nextParentCode, nextCodeToAdd); - sequence = Math.max(sequence, theParentCodeToChildCodes.get(nextParentCode).size()); + Set parentConceptsWeShouldLinkTo = new HashSet<>(); + for (String nextParentCode : theParentCodes) { + + // Don't add parent links that already exist for the code + if (existingParentLinks.stream().anyMatch(t -> t.getParent().getCode().equals(nextParentCode))) { + continue; } - if (theParentCodes.isEmpty()) { - theParentCodeToChildCodes.put("", nextCodeToAdd); - sequence = Math.max(sequence, theParentCodeToChildCodes.get("").size()); + + TermConcept nextParentOpt = theCodeToConcept.get(nextParentCode); + if (nextParentOpt == null) { + nextParentOpt = myConceptDao.findByCodeSystemAndCode(theCsv, nextParentCode).orElse(null); } - nextConceptToAdd.setSequence(sequence); + if (nextParentOpt == null) { + throw new InvalidRequestException("Unable to add code \"" + nextCodeToAdd + "\" to unknown parent: " + nextParentCode); + } + parentConceptsWeShouldLinkTo.add(nextParentOpt); } - - // Drop any old parent-child links if they aren't explicitly specified in the - // hierarchy being added - for (Iterator iter = nextConceptToAdd.getParents().iterator(); iter.hasNext(); ) { - TermConceptParentChildLink nextLink = iter.next(); - String parentCode = nextLink.getParent().getCode(); - boolean shouldRemove = !theParentCodes.contains(parentCode); - if (shouldRemove) { - ourLog.info("Dropping existing parent/child link from {} -> {}", parentCode, nextCodeToAdd); - myConceptParentChildLinkDao.delete(nextLink); - iter.remove(); - - List parentChildrenList = nextLink.getParent().getChildren(); - parentChildrenList.remove(nextLink); - } + if (conceptToAdd.getSequence() == null) { + conceptToAdd.setSequence(theSequence); } - nextConceptToAdd.setParentPids(null); - nextConceptToAdd.setCodeSystemVersion(theCsv); - nextConceptToAdd = myConceptDao.save(nextConceptToAdd); + // Null out the hierarchy PIDs for this concept always. We do this because we're going to + // force a reindex, and it'll be regenerated then + conceptToAdd.setParentPids(null); + conceptToAdd.setCodeSystemVersion(theCsv); + + if (theStatisticsTracker.getUpdatedConceptCount() <= myDaoConfig.getDeferIndexingForCodesystemsOfSize()) { + saveConcept(conceptToAdd); + Long nextConceptPid = conceptToAdd.getId(); + Validate.notNull(nextConceptPid); + } else { + myDeferredStorageSvc.addConceptToStorageQueue(conceptToAdd); + } + + theCodeToConcept.put(conceptToAdd.getCode(), conceptToAdd); - Long nextConceptPid = nextConceptToAdd.getId(); - Validate.notNull(nextConceptPid); - theCodeToConceptPid.put(nextCodeToAdd, nextConceptPid); theStatisticsTracker.incrementUpdatedConceptCount(); - // Add link to new child to the parent if this link doesn't already exist (this will be the - // case for concepts being added to an existing child concept, but won't be the case when - // we're recursively adding children) - for (TermConcept nextParentConcept : parentConcepts) { - if (nextParentConcept.getChildren().stream().noneMatch(t -> t.getChild().getCode().equals(nextCodeToAdd))) { - TermConceptParentChildLink parentLink = new TermConceptParentChildLink(); - parentLink.setParent(nextParentConcept); - parentLink.setChild(nextConceptToAdd); - parentLink.setCodeSystem(theCsv); - parentLink.setRelationshipType(TermConceptParentChildLink.RelationshipTypeEnum.ISA); - nextParentConcept.getChildren().add(parentLink); - nextConceptToAdd.getParents().add(parentLink); + // Add link to new child to the parent + for (TermConcept nextParentConcept : parentConceptsWeShouldLinkTo) { + TermConceptParentChildLink parentLink = new TermConceptParentChildLink(); + parentLink.setParent(nextParentConcept); + parentLink.setChild(conceptToAdd); + parentLink.setCodeSystem(theCsv); + parentLink.setRelationshipType(TermConceptParentChildLink.RelationshipTypeEnum.ISA); + nextParentConcept.getChildren().add(parentLink); + conceptToAdd.getParents().add(parentLink); + ourLog.info("Saving parent/child link - Parent[{}] Child[{}]", parentLink.getParent().getCode(), parentLink.getChild().getCode()); + + if (theStatisticsTracker.getUpdatedConceptCount() <= myDaoConfig.getDeferIndexingForCodesystemsOfSize()) { myConceptParentChildLinkDao.save(parentLink); + } else { + myDeferredStorageSvc.addConceptLinkToStorageQueue(parentLink); } + } + ourLog.trace("About to save parent-child links"); + // Save children recursively - for (TermConceptParentChildLink nextChildConceptLink : nextConceptToAdd.getChildren()) { + int childIndex = 0; + for (TermConceptParentChildLink nextChildConceptLink : new ArrayList<>(childrenToAdd)) { TermConcept nextChild = nextChildConceptLink.getChild(); - Collection parentCodes = nextChild.getParents().stream().map(t -> t.getParent().getCode()).collect(Collectors.toList()); - addConcept(theCsv, theCodeToConceptPid, parentCodes, nextChild, theParentCodeToChildCodes, theStatisticsTracker, false); - if (nextChildConceptLink.getId() == null) { - nextChildConceptLink.setCodeSystem(theCsv); - myConceptParentChildLinkDao.save(nextChildConceptLink); + for (int i = 0; i < nextChild.getParents().size(); i++) { + if (nextChild.getParents().get(i).getId() == null) { + String parentCode = nextChild.getParents().get(i).getParent().getCode(); + TermConcept parentConcept = theCodeToConcept.get(parentCode); + if (parentConcept == null) { + parentConcept = myConceptDao.findByCodeSystemAndCode(theCsv, parentCode).orElse(null); + } + if (parentConcept == null) { + throw new IllegalArgumentException("Unknown parent code: " + parentCode); + } + + nextChild.getParents().get(i).setParent(parentConcept); + } } + + Collection parentCodes = nextChild.getParents().stream().map(t -> t.getParent().getCode()).collect(Collectors.toList()); + addConceptInHierarchy(theCsv, parentCodes, nextChild, theStatisticsTracker, theCodeToConcept, childIndex); + + childIndex++; } } private ResourcePersistentId getCodeSystemResourcePid(IIdType theIdType) { - return getCodeSystemResourcePid(theIdType, null); - } - - private ResourcePersistentId getCodeSystemResourcePid(IIdType theIdType, RequestDetails theRequestDetails) { - return myIdHelperService.translateForcedIdToPid(theIdType, theRequestDetails); + return myIdHelperService.resolveResourcePersistentIds(theIdType.getResourceType(), theIdType.getIdPart()); } private void persistChildren(TermConcept theConcept, TermCodeSystemVersion theCodeSystem, IdentityHashMap theConceptsStack, int theTotalConcepts) { @@ -708,17 +655,20 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { private void deleteConceptChildrenAndConcept(TermConcept theConcept, AtomicInteger theRemoveCounter) { for (TermConceptParentChildLink nextChildLink : theConcept.getChildren()) { deleteConceptChildrenAndConcept(nextChildLink.getChild(), theRemoveCounter); - myConceptParentChildLinkDao.delete(nextChildLink); } + myConceptParentChildLinkDao.deleteByConceptPid(theConcept.getId()); + myConceptDesignationDao.deleteAll(theConcept.getDesignations()); myConceptPropertyDao.deleteAll(theConcept.getProperties()); - myConceptDao.delete(theConcept); + + ourLog.info("Deleting concept {} - Code {}", theConcept.getId(), theConcept.getCode()); + myConceptDao.deleteByPid(theConcept.getId()); theRemoveCounter.incrementAndGet(); } - private void doDelete(String theDescriptor, Supplier> theLoader, Supplier theCounter, JpaRepository theDao) { + private void doDelete(String theDescriptor, Supplier> theLoader, Supplier theCounter, IHapiJpaRepository theDao) { int count; ourLog.info(" * Deleting {}", theDescriptor); int totalCount = theCounter.get(); @@ -733,7 +683,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc { TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager); txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); txTemplate.execute(t -> { - link.forEach(id -> theDao.deleteById(id)); + link.forEach(id -> theDao.deleteByPid(id)); return null; }); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java index f0a70b2e045..09e7cc7e69b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,6 +98,13 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { myDeferredValueSets.addAll(theValueSets); } + @Override + public void saveAllDeferred() { + while (!isStorageQueueEmpty()) { + saveDeferred(); + } + } + @Override public void setProcessDeferred(boolean theProcessDeferred) { myProcessDeferred = theProcessDeferred; @@ -264,7 +271,7 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { // Register scheduled job to save deferred concepts // In the future it would be great to make this a cluster-aware task somehow ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition(); - jobDefinition.setId(this.getClass().getName()); + jobDefinition.setId(Job.class.getName()); jobDefinition.setJobClass(Job.class); mySchedulerService.scheduleLocalJob(5000, jobDefinition); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java index 3f7f55277dc..f7b151d3fa0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java @@ -49,7 +49,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -388,7 +388,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc { } } - // FIXME: DM 2019-09-13 - Manually add EXTERNAL_COPYRIGHT_NOTICE property until Regenstrief adds this to loinc.xml + // TODO: DM 2019-09-13 - Manually add EXTERNAL_COPYRIGHT_NOTICE property until Regenstrief adds this to loinc.xml if (!propertyNamesToTypes.containsKey("EXTERNAL_COPYRIGHT_NOTICE")) { String externalCopyRightNoticeCode = "EXTERNAL_COPYRIGHT_NOTICE"; CodeSystem.PropertyType externalCopyRightNoticeType = CodeSystem.PropertyType.STRING; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu2.java index f43affad9e2..8e5909743e6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,16 @@ package ca.uhn.fhir.jpa.term; * #L% */ +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.model.entity.ResourceTable; -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; +import ca.uhn.fhir.util.VersionIndependentConcept; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.ValueSet; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; @@ -62,11 +65,6 @@ public class TermReadSvcDstu2 extends BaseTermReadSvcImpl { return false; } - @Override - public CodeSystem getCodeSystemFromContext(String theSystem) { - return null; - } - @Override protected ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) { throw new UnsupportedOperationException(); @@ -78,22 +76,17 @@ public class TermReadSvcDstu2 extends BaseTermReadSvcImpl { } @Override - public IBaseResource expandValueSet(IBaseResource theValueSetToExpand) { + protected CodeSystem toCanonicalCodeSystem(IBaseResource theCodeSystem) { throw new UnsupportedOperationException(); } @Override - public IBaseResource expandValueSet(IBaseResource theValueSetToExpand, int theOffset, int theCount) { + public IBaseResource expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { throw new UnsupportedOperationException(); } @Override - public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { - throw new UnsupportedOperationException(); - } - - @Override - public List expandValueSet(String theValueSet) { + public void expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { throw new UnsupportedOperationException(); } @@ -107,7 +100,7 @@ public class TermReadSvcDstu2 extends BaseTermReadSvcImpl { @Override public List findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) { ArrayList retVal = new ArrayList<>(); - org.hl7.fhir.dstu2.model.ValueSet system = myValidationSupport.fetchCodeSystem(myContext, theSystem); + org.hl7.fhir.dstu2.model.ValueSet system = (org.hl7.fhir.dstu2.model.ValueSet) myValidationSupport.fetchCodeSystem(theSystem); if (system != null) { findCodesAbove(system, theSystem, theCode, retVal); } @@ -132,7 +125,7 @@ public class TermReadSvcDstu2 extends BaseTermReadSvcImpl { @Override public List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) { ArrayList retVal = new ArrayList<>(); - org.hl7.fhir.dstu2.model.ValueSet system = myValidationSupport.fetchCodeSystem(myContext, theSystem); + org.hl7.fhir.dstu2.model.ValueSet system = (org.hl7.fhir.dstu2.model.ValueSet) myValidationSupport.fetchCodeSystem(theSystem); if (system != null) { findCodesBelow(system, theSystem, theCode, retVal); } @@ -140,7 +133,7 @@ public class TermReadSvcDstu2 extends BaseTermReadSvcImpl { } @Override - public ValidateCodeResult validateCodeIsInPreExpandedValueSet(IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { + public ValidateCodeResult validateCodeIsInPreExpandedValueSet(ValidationOptions theOptions, IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { throw new UnsupportedOperationException(); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu3.java index c17ba8ca4d5..f612714af8d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcDstu3.java @@ -1,42 +1,42 @@ package ca.uhn.fhir.jpa.term; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.model.entity.ResourceTable; -import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvcDstu3; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.ValidateUtil; -import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; +import ca.uhn.fhir.util.VersionIndependentConcept; +import org.hl7.fhir.convertors.conv30_40.CodeSystem30_40; +import org.hl7.fhir.dstu3.model.CodeSystem; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.ValueSet; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.TransactionTemplate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import java.util.Optional; import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.hl7.fhir.convertors.conv30_40.CodeSystem30_40.convertCodeSystem; +import static org.hl7.fhir.convertors.conv30_40.ValueSet30_40.convertValueSet; /* * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,13 +54,6 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidationSupport, ITermReadSvcDstu3 { - @Autowired - @Qualifier("myValueSetDaoDstu3") - private IFhirResourceDao myValueSetResourceDao; - @Autowired - private IValidationSupport myValidationSupport; - @Autowired - private ITermReadSvc myTerminologySvc; @Autowired private PlatformTransactionManager myTransactionManager; @@ -71,54 +64,29 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation super(); } - private void addAllChildren(String theSystemString, ConceptDefinitionComponent theCode, List theListToPopulate) { - if (isNotBlank(theCode.getCode())) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode())); - } - for (ConceptDefinitionComponent nextChild : theCode.getConcept()) { - addAllChildren(theSystemString, nextChild, theListToPopulate); - } - } - - private boolean addTreeIfItContainsCode(String theSystemString, ConceptDefinitionComponent theNext, String theCode, List theListToPopulate) { - boolean foundCodeInChild = false; - for (ConceptDefinitionComponent nextChild : theNext.getConcept()) { - foundCodeInChild |= addTreeIfItContainsCode(theSystemString, nextChild, theCode, theListToPopulate); - } - - if (theCode.equals(theNext.getCode()) || foundCodeInChild) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theNext.getCode())); - return true; - } - - return false; - } @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSet valueSetToExpand = new ValueSet(); - valueSetToExpand.getCompose().addInclude(theInclude); - + public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { try { org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; - valueSetToExpandR4 = toCanonicalValueSet(valueSetToExpand); - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent expandedR4 = super.expandValueSetInMemory(valueSetToExpandR4, null).getExpansion(); - return VersionConvertor_30_40.convertValueSetExpansionComponent(expandedR4); + valueSetToExpandR4 = toCanonicalValueSet(theValueSetToExpand); + org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(theExpansionOptions, valueSetToExpandR4); + return new ValueSetExpansionOutcome(convertValueSet(expandedR4), null); } catch (FHIRException e) { throw new InternalErrorException(e); } } @Override - public IBaseResource expandValueSet(IBaseResource theInput) { + public IBaseResource expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theInput) { ValueSet valueSetToExpand = (ValueSet) theInput; try { org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; valueSetToExpandR4 = toCanonicalValueSet(valueSetToExpand); - org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSetInMemory(valueSetToExpandR4, null); - return VersionConvertor_30_40.convertValueSet(expandedR4); + org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(theExpansionOptions, valueSetToExpandR4); + return convertValueSet(expandedR4); } catch (FHIRException e) { throw new InternalErrorException(e); } @@ -127,136 +95,23 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation @Override protected org.hl7.fhir.r4.model.ValueSet toCanonicalValueSet(IBaseResource theValueSet) throws FHIRException { org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; - valueSetToExpandR4 = VersionConvertor_30_40.convertValueSet((ValueSet) theValueSet); + valueSetToExpandR4 = convertValueSet((ValueSet) theValueSet); return valueSetToExpandR4; } @Override - public IBaseResource expandValueSet(IBaseResource theInput, int theOffset, int theCount) { - ValueSet valueSetToExpand = (ValueSet) theInput; - - try { - org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; - valueSetToExpandR4 = toCanonicalValueSet(valueSetToExpand); - org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(valueSetToExpandR4, theOffset, theCount); - return VersionConvertor_30_40.convertValueSet(expandedR4); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } + protected org.hl7.fhir.r4.model.CodeSystem toCanonicalCodeSystem(IBaseResource theCodeSystem) { + return CodeSystem30_40.convertCodeSystem((CodeSystem)theCodeSystem); } @Override - public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { + public void expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { ValueSet valueSetToExpand = (ValueSet) theValueSetToExpand; try { org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; valueSetToExpandR4 = toCanonicalValueSet(valueSetToExpand); - super.expandValueSet(valueSetToExpandR4, theValueSetCodeAccumulator); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - @Override - public List expandValueSet(String theValueSet) { - // TODO: DM 2019-09-10 - This is problematic because an incorrect URL that matches ValueSet.id will not be found in the terminology tables but will yield a ValueSet here. Depending on the ValueSet, the expansion may time-out. - ValueSet vs = myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSet); - if (vs == null) { - super.throwInvalidValueSet(theValueSet); - } - - org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4; - try { - valueSetToExpandR4 = toCanonicalValueSet(vs); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - - return expandValueSetAndReturnVersionIndependentConcepts(valueSetToExpandR4, null); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @CoverageIgnore - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public IBaseResource fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @CoverageIgnore - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return null; - } - - @CoverageIgnore - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - private void findCodesAbove(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - for (ConceptDefinitionComponent next : conceptList) { - addTreeIfItContainsCode(theSystemString, next, theCode, theListToPopulate); - } - } - - @Override - public List findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesAbove(system, theSystem, theCode, retVal); - } - return retVal; - } - - private void findCodesBelow(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - findCodesBelow(theSystemString, theCode, theListToPopulate, conceptList); - } - - private void findCodesBelow(String theSystemString, String theCode, List theListToPopulate, List conceptList) { - for (ConceptDefinitionComponent next : conceptList) { - if (theCode.equals(next.getCode())) { - addAllChildren(theSystemString, next, theListToPopulate); - } else { - findCodesBelow(theSystemString, theCode, theListToPopulate, next.getConcept()); - } - } - } - - @Override - public List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesBelow(system, theSystem, theCode, retVal); - } - return retVal; - } - - @Override - public org.hl7.fhir.r4.model.CodeSystem getCodeSystemFromContext(String theSystem) { - CodeSystem codeSystem = myValidationSupport.fetchCodeSystem(myContext, theSystem); - try { - return VersionConvertor_30_40.convertCodeSystem(codeSystem); + super.expandValueSet(theExpansionOptions, valueSetToExpandR4, theValueSetCodeAccumulator); } catch (FHIRException e) { throw new InternalErrorException(e); } @@ -264,7 +119,7 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation @Override protected org.hl7.fhir.r4.model.ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) { - ValueSet valueSet = myValueSetResourceDao.toResource(ValueSet.class, theResourceTable, null, false); + ValueSet valueSet = myDaoRegistry.getResourceDao("ValueSet").toResource(ValueSet.class, theResourceTable, null, false); org.hl7.fhir.r4.model.ValueSet valueSetR4; try { @@ -276,54 +131,50 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation return valueSetR4; } - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return myTerminologySvc.supportsSystem(theSystem); - } - @CoverageIgnore @Override - public IValidationSupport.CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { Optional codeOpt = Optional.empty(); boolean haveValidated = false; if (isNotBlank(theValueSetUrl)) { - codeOpt = super.validateCodeInValueSet(theValueSetUrl, theCodeSystem, theCode); + codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode); haveValidated = true; } if (!haveValidated) { TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager); txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); - codeOpt = txTemplate.execute(t -> findCode(theCodeSystem, theCode).map(c->c.toVersionIndependentConcept())); + codeOpt = txTemplate.execute(t -> findCode(theCodeSystem, theCode).map(c -> c.toVersionIndependentConcept())); } if (codeOpt != null && codeOpt.isPresent()) { VersionIndependentConcept code = codeOpt.get(); - ConceptDefinitionComponent def = new ConceptDefinitionComponent(); - def.setCode(code.getCode()); - IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult(def); + IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult() + .setCode(code.getCode()); return retVal; } - return new IValidationSupport.CodeValidationResult(IssueSeverity.ERROR, "Unknown code {" + theCodeSystem + "}" + theCode); + return new IValidationSupport.CodeValidationResult() + .setSeverity(IssueSeverity.ERROR) + .setMessage("Unknown code {" + theCodeSystem + "}" + theCode); } @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return super.lookupCode(theContext, theSystem, theCode); + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return super.lookupCode(theSystem, theCode); } @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; + public FhirContext getFhirContext() { + return myContext; } @Override - public ValidateCodeResult validateCodeIsInPreExpandedValueSet(IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { + public ValidateCodeResult validateCodeIsInPreExpandedValueSet(ValidationOptions theOptions, IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { ValidateUtil.isNotNullOrThrowUnprocessableEntity(theValueSet, "ValueSet must not be null"); ValueSet valueSet = (ValueSet) theValueSet; - org.hl7.fhir.r4.model.ValueSet valueSetR4 = VersionConvertor_30_40.convertValueSet(valueSet); + org.hl7.fhir.r4.model.ValueSet valueSetR4 = convertValueSet(valueSet); Coding coding = (Coding) theCoding; org.hl7.fhir.r4.model.Coding codingR4 = null; @@ -340,14 +191,14 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation } } - return super.validateCodeIsInPreExpandedValueSet(valueSetR4, theSystem, theCode, theDisplay, codingR4, codeableConceptR4); + return super.validateCodeIsInPreExpandedValueSet(theOptions, valueSetR4, theSystem, theCode, theDisplay, codingR4, codeableConceptR4); } @Override public boolean isValueSetPreExpandedForCodeValidation(IBaseResource theValueSet) { ValidateUtil.isNotNullOrThrowUnprocessableEntity(theValueSet, "ValueSet must not be null"); ValueSet valueSet = (ValueSet) theValueSet; - org.hl7.fhir.r4.model.ValueSet valueSetR4 = VersionConvertor_30_40.convertValueSet(valueSet); + org.hl7.fhir.r4.model.ValueSet valueSetR4 = convertValueSet(valueSet); return super.isValueSetPreExpandedForCodeValidation(valueSetR4); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR4.java index 1041f37e9be..04458eb9cc2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR4.java @@ -1,30 +1,29 @@ package ca.uhn.fhir.jpa.term; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4; import ca.uhn.fhir.jpa.term.ex.ExpansionTooCostlyException; import ca.uhn.fhir.util.CoverageIgnore; +import ca.uhn.fhir.util.VersionIndependentConcept; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.ValueSet; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.TransactionTemplate; import javax.transaction.Transactional; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import java.util.Optional; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -33,7 +32,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,189 +50,62 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4 { - @Autowired - @Qualifier("myValueSetDaoR4") - private IFhirResourceDao myValueSetResourceDao; - @Autowired - private IValidationSupport myValidationSupport; @Autowired private PlatformTransactionManager myTransactionManager; - private void addAllChildren(String theSystemString, ConceptDefinitionComponent theCode, List theListToPopulate) { - if (isNotBlank(theCode.getCode())) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode())); - } - for (ConceptDefinitionComponent nextChild : theCode.getConcept()) { - addAllChildren(theSystemString, nextChild, theListToPopulate); - } - } - - private boolean addTreeIfItContainsCode(String theSystemString, ConceptDefinitionComponent theNext, String theCode, List theListToPopulate) { - boolean foundCodeInChild = false; - for (ConceptDefinitionComponent nextChild : theNext.getConcept()) { - foundCodeInChild |= addTreeIfItContainsCode(theSystemString, nextChild, theCode, theListToPopulate); - } - - if (theCode.equals(theNext.getCode()) || foundCodeInChild) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theNext.getCode())); - return true; - } - - return false; - } - - @Override - public List expandValueSet(String theValueSet) { - // TODO: DM 2019-09-10 - This is problematic because an incorrect URL that matches ValueSet.id will not be found in the terminology tables but will yield a ValueSet here. Depending on the ValueSet, the expansion may time-out. - ValueSet vs = myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSet); - if (vs == null) { - super.throwInvalidValueSet(theValueSet); - } - - return expandValueSetAndReturnVersionIndependentConcepts(vs, null); - } - - @Override - public IBaseResource expandValueSet(IBaseResource theInput) { + public IBaseResource expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theInput) { ValueSet valueSetToExpand = (ValueSet) theInput; - return super.expandValueSetInMemory(valueSetToExpand, null); + return super.expandValueSet(theExpansionOptions, valueSetToExpand); } @Override - public IBaseResource expandValueSet(IBaseResource theInput, int theOffset, int theCount) { - ValueSet valueSetToExpand = (ValueSet) theInput; - return super.expandValueSet(valueSetToExpand, theOffset, theCount); - } - - @Override - public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { + public void expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { ValueSet valueSetToExpand = (ValueSet) theValueSetToExpand; - super.expandValueSet(valueSetToExpand, theValueSetCodeAccumulator); + super.expandValueSet(theExpansionOptions, valueSetToExpand, theValueSetCodeAccumulator); } @Transactional(dontRollbackOn = {ExpansionTooCostlyException.class}) @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSet valueSetToExpand = new ValueSet(); - valueSetToExpand.getCompose().addInclude(theInclude); - ValueSet expanded = super.expandValueSetInMemory(valueSetToExpand, null); - return new ValueSetExpander.ValueSetExpansionOutcome(expanded); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @CoverageIgnore - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @CoverageIgnore - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @CoverageIgnore - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - private void findCodesAbove(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - for (ConceptDefinitionComponent next : conceptList) { - addTreeIfItContainsCode(theSystemString, next, theCode, theListToPopulate); - } - } - - @Override - public List findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesAbove(system, theSystem, theCode, retVal); - } - return retVal; - } - - private void findCodesBelow(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - findCodesBelow(theSystemString, theCode, theListToPopulate, conceptList); - } - - private void findCodesBelow(String theSystemString, String theCode, List theListToPopulate, List conceptList) { - for (ConceptDefinitionComponent next : conceptList) { - if (theCode.equals(next.getCode())) { - addAllChildren(theSystemString, next, theListToPopulate); - } else { - findCodesBelow(theSystemString, theCode, theListToPopulate, next.getConcept()); - } - } - } - - @Override - public List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesBelow(system, theSystem, theCode, retVal); - } - return retVal; - } - - @Override - public CodeSystem getCodeSystemFromContext(String theSystem) { - return myValidationSupport.fetchCodeSystem(myContext, theSystem); + public IValidationSupport.ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { + ValueSet expanded = super.expandValueSet(theExpansionOptions, (ValueSet) theValueSetToExpand); + return new IValidationSupport.ValueSetExpansionOutcome(expanded); } @Override protected ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) { - return myValueSetResourceDao.toResource(ValueSet.class, theResourceTable, null, false); + return myDaoRegistry.getResourceDao("ValueSet").toResource(ValueSet.class, theResourceTable, null, false); } @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return supportsSystem(theSystem); + public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) { + return fetchValueSet(theValueSetUrl) != null; } @Override - public boolean isValueSetSupported(FhirContext theContext, String theValueSetUrl) { - return myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSetUrl) != null; + public FhirContext getFhirContext() { + return myContext; } - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } @Override protected ValueSet toCanonicalValueSet(IBaseResource theValueSet) { return (ValueSet) theValueSet; } + @Override + protected CodeSystem toCanonicalCodeSystem(IBaseResource theCodeSystem) { + return (CodeSystem) theCodeSystem; + } + @CoverageIgnore @Override - public IValidationSupport.CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { Optional codeOpt = Optional.empty(); boolean haveValidated = false; if (isNotBlank(theValueSetUrl)) { - codeOpt = super.validateCodeInValueSet(theValueSetUrl, theCodeSystem, theCode); + codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode); haveValidated = true; } @@ -245,26 +117,27 @@ public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4 if (codeOpt != null && codeOpt.isPresent()) { VersionIndependentConcept code = codeOpt.get(); - ConceptDefinitionComponent def = new ConceptDefinitionComponent(); - def.setCode(code.getCode()); - IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult(def); + IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult() + .setCode(code.getCode()); // AAAAAAAAAAA format return retVal; } - return new IValidationSupport.CodeValidationResult(IssueSeverity.ERROR, "Unknown code {" + theCodeSystem + "}" + theCode); + return new IValidationSupport.CodeValidationResult() + .setSeverity(IssueSeverity.ERROR) + .setMessage("Unknown code {" + theCodeSystem + "}" + theCode); } @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return super.lookupCode(theContext, theSystem, theCode); + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return super.lookupCode(theSystem, theCode); } @Override - public ValidateCodeResult validateCodeIsInPreExpandedValueSet(IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { + public ValidateCodeResult validateCodeIsInPreExpandedValueSet(ValidationOptions theOptions, IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { ValueSet valueSet = (ValueSet) theValueSet; Coding coding = (Coding) theCoding; CodeableConcept codeableConcept = (CodeableConcept) theCodeableConcept; - return super.validateCodeIsInPreExpandedValueSet(valueSet, theSystem, theCode, theDisplay, coding, codeableConcept); + return super.validateCodeIsInPreExpandedValueSet(theOptions, valueSet, theSystem, theCode, theDisplay, coding, codeableConcept); } @Override diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR5.java index afdfdb43a14..5e053177744 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcR5.java @@ -1,29 +1,32 @@ package ca.uhn.fhir.jpa.term; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.dao.IFhirResourceDao; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; +import ca.uhn.fhir.jpa.dao.DaoRegistry; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.term.api.ITermReadSvcR5; -import ca.uhn.fhir.util.CoverageIgnore; +import ca.uhn.fhir.jpa.term.ex.ExpansionTooCostlyException; import ca.uhn.fhir.util.ValidateUtil; +import ca.uhn.fhir.util.VersionIndependentConcept; +import org.hl7.fhir.convertors.conv40_50.CodeSystem40_50; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.*; +import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.r5.model.CodeableConcept; +import org.hl7.fhir.r5.model.Coding; +import org.hl7.fhir.r5.model.ValueSet; +import org.hl7.fhir.utilities.TerminologyServiceOptions; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.TransactionTemplate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; +import javax.transaction.Transactional; import java.util.Optional; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -32,7 +35,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,208 +54,79 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; public class TermReadSvcR5 extends BaseTermReadSvcImpl implements IValidationSupport, ITermReadSvcR5 { @Autowired - @Qualifier("myValueSetDaoR5") - private IFhirResourceDao myValueSetResourceDao; - @Autowired - private IValidationSupport myValidationSupport; + private DaoRegistry myDaoRegistry; @Autowired private PlatformTransactionManager myTransactionManager; - private void addAllChildren(String theSystemString, ConceptDefinitionComponent theCode, List theListToPopulate) { - if (isNotBlank(theCode.getCode())) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode())); - } - for (ConceptDefinitionComponent nextChild : theCode.getConcept()) { - addAllChildren(theSystemString, nextChild, theListToPopulate); - } - } - - private boolean addTreeIfItContainsCode(String theSystemString, ConceptDefinitionComponent theNext, String theCode, List theListToPopulate) { - boolean foundCodeInChild = false; - for (ConceptDefinitionComponent nextChild : theNext.getConcept()) { - foundCodeInChild |= addTreeIfItContainsCode(theSystemString, nextChild, theCode, theListToPopulate); - } - - if (theCode.equals(theNext.getCode()) || foundCodeInChild) { - theListToPopulate.add(new VersionIndependentConcept(theSystemString, theNext.getCode())); - return true; - } - - return false; - } - - @Override - public List expandValueSet(String theValueSet) { - // TODO: DM 2019-09-10 - This is problematic because an incorrect URL that matches ValueSet.id will not be found in the terminology tables but will yield a ValueSet here. Depending on the ValueSet, the expansion may time-out. - ValueSet valueSetR5 = myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSet); - if (valueSetR5 == null) { - super.throwInvalidValueSet(theValueSet); - } - - return expandValueSetAndReturnVersionIndependentConcepts(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR5), null); + @Transactional(dontRollbackOn = {ExpansionTooCostlyException.class}) + public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, 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)); } @Override - public IBaseResource expandValueSet(IBaseResource theInput) { + public IBaseResource expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theInput) { org.hl7.fhir.r4.model.ValueSet valueSetToExpand = toCanonicalValueSet(theInput); - org.hl7.fhir.r4.model.ValueSet valueSetR4 = super.expandValueSetInMemory(valueSetToExpand, null); - return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR4); + org.hl7.fhir.r4.model.ValueSet valueSetR4 = super.expandValueSet(theExpansionOptions, valueSetToExpand); + return org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(valueSetR4); } @Override - public IBaseResource expandValueSet(IBaseResource theInput, int theOffset, int theCount) { - org.hl7.fhir.r4.model.ValueSet valueSetToExpand = toCanonicalValueSet(theInput); - org.hl7.fhir.r4.model.ValueSet valueSetR4 = super.expandValueSet(valueSetToExpand, theOffset, theCount); - return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR4); - } - - @Override - public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { + public void expandValueSet(ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) { org.hl7.fhir.r4.model.ValueSet valueSetToExpand = toCanonicalValueSet(theValueSetToExpand); - super.expandValueSet(valueSetToExpand, theValueSetCodeAccumulator); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSet valueSetToExpand = new ValueSet(); - valueSetToExpand.getCompose().addInclude(theInclude); - org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSetInMemory(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetToExpand), null); - return new ValueSetExpander.ValueSetExpansionOutcome(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expandedR4)); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return Collections.emptyList(); - } - - @CoverageIgnore - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return null; - } - - @CoverageIgnore - @Override - public ValueSet fetchValueSet(FhirContext theContext, String theSystem) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @CoverageIgnore - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - private void findCodesAbove(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - for (ConceptDefinitionComponent next : conceptList) { - addTreeIfItContainsCode(theSystemString, next, theCode, theListToPopulate); - } - } - - @Override - public List findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesAbove(system, theSystem, theCode, retVal); - } - return retVal; - } - - private void findCodesBelow(CodeSystem theSystem, String theSystemString, String theCode, List theListToPopulate) { - List conceptList = theSystem.getConcept(); - findCodesBelow(theSystemString, theCode, theListToPopulate, conceptList); - } - - private void findCodesBelow(String theSystemString, String theCode, List theListToPopulate, List conceptList) { - for (ConceptDefinitionComponent next : conceptList) { - if (theCode.equals(next.getCode())) { - addAllChildren(theSystemString, next, theListToPopulate); - } else { - findCodesBelow(theSystemString, theCode, theListToPopulate, next.getConcept()); - } - } - } - - @Override - public List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) { - ArrayList retVal = new ArrayList<>(); - CodeSystem system = myValidationSupport.fetchCodeSystem(myContext, theSystem); - if (system != null) { - findCodesBelow(system, theSystem, theCode, retVal); - } - return retVal; - } - - @Override - public org.hl7.fhir.r4.model.CodeSystem getCodeSystemFromContext(String theSystem) { - CodeSystem codeSystemR5 = myValidationSupport.fetchCodeSystem(myContext, theSystem); - return org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(codeSystemR5); + super.expandValueSet(theExpansionOptions, valueSetToExpand, theValueSetCodeAccumulator); } @Override protected org.hl7.fhir.r4.model.ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) { - ValueSet valueSetR5 = myValueSetResourceDao.toResource(ValueSet.class, theResourceTable, null, false); - return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR5); + ValueSet valueSetR5 = myDaoRegistry.getResourceDao("ValueSet").toResource(ValueSet.class, theResourceTable, null, false); + return org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(valueSetR5); } @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return supportsSystem(theSystem); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - @CoverageIgnore - @Override - public IValidationSupport.CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { Optional codeOpt = Optional.empty(); boolean haveValidated = false; if (isNotBlank(theValueSetUrl)) { - codeOpt = super.validateCodeInValueSet(theValueSetUrl, theCodeSystem, theCode); + codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode); haveValidated = true; } if (!haveValidated) { TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager); txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); - codeOpt = txTemplate.execute(t -> findCode(theCodeSystem, theCode).map(c->c.toVersionIndependentConcept())); + codeOpt = txTemplate.execute(t -> findCode(theCodeSystem, theCode).map(c -> c.toVersionIndependentConcept())); } if (codeOpt != null && codeOpt.isPresent()) { VersionIndependentConcept code = codeOpt.get(); ConceptDefinitionComponent def = new ConceptDefinitionComponent(); def.setCode(code.getCode()); - IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult(def); + IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult() + .setCode(code.getCode()); return retVal; } - return new IValidationSupport.CodeValidationResult(IssueSeverity.ERROR, "Unknown code {" + theCodeSystem + "}" + theCode); + return new IValidationSupport.CodeValidationResult() + .setSeverity(IssueSeverity.ERROR) + .setCode("Unknown code {" + theCodeSystem + "}" + theCode); } @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return super.lookupCode(theContext, theSystem, theCode); + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return super.lookupCode(theSystem, theCode); } @Override - public ValidateCodeResult validateCodeIsInPreExpandedValueSet(IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { + public FhirContext getFhirContext() { + return myContext; + } + + @Override + public ValidateCodeResult validateCodeIsInPreExpandedValueSet(ValidationOptions theOptions, IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) { ValidateUtil.isNotNullOrThrowUnprocessableEntity(theValueSet, "ValueSet must not be null"); ValueSet valueSet = (ValueSet) theValueSet; org.hl7.fhir.r4.model.ValueSet valueSetR4 = toCanonicalValueSet(valueSet); @@ -272,12 +146,17 @@ public class TermReadSvcR5 extends BaseTermReadSvcImpl implements IValidationSup } } - return super.validateCodeIsInPreExpandedValueSet(valueSetR4, theSystem, theCode, theDisplay, codingR4, codeableConceptR4); + return super.validateCodeIsInPreExpandedValueSet(new TerminologyServiceOptions(), valueSetR4, theSystem, theCode, theDisplay, codingR4, codeableConceptR4); } @Override protected org.hl7.fhir.r4.model.ValueSet toCanonicalValueSet(IBaseResource theValueSet) throws org.hl7.fhir.exceptions.FHIRException { - return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet((ValueSet) theValueSet); + return org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet((ValueSet) theValueSet); + } + + @Override + protected org.hl7.fhir.r4.model.CodeSystem toCanonicalCodeSystem(IBaseResource theCodeSystem) { + return CodeSystem40_50.convertCodeSystem((CodeSystem) theCodeSystem); } @Override diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java index 9733c0cfc0b..5f2e73d06b0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu2.java index bf5cfdfd1b2..58e97cb5e69 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu3.java index 61844f54f18..5fce60cfa30 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,9 @@ import org.springframework.context.event.ContextStartedEvent; import org.springframework.context.event.EventListener; import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.hl7.fhir.convertors.conv30_40.CodeSystem30_40.convertCodeSystem; +import static org.hl7.fhir.convertors.conv30_40.ConceptMap30_40.convertConceptMap; +import static org.hl7.fhir.convertors.conv30_40.ValueSet30_40.convertValueSet; public class TermVersionAdapterSvcDstu3 extends BaseTermVersionAdapterSvcImpl implements ITermVersionAdapterSvc { @@ -72,7 +75,7 @@ public class TermVersionAdapterSvcDstu3 extends BaseTermVersionAdapterSvcImpl im public IIdType createOrUpdateCodeSystem(org.hl7.fhir.r4.model.CodeSystem theCodeSystemResource) { CodeSystem resourceToStore; try { - resourceToStore = VersionConvertor_30_40.convertCodeSystem(theCodeSystemResource); + resourceToStore = convertCodeSystem(theCodeSystemResource); } catch (FHIRException e) { throw new InternalErrorException(e); } @@ -89,7 +92,7 @@ public class TermVersionAdapterSvcDstu3 extends BaseTermVersionAdapterSvcImpl im public void createOrUpdateConceptMap(org.hl7.fhir.r4.model.ConceptMap theConceptMap) { ConceptMap resourceToStore; try { - resourceToStore = VersionConvertor_30_40.convertConceptMap(theConceptMap); + resourceToStore = convertConceptMap(theConceptMap); } catch (FHIRException e) { throw new InternalErrorException(e); } @@ -105,7 +108,7 @@ public class TermVersionAdapterSvcDstu3 extends BaseTermVersionAdapterSvcImpl im public void createOrUpdateValueSet(org.hl7.fhir.r4.model.ValueSet theValueSet) { ValueSet valueSetDstu3; try { - valueSetDstu3 = VersionConvertor_30_40.convertValueSet(theValueSet); + valueSetDstu3 = convertValueSet(theValueSet); } catch (FHIRException e) { throw new InternalErrorException(e); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR4.java index a4473381715..bfa30350106 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR5.java index 252f5ff5eb9..83cc9c0ae76 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermVersionAdapterSvcR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ public class TermVersionAdapterSvcR5 extends BaseTermVersionAdapterSvcImpl imple public IIdType createOrUpdateCodeSystem(org.hl7.fhir.r4.model.CodeSystem theCodeSystemResource) { validateCodeSystemForStorage(theCodeSystemResource); - CodeSystem codeSystemR4 = org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(theCodeSystemResource); + CodeSystem codeSystemR4 = org.hl7.fhir.convertors.conv40_50.CodeSystem40_50.convertCodeSystem(theCodeSystemResource); if (isBlank(theCodeSystemResource.getIdElement().getIdPart())) { String matchUrl = "CodeSystem?url=" + UrlUtil.escapeUrlParam(theCodeSystemResource.getUrl()); return myCodeSystemResourceDao.update(codeSystemR4, matchUrl).getId(); @@ -74,7 +74,7 @@ public class TermVersionAdapterSvcR5 extends BaseTermVersionAdapterSvcImpl imple @Override public void createOrUpdateConceptMap(org.hl7.fhir.r4.model.ConceptMap theConceptMap) { - ConceptMap conceptMapR4 = org.hl7.fhir.convertors.conv40_50.ConceptMap.convertConceptMap(theConceptMap); + ConceptMap conceptMapR4 = org.hl7.fhir.convertors.conv40_50.ConceptMap40_50.convertConceptMap(theConceptMap); if (isBlank(theConceptMap.getIdElement().getIdPart())) { String matchUrl = "ConceptMap?url=" + UrlUtil.escapeUrlParam(theConceptMap.getUrl()); @@ -87,7 +87,7 @@ public class TermVersionAdapterSvcR5 extends BaseTermVersionAdapterSvcImpl imple @Override public void createOrUpdateValueSet(org.hl7.fhir.r4.model.ValueSet theValueSet) { - ValueSet valueSetR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(theValueSet); + ValueSet valueSetR4 = org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(theValueSet); if (isBlank(theValueSet.getIdElement().getIdPart())) { String matchUrl = "ValueSet?url=" + UrlUtil.escapeUrlParam(theValueSet.getUrl()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationMatch.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationMatch.java index c198833d6ae..800901a21ea 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationMatch.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationMatch.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationQuery.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationQuery.java index 5c80e2ff7b1..b3af07e132d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationQuery.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java index 100a6c9da06..68fd74d406d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationResult.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationResult.java index 19732601940..f6ea673eef9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationResult.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationResult.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/UploadStatistics.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/UploadStatistics.java index df1e025f571..f679255dff0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/UploadStatistics.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/UploadStatistics.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetConceptAccumulator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetConceptAccumulator.java index b313124f9ce..fa00cda62e7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetConceptAccumulator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetConceptAccumulator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetExpansionComponentWithConceptAccumulator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetExpansionComponentWithConceptAccumulator.java index dd764a189cf..fdb21cb36ff 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetExpansionComponentWithConceptAccumulator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ValueSetExpansionComponentWithConceptAccumulator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermCodeSystemStorageSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermCodeSystemStorageSvc.java index 46c11a56226..310fc90392e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermCodeSystemStorageSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermCodeSystemStorageSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermDeferredStorageSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermDeferredStorageSvc.java index 42899776872..2aff45f7fef 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermDeferredStorageSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermDeferredStorageSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,4 +50,9 @@ public interface ITermDeferredStorageSvc { void addConceptMapsToStorageQueue(List theConceptMaps); void addValueSetsToStorageQueue(List theValueSets); + + /** + * This is mostly here for unit tests - Saves any and all deferred concepts and links + */ + void saveAllDeferred(); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermLoaderSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermLoaderSvc.java index 35176ce6b46..01e55dcf267 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermLoaderSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermLoaderSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,14 +44,11 @@ public interface ITermLoaderSvc { UploadStatistics loadSnomedCt(List theFiles, RequestDetails theRequestDetails); - // FIXME: remove the default implementation before 4.1.0 - default UploadStatistics loadCustom(String theSystem, List theFiles, RequestDetails theRequestDetails) { return null; }; + UploadStatistics loadCustom(String theSystem, List theFiles, RequestDetails theRequestDetails); - // FIXME: remove the default implementation before 4.1.0 - default UploadStatistics loadDeltaAdd(String theSystem, List theFiles, RequestDetails theRequestDetails) { return null; }; + UploadStatistics loadDeltaAdd(String theSystem, List theFiles, RequestDetails theRequestDetails); - // FIXME: remove the default implementation before 4.1.0 - default UploadStatistics loadDeltaRemove(String theSystem, List theFiles, RequestDetails theRequestDetails) { return null; }; + UploadStatistics loadDeltaRemove(String theSystem, List theFiles, RequestDetails theRequestDetails); interface FileDescriptor { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvc.java index 9b1f68d8876..b4ce66d6746 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvc.java @@ -1,5 +1,7 @@ package ca.uhn.fhir.jpa.term.api; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.entity.TermConcept; @@ -8,7 +10,7 @@ import ca.uhn.fhir.jpa.entity.TermConceptMapGroupElementTarget; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.term.IValueSetConceptAccumulator; import ca.uhn.fhir.jpa.term.TranslationRequest; -import ca.uhn.fhir.jpa.term.VersionIndependentConcept; +import ca.uhn.fhir.util.VersionIndependentConcept; import org.hl7.fhir.instance.model.api.IBaseCoding; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -16,7 +18,9 @@ import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.ValueSet; +import org.hl7.fhir.utilities.validation.ValidationOptions; +import javax.annotation.Nullable; import java.util.List; import java.util.Optional; import java.util.Set; @@ -25,7 +29,7 @@ import java.util.Set; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,27 +55,20 @@ import java.util.Set; * been moved yet) *

    */ -public interface ITermReadSvc { +public interface ITermReadSvc extends IValidationSupport { - ValueSet expandValueSetInMemory(ValueSet theValueSetToExpand, VersionIndependentConcept theWantConceptOrNull); + ValueSet expandValueSet(@Nullable ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand); - ValueSet expandValueSet(ValueSet theValueSetToExpand, int theOffset, int theCount); - - void expandValueSet(ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator); + void expandValueSet(@Nullable ValueSetExpansionOptions theExpansionOptions, ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator); /** * Version independent */ - IBaseResource expandValueSet(IBaseResource theValueSetToExpand); + IBaseResource expandValueSet(@Nullable ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand); - /** - * Version independent - */ - IBaseResource expandValueSet(IBaseResource theValueSetToExpand, int theOffset, int theCount); + void expandValueSet(@Nullable ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator); - void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator); - - List expandValueSet(String theValueSet); + List expandValueSet(ValueSetExpansionOptions theExpansionOptions, String theValueSet); Optional findCode(String theCodeSystem, String theCode); @@ -87,7 +84,7 @@ public interface ITermReadSvc { List findCodesBelowUsingBuiltInSystems(String theSystem, String theCode); - CodeSystem getCodeSystemFromContext(String theSystem); + CodeSystem fetchCanonicalCodeSystemFromCompleteContext(String theSystem); void deleteConceptMapAndChildren(ResourceTable theResourceTable); @@ -110,7 +107,7 @@ public interface ITermReadSvc { /** * Version independent */ - ValidateCodeResult validateCodeIsInPreExpandedValueSet(IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept); + ValidateCodeResult validateCodeIsInPreExpandedValueSet(ValidationOptions theOptions, IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept); boolean isValueSetPreExpandedForCodeValidation(ValueSet theValueSet); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcDstu3.java index 15547b4cd97..2d841e567f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.term.api; * #L% */ -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; public interface ITermReadSvcDstu3 extends ITermReadSvc, IValidationSupport { // nothing diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR4.java index 275e9765488..a8415694c7a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.term.api; * #L% */ -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; public interface ITermReadSvcR4 extends ITermReadSvc, IValidationSupport { // nothing diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR5.java index ceced8e261c..98e950e2738 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReadSvcR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package ca.uhn.fhir.jpa.term.api; * #L% */ -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; public interface ITermReadSvcR5 extends ITermReadSvc, IValidationSupport { // nothing diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReindexingSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReindexingSvc.java index c306cca4fec..98b4cce3016 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReindexingSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermReindexingSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermVersionAdapterSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermVersionAdapterSvc.java index 226f7b2a8a1..a460f8be633 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermVersionAdapterSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/api/ITermVersionAdapterSvc.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.api; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/ConceptHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/ConceptHandler.java index 9fd42bcf325..9bd39dfee61 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/ConceptHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/ConceptHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.custom; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/CustomTerminologySet.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/CustomTerminologySet.java index 0373c006340..0590cffd0f6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/CustomTerminologySet.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/CustomTerminologySet.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.custom; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,40 +28,38 @@ import ca.uhn.fhir.jpa.term.TermLoaderSvcImpl; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; -import com.google.common.collect.Multimaps; import org.apache.commons.csv.QuoteMode; import org.apache.commons.lang3.Validate; import javax.annotation.Nonnull; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; public class CustomTerminologySet { private final int mySize; - private final ListMultimap myUnanchoredChildConceptsToParentCodes; private final List myRootConcepts; /** * Constructor for an empty object */ public CustomTerminologySet() { - this(0, ArrayListMultimap.create(), new ArrayList<>()); + this(0, new ArrayList<>()); } /** * Constructor */ - private CustomTerminologySet(int theSize, ListMultimap theUnanchoredChildConceptsToParentCodes, Collection theRootConcepts) { - this(theSize, theUnanchoredChildConceptsToParentCodes, new ArrayList<>(theRootConcepts)); - } - - /** - * Constructor - */ - private CustomTerminologySet(int theSize, ListMultimap theUnanchoredChildConceptsToParentCodes, List theRootConcepts) { + private CustomTerminologySet(int theSize, List theRootConcepts) { mySize = theSize; - myUnanchoredChildConceptsToParentCodes = theUnanchoredChildConceptsToParentCodes; myRootConcepts = theRootConcepts; } @@ -80,10 +78,6 @@ public class CustomTerminologySet { } - public ListMultimap getUnanchoredChildConceptsToParentCodes() { - return Multimaps.unmodifiableListMultimap(myUnanchoredChildConceptsToParentCodes); - } - public int getSize() { return mySize; } @@ -111,22 +105,9 @@ public class CustomTerminologySet { return Collections.unmodifiableList(myRootConcepts); } - public void addUnanchoredChildConcept(String theParentCode, String theCode, String theDisplay) { - Validate.notBlank(theParentCode); - Validate.notBlank(theCode); - - TermConcept code = new TermConcept() - .setCode(theCode) - .setDisplay(theDisplay); - myUnanchoredChildConceptsToParentCodes.put(code, theParentCode); - } - public void validateNoCycleOrThrowInvalidRequest() { Set codes = new HashSet<>(); validateNoCycleOrThrowInvalidRequest(codes, getRootConcepts()); - for (TermConcept next : myUnanchoredChildConceptsToParentCodes.keySet()) { - validateNoCycleOrThrowInvalidRequest(codes, next); - } } private void validateNoCycleOrThrowInvalidRequest(Set theCodes, List theRootConcepts) { @@ -142,25 +123,30 @@ public class CustomTerminologySet { validateNoCycleOrThrowInvalidRequest(theCodes, next.getChildCodes()); } + public Set getRootConceptCodes() { + return getRootConcepts() + .stream() + .map(TermConcept::getCode) + .collect(Collectors.toSet()); + } @Nonnull public static CustomTerminologySet load(LoadedFileDescriptors theDescriptors, boolean theFlat) { final Map code2concept = new LinkedHashMap<>(); - ArrayListMultimap unanchoredChildConceptsToParentCodes = ArrayListMultimap.create(); // Concepts IRecordHandler conceptHandler = new ConceptHandler(code2concept); TermLoaderSvcImpl.iterateOverZipFile(theDescriptors, TermLoaderSvcImpl.CUSTOM_CONCEPTS_FILE, conceptHandler, ',', QuoteMode.NON_NUMERIC, false); if (theFlat) { - return new CustomTerminologySet(code2concept.size(), ArrayListMultimap.create(), code2concept.values()); + return new CustomTerminologySet(code2concept.size(), new ArrayList<>(code2concept.values())); } else { // Hierarchy if (theDescriptors.hasFile(TermLoaderSvcImpl.CUSTOM_HIERARCHY_FILE)) { - IRecordHandler hierarchyHandler = new HierarchyHandler(code2concept, unanchoredChildConceptsToParentCodes); + IRecordHandler hierarchyHandler = new HierarchyHandler(code2concept); TermLoaderSvcImpl.iterateOverZipFile(theDescriptors, TermLoaderSvcImpl.CUSTOM_HIERARCHY_FILE, hierarchyHandler, ',', QuoteMode.NON_NUMERIC, false); } @@ -178,7 +164,7 @@ public class CustomTerminologySet { } // Sort children so they appear in the same order as they did in the concepts.csv file - nextConcept.getChildren().sort((o1,o2)->{ + nextConcept.getChildren().sort((o1, o2) -> { String code1 = o1.getChild().getCode(); String code2 = o2.getChild().getCode(); int order1 = codesInOrder.get(code1); @@ -188,7 +174,7 @@ public class CustomTerminologySet { } - return new CustomTerminologySet(code2concept.size(), unanchoredChildConceptsToParentCodes, rootConcepts); + return new CustomTerminologySet(code2concept.size(), rootConcepts); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/HierarchyHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/HierarchyHandler.java index 9aecb3105fd..80fedacb9f7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/HierarchyHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/custom/HierarchyHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.custom; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink; import ca.uhn.fhir.jpa.term.IRecordHandler; import ca.uhn.fhir.util.ValidateUtil; -import com.google.common.collect.ArrayListMultimap; import org.apache.commons.csv.CSVRecord; import java.util.Map; @@ -37,11 +36,9 @@ public class HierarchyHandler implements IRecordHandler { public static final String PARENT = "PARENT"; public static final String CHILD = "CHILD"; private final Map myCode2Concept; - private final ArrayListMultimap myUnanchoredChildConceptsToParentCodes; - public HierarchyHandler(Map theCode2concept, ArrayListMultimap theunanchoredChildConceptsToParentCodes) { + public HierarchyHandler(Map theCode2concept) { myCode2Concept = theCode2concept; - myUnanchoredChildConceptsToParentCodes = theunanchoredChildConceptsToParentCodes; } @Override @@ -51,14 +48,12 @@ public class HierarchyHandler implements IRecordHandler { if (isNotBlank(parent) && isNotBlank(child)) { TermConcept childConcept = myCode2Concept.get(child); - ValidateUtil.isNotNullOrThrowUnprocessableEntity(childConcept, "Child code %s not found", child); + ValidateUtil.isNotNullOrThrowUnprocessableEntity(childConcept, "Child code %s not found in file", child); TermConcept parentConcept = myCode2Concept.get(parent); - if (parentConcept == null) { - myUnanchoredChildConceptsToParentCodes.put(childConcept, parent); - } else { - parentConcept.addChild(childConcept, TermConceptParentChildLink.RelationshipTypeEnum.ISA); - } + ValidateUtil.isNotNullOrThrowUnprocessableEntity(parentConcept, "Parent code %s not found in file", child); + + parentConcept.addChild(childConcept, TermConceptParentChildLink.RelationshipTypeEnum.ISA); } } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ex/ExpansionTooCostlyException.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ex/ExpansionTooCostlyException.java index c917c924208..0ec872dc344 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ex/ExpansionTooCostlyException.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ex/ExpansionTooCostlyException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.ex; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java index a2e2b7a43c6..45d18b792dc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincTop2000LabResultsHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincTop2000LabResultsHandler.java index 680997ae7ef..075b33bba8f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincTop2000LabResultsHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/BaseLoincTop2000LabResultsHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java index f484a483d03..1fc56a37780 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListLinkHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListLinkHandler.java index 5df99e6e45c..41c6e9ae5cf 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListLinkHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincAnswerListLinkHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincDocumentOntologyHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincDocumentOntologyHandler.java index 9e8ccf71fdf..01b90342432 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincDocumentOntologyHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincDocumentOntologyHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupFileHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupFileHandler.java index 45033adc54c..dfb92317cdc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupFileHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupFileHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupTermsFileHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupTermsFileHandler.java index ac844b4db1c..5403795a2fd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupTermsFileHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincGroupTermsFileHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHandler.java index 5f37bec22cb..ecf3dce5c73 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,7 @@ public class LoincHandler implements IRecordHandler { concept.addPropertyString(nextPropertyName, nextPropertyValue); break; case CODING: - // FIXME: handle "Ser/Plas^Donor" + // TODO: handle "Ser/Plas^Donor" String propertyValue = nextPropertyValue; if (nextPropertyName.equals("COMPONENT")) { if (propertyValue.contains("^")) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHierarchyHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHierarchyHandler.java index 8afac741c0b..ee5b07763fd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHierarchyHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincHierarchyHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincIeeeMedicalDeviceCodeHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincIeeeMedicalDeviceCodeHandler.java index 6ba85e6422d..75bf1fbc2b6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincIeeeMedicalDeviceCodeHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincIeeeMedicalDeviceCodeHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincImagingDocumentCodeHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincImagingDocumentCodeHandler.java index 674b7a9ecf1..b82ce5a05de 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincImagingDocumentCodeHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincImagingDocumentCodeHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincParentGroupFileHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincParentGroupFileHandler.java index ce6d1503510..a32ded361e8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincParentGroupFileHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincParentGroupFileHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartHandler.java index f19cdcc02de..eda9f877530 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartLinkHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartLinkHandler.java index 04e07c567d4..e9e1bae1031 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartLinkHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartLinkHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartRelatedCodeMappingHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartRelatedCodeMappingHandler.java index c12fc6532da..02e08bc533e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartRelatedCodeMappingHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincPartRelatedCodeMappingHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ package ca.uhn.fhir.jpa.term.loinc; */ import ca.uhn.fhir.jpa.entity.TermConcept; -import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; import ca.uhn.fhir.jpa.term.IRecordHandler; +import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import org.apache.commons.csv.CSVRecord; import org.hl7.fhir.r4.model.ConceptMap; @@ -40,16 +40,13 @@ public class LoincPartRelatedCodeMappingHandler extends BaseLoincHandler impleme public static final String LOINC_SCT_PART_MAP_ID = "loinc-parts-to-snomed-ct"; public static final String LOINC_SCT_PART_MAP_URI = "http://loinc.org/cm/loinc-parts-to-snomed-ct"; - private static final String LOINC_SCT_PART_MAP_NAME = "LOINC Part Map to SNOMED CT"; - public static final String LOINC_TERM_TO_RPID_PART_MAP_ID = "loinc-to-rpids"; public static final String LOINC_TERM_TO_RPID_PART_MAP_URI = "http://loinc.org/cm/loinc-to-rpids"; public static final String LOINC_TERM_TO_RPID_PART_MAP_NAME = "LOINC Terms to RadLex RPIDs"; - public static final String LOINC_PART_TO_RID_PART_MAP_ID = "loinc-part-to-rids"; public static final String LOINC_PART_TO_RID_PART_MAP_URI = "http://loinc.org/cm/loinc-part-to-rids"; public static final String LOINC_PART_TO_RID_PART_MAP_NAME = "LOINC Parts to RadLex RIDs"; - + private static final String LOINC_SCT_PART_MAP_NAME = "LOINC Part Map to SNOMED CT"; private static final String LOINC_RXNORM_PART_MAP_ID = "loinc-parts-to-rxnorm"; private static final String LOINC_RXNORM_PART_MAP_URI = "http://loinc.org/cm/loinc-parts-to-rxnorm"; private static final String LOINC_RXNORM_PART_MAP_NAME = "LOINC Part Map to RxNORM"; @@ -69,32 +66,30 @@ public class LoincPartRelatedCodeMappingHandler extends BaseLoincHandler impleme String partNumber = trim(theRecord.get("PartNumber")); String partName = trim(theRecord.get("PartName")); - String partTypeName = trim(theRecord.get("PartTypeName")); String extCodeId = trim(theRecord.get("ExtCodeId")); // TODO: use hex code for ascii 160 extCodeId = extCodeId.replace(" ", ""); String extCodeDisplayName = trim(theRecord.get("ExtCodeDisplayName")); String extCodeSystem = trim(theRecord.get("ExtCodeSystem")); - String mapType = trim(theRecord.get("MapType")); - String contentOrigin = trim(theRecord.get("ContentOrigin")); + String mapType = trim(theRecord.get("Equivalence")); String extCodeSystemVersion = trim(theRecord.get("ExtCodeSystemVersion")); String extCodeSystemCopyrightNotice = trim(theRecord.get("ExtCodeSystemCopyrightNotice")); Enumerations.ConceptMapEquivalence equivalence; switch (trim(defaultString(mapType))) { case "": - case "Exact": + case "equivalent": // 'equal' is more exact than 'equivalent' in the equivalence codes equivalence = Enumerations.ConceptMapEquivalence.EQUAL; break; - case "LOINC broader": + case "narrower": equivalence = Enumerations.ConceptMapEquivalence.NARROWER; break; - case "LOINC narrower": + case "wider": equivalence = Enumerations.ConceptMapEquivalence.WIDER; break; default: - throw new InternalErrorException("Unknown MapType '" + mapType + "' for PartNumber: " + partNumber); + throw new InternalErrorException("Unknown equivalence '" + mapType + "' for PartNumber: " + partNumber); } String loincPartMapId; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java index ef76aa82781..690b7effd73 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincRsnaPlaybookHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsSiHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsSiHandler.java index 9ede2baf076..31032029ba9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsSiHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsSiHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsUsHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsUsHandler.java index c4f809885fc..e55dad7fe29 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsUsHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincTop2000LabResultsUsHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUniversalOrderSetHandler.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUniversalOrderSetHandler.java index 0b47142e360..dd20a25285a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUniversalOrderSetHandler.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUniversalOrderSetHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUploadPropertiesEnum.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUploadPropertiesEnum.java index 0735b0a5362..40c36d6eb3e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUploadPropertiesEnum.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/LoincUploadPropertiesEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/PartTypeAndPartName.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/PartTypeAndPartName.java index 1052d6843e5..cb49f2dc07b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/PartTypeAndPartName.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/loinc/PartTypeAndPartName.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.loinc; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerConcept.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerConcept.java index 7de933c358f..1a7a4bf6a3a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerConcept.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerConcept.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.snomedct; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerDescription.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerDescription.java index 3ca15b0872b..59a7cb07602 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerDescription.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerDescription.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.snomedct; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java index 9a5a4c1d484..c3ef275a018 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.term.snomedct; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AddRemoveCount.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AddRemoveCount.java index 21d3240f5d2..f7ddac7b1b0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AddRemoveCount.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AddRemoveCount.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AllowStatusChangeMetadata.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AllowStatusChangeMetadata.java index ca0de12f46d..871ffb1dab2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AllowStatusChangeMetadata.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/AllowStatusChangeMetadata.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseCaptureQueriesListener.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseCaptureQueriesListener.java index 71fdbc72d2f..c75ec883429 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseCaptureQueriesListener.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseCaptureQueriesListener.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseIterator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseIterator.java index e36bf3aa7b2..ae58a41e86f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseIterator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/BaseIterator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CircularQueueCaptureQueriesListener.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CircularQueueCaptureQueriesListener.java index 6a05a26dae7..1f53a02cb23 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CircularQueueCaptureQueriesListener.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CircularQueueCaptureQueriesListener.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,12 @@ import org.hl7.fhir.dstu3.model.InstantType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Queue; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -45,7 +50,14 @@ public class CircularQueueCaptureQueriesListener extends BaseCaptureQueriesListe private static final int CAPACITY = 1000; private static final Logger ourLog = LoggerFactory.getLogger(CircularQueueCaptureQueriesListener.class); - private final Queue myQueries = Queues.synchronizedQueue(new CircularFifoQueue<>(CAPACITY)); + private Queue myQueries; + + /** + * Constructor + */ + public CircularQueueCaptureQueriesListener() { + startCollecting(); + } @Override protected Queue provideQueryList() { @@ -59,6 +71,20 @@ public class CircularQueueCaptureQueriesListener extends BaseCaptureQueriesListe myQueries.clear(); } + /** + * Start collecting queries (this is the default) + */ + public void startCollecting() { + myQueries = Queues.synchronizedQueue(new CircularFifoQueue<>(CAPACITY)); + } + + /** + * Stop collecting queries and discard any collected ones + */ + public void stopCollecting() { + myQueries = null; + } + /** * Index 0 is oldest */ @@ -304,7 +330,7 @@ public class CircularQueueCaptureQueriesListener extends BaseCaptureQueriesListe } - private static String formatQueryAsSql(SqlQuery theQuery) { + static String formatQueryAsSql(SqlQuery theQuery) { String formattedSql = theQuery.getSql(true, true); StringBuilder b = new StringBuilder(); b.append("SqlQuery at "); @@ -316,7 +342,7 @@ public class CircularQueueCaptureQueriesListener extends BaseCaptureQueriesListe b.append("\nStack:\n "); Stream stackTraceStream = Arrays.stream(theQuery.getStackTrace()) .map(StackTraceElement::toString) - .filter(t->t.startsWith("ca.")); + .filter(t -> t.startsWith("ca.")); b.append(stackTraceStream.collect(Collectors.joining("\n "))); } b.append("\n"); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CoordCalculator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CoordCalculator.java new file mode 100644 index 00000000000..dd7fb6b425a --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CoordCalculator.java @@ -0,0 +1,58 @@ +package ca.uhn.fhir.jpa.util; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + + +import org.hibernate.search.spatial.impl.Point; + +public class CoordCalculator { + public static final double MAX_SUPPORTED_DISTANCE_KM = 10000.0; // Slightly less than a quarter of the earth's circumference + private static final double RADIUS_EARTH_KM = 6378.1; + + // Source: https://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing + static Point findTarget(double theLatitudeDegrees, double theLongitudeDegrees, double theBearingDegrees, double theDistanceKm) { + + double latitudeRadians = Math.toRadians(Point.normalizeLatitude(theLatitudeDegrees)); + double longitudeRadians = Math.toRadians(Point.normalizeLongitude(theLongitudeDegrees)); + double bearingRadians = Math.toRadians(theBearingDegrees); + double distanceRadians = theDistanceKm / RADIUS_EARTH_KM; + + double targetLatitude = Math.asin( Math.sin(latitudeRadians) * Math.cos(distanceRadians) + + Math.cos(latitudeRadians) * Math.sin(distanceRadians) * Math.cos(bearingRadians)); + + double targetLongitude = longitudeRadians + Math.atan2(Math.sin(bearingRadians) * Math.sin(distanceRadians) * Math.cos(latitudeRadians), + Math.cos(distanceRadians)-Math.sin(latitudeRadians) * Math.sin(targetLatitude)); + + return Point.fromDegrees(Math.toDegrees(targetLatitude), Math.toDegrees(targetLongitude)); + } + + /** + * Find a box around my coordinates such that the closest distance to each edge is the provided distance + */ + public static SearchBox getBox(double theLatitudeDegrees, double theLongitudeDegrees, Double theDistanceKm) { + double diagonalDistanceKm = theDistanceKm * Math.sqrt(2.0); + + Point northEast = CoordCalculator.findTarget(theLatitudeDegrees, theLongitudeDegrees, 45.0, diagonalDistanceKm); + Point southWest = CoordCalculator.findTarget(theLatitudeDegrees, theLongitudeDegrees, 225.0, diagonalDistanceKm); + + return new SearchBox(southWest, northEast); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/Counter.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/Counter.java index 537a02acc0c..f66d5013d4f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/Counter.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/Counter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CurrentThreadCaptureQueriesListener.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CurrentThreadCaptureQueriesListener.java index 20118350255..a8edff8c3e4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CurrentThreadCaptureQueriesListener.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CurrentThreadCaptureQueriesListener.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,19 +20,25 @@ package ca.uhn.fhir.jpa.util; * #L% */ +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.List; import java.util.Queue; +import java.util.stream.Collectors; public class CurrentThreadCaptureQueriesListener extends BaseCaptureQueriesListener { private static final ThreadLocal> ourQueues = new ThreadLocal<>(); + private static final Logger ourLog = LoggerFactory.getLogger(CurrentThreadCaptureQueriesListener.class); @Override protected Queue provideQueryList() { return ourQueues.get(); } - /** * Get the current queue of items and stop collecting */ @@ -58,4 +64,27 @@ public class CurrentThreadCaptureQueriesListener extends BaseCaptureQueriesListe ourQueues.set(new ArrayDeque<>()); } + /** + * Log all captured SELECT queries + * + * @return Returns the number of queries captured + */ + public static int logQueriesForCurrentThreadAndStopCapturing(int... theIndexes) { + List queries = getCurrentQueueAndStopCapturing() + .stream() + .map(CircularQueueCaptureQueriesListener::formatQueryAsSql) + .collect(Collectors.toList()); + + if (theIndexes != null && theIndexes.length > 0) { + List newList = new ArrayList<>(); + for (int i = 0; i < theIndexes.length; i++) { + newList.add(queries.get(theIndexes[i])); + } + queries = newList; + } + + ourLog.info("Select Queries:\n{}", String.join("\n", queries)); + + return queries.size(); + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DeleteConflict.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DeleteConflict.java index 8eb83e406ec..81c902f4f0f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DeleteConflict.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DeleteConflict.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DerbyTenSevenHapiFhirDialect.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DerbyTenSevenHapiFhirDialect.java index 6e87d852c30..8daaa1a91af 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DerbyTenSevenHapiFhirDialect.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/DerbyTenSevenHapiFhirDialect.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOptions.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOptions.java index ffae1070c11..f7a63fbe8e0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOptions.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOptions.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOutcome.java index 13a9b0b8668..28436605768 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ExpungeOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/InterceptorUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/InterceptorUtil.java index c39e610bcf1..a6713bd19e1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/InterceptorUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/InterceptorUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateDeserializer.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateDeserializer.java index 5018bedb0bc..20af12259d1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateDeserializer.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateDeserializer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateSerializer.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateSerializer.java index 125e83cd304..7ba8d6e13fc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateSerializer.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonDateSerializer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonUtil.java index dcdeed0e906..506998c0192 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/JsonUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/LogicUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/LogicUtil.java index 866a8036c6c..1b4761dfaef 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/LogicUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/LogicUtil.java @@ -6,7 +6,7 @@ import ca.uhn.fhir.util.CoverageIgnore; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MethodRequest.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MethodRequest.java index 070eb4a36ad..93f15d8a1fd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MethodRequest.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/MethodRequest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexController.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexController.java index 1fae4331084..0dfa526ab76 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexController.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexController.java @@ -2,7 +2,7 @@ * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexFailureException.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexFailureException.java index 53c16ff962b..2b0826e2c0b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexFailureException.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ReindexFailureException.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java index c5cf0d82294..53a707729f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceProviderFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceProviderFactory.java index 525b9cbfd3e..3344bb2c0da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceProviderFactory.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceProviderFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ScrollableResultsIterator.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ScrollableResultsIterator.java index 891b6932e90..086912325b7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ScrollableResultsIterator.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ScrollableResultsIterator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SearchBox.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SearchBox.java new file mode 100644 index 00000000000..a0b7c09b997 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SearchBox.java @@ -0,0 +1,45 @@ +package ca.uhn.fhir.jpa.util; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import org.hibernate.search.spatial.impl.Point; + +public class SearchBox { + private final Point mySouthWest; + private final Point myNorthEast; + + public SearchBox(Point theSouthWest, Point theNorthEast) { + mySouthWest = theSouthWest; + myNorthEast = theNorthEast; + } + + public Point getSouthWest() { + return mySouthWest; + } + + public Point getNorthEast() { + return myNorthEast; + } + + public boolean crossesAntiMeridian() { + return myNorthEast.getLongitude() < mySouthWest.getLongitude(); + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SpringObjectCaster.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SpringObjectCaster.java index 919d406e2c4..544273ca1e6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SpringObjectCaster.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SpringObjectCaster.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java index 7a6cdf9a1ba..eba016b22e7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQuery.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQueryList.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQueryList.java index 43c045a8261..6ee32b39273 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQueryList.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SqlQueryList.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java index f379748d464..3a6cf79afca 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java @@ -20,7 +20,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu3.java index be6e2b3f5ce..74f54a4dc4d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu3.java @@ -20,7 +20,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorR4.java index d703053d9f0..4d17291a501 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorR4.java @@ -20,7 +20,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java index 95930a119ad..103ee94e7de 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/TestUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import com.google.common.reflect.ClassPath; import com.google.common.reflect.ClassPath.ClassInfo; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.Validate; +import org.hibernate.annotations.Subselect; import org.hibernate.validator.constraints.Length; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.InstantType; @@ -39,7 +40,11 @@ import java.io.InputStream; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; import java.util.stream.Collectors; import static com.google.common.base.Ascii.toUpperCase; @@ -96,7 +101,10 @@ public class TestUtil { private static void scanClass(Set theNames, Class theClazz, boolean theIsSuperClass) { ourLog.info("Scanning: {}", theClazz.getSimpleName()); - scan(theClazz, theNames, theIsSuperClass); + Subselect subselect = theClazz.getAnnotation(Subselect.class); + boolean isView = (subselect != null); + + scan(theClazz, theNames, theIsSuperClass, isView); for (Field nextField : theClazz.getDeclaredFields()) { if (Modifier.isStatic(nextField.getModifiers())) { @@ -104,7 +112,7 @@ public class TestUtil { } ourLog.info(" * Scanning field: {}", nextField.getName()); - scan(nextField, theNames, theIsSuperClass); + scan(nextField, theNames, theIsSuperClass, isView); Lob lobClass = nextField.getAnnotation(Lob.class); if (lobClass != null) { @@ -140,7 +148,7 @@ public class TestUtil { scanClass(theNames, theClazz.getSuperclass(), true); } - private static void scan(AnnotatedElement theAnnotatedElement, Set theNames, boolean theIsSuperClass) { + private static void scan(AnnotatedElement theAnnotatedElement, Set theNames, boolean theIsSuperClass, boolean theIsView) { Table table = theAnnotatedElement.getAnnotation(Table.class); if (table != null) { @@ -198,7 +206,7 @@ public class TestUtil { */ if (field.getType().equals(String.class)) { if (!hasLob) { - if (column.length() == 255) { + if (!theIsView && column.length() == 255) { throw new IllegalStateException("Field does not have an explicit maximum length specified: " + field); } if (column.length() > MAX_COL_LENGTH) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtils.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtils.java index a1e4ea69914..516f7eb617a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtils.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/jsonpatch/JsonPatchUtils.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util.jsonpatch; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/xmlpatch/XmlPatchUtils.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/xmlpatch/XmlPatchUtils.java index e64fbceeb5d..c03507ec756 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/xmlpatch/XmlPatchUtils.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/xmlpatch/XmlPatchUtils.java @@ -12,7 +12,7 @@ import ca.uhn.fhir.context.FhirContext; * #%L * HAPI FHIR JPA Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChain.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChain.java new file mode 100644 index 00000000000..49ffcacb283 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChain.java @@ -0,0 +1,74 @@ +package ca.uhn.fhir.jpa.validation; + +/* + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.jpa.term.api.ITermReadSvc; +import org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService; +import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; + +public class JpaValidationSupportChain extends ValidationSupportChain { + + private final FhirContext myFhirContext; + + @Autowired + @Qualifier("myJpaValidationSupport") + public IValidationSupport myJpaValidationSupport; + + @Qualifier("myDefaultProfileValidationSupport") + @Autowired + private IValidationSupport myDefaultProfileValidationSupport; + @Autowired + private ITermReadSvc myTerminologyService; + + public JpaValidationSupportChain(FhirContext theFhirContext) { + myFhirContext = theFhirContext; + } + + @Override + public FhirContext getFhirContext() { + return myFhirContext; + } + + @PreDestroy + public void flush() { + invalidateCaches(); + } + + @PostConstruct + public void postConstruct() { + addValidationSupport((IValidationSupport) new CommonCodeSystemsTerminologyService(myFhirContext)); + addValidationSupport(myDefaultProfileValidationSupport); + addValidationSupport(myJpaValidationSupport); + addValidationSupport((IValidationSupport) myTerminologyService); + addValidationSupport((IValidationSupport) new SnapshotGeneratingValidationSupport(myFhirContext)); + addValidationSupport((IValidationSupport) new InMemoryTerminologyServerValidationSupport(myFhirContext)); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainDstu3.java deleted file mode 100644 index 9cd2ab5402b..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainDstu3.java +++ /dev/null @@ -1,88 +0,0 @@ -package ca.uhn.fhir.jpa.validation; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.term.api.ITermReadSvcDstu3; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.dstu3.hapi.validation.SnapshotGeneratingValidationSupport; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; - -public class JpaValidationSupportChainDstu3 extends ValidationSupportChain { - - @Autowired - @Qualifier("myJpaValidationSupportDstu3") - public ca.uhn.fhir.jpa.dao.dstu3.IJpaValidationSupportDstu3 myJpaValidationSupportDstu3; - @Autowired - private DefaultProfileValidationSupport myDefaultProfileValidationSupport; - @Autowired - private ITermReadSvcDstu3 myTerminologyService; - @Autowired - private FhirContext myFhirContext; - - public JpaValidationSupportChainDstu3() { - super(); - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - return super.fetchResource(theContext, theClass, theUri); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - StructureDefinition retVal = super.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null && !retVal.hasSnapshot()) { - retVal = generateSnapshot(retVal, theUrl, null); - } - return retVal; - } - - public void flush() { - myDefaultProfileValidationSupport.flush(); - } - - @PostConstruct - public void postConstruct() { - addValidationSupport(myDefaultProfileValidationSupport); - addValidationSupport(myJpaValidationSupportDstu3); - addValidationSupport(myTerminologyService); - addValidationSupport(new SnapshotGeneratingValidationSupport(myFhirContext, this)); - } - - @PreDestroy - public void preDestroy() { - flush(); - } - - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR4.java deleted file mode 100644 index 182da276ced..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR4.java +++ /dev/null @@ -1,92 +0,0 @@ -package ca.uhn.fhir.jpa.validation; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.validation.SnapshotGeneratingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; - -public class JpaValidationSupportChainR4 extends ValidationSupportChain { - - @Autowired - private DefaultProfileValidationSupport myDefaultProfileValidationSupport; - - @Autowired - private FhirContext myFhirContext; - - @Autowired - @Qualifier("myJpaValidationSupportR4") - public ca.uhn.fhir.jpa.dao.r4.IJpaValidationSupportR4 myJpaValidationSupportR4; - - @Autowired - private ITermReadSvcR4 myTerminologyService; - - public JpaValidationSupportChainR4() { - super(); - } - - public void flush() { - myDefaultProfileValidationSupport.flush(); - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - return super.fetchResource(theContext, theClass, theUri); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - StructureDefinition retVal = super.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null && !retVal.hasSnapshot()) { - retVal = generateSnapshot(retVal, theUrl, null, null); - } - return retVal; - } - - - @PostConstruct - public void postConstruct() { - addValidationSupport(myDefaultProfileValidationSupport); - addValidationSupport(myJpaValidationSupportR4); - addValidationSupport(myTerminologyService); - addValidationSupport(new SnapshotGeneratingValidationSupport(myFhirContext, this)); - } - - @PreDestroy - public void preDestroy() { - flush(); - } - - -} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR5.java deleted file mode 100644 index e1094f9a585..00000000000 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/validation/JpaValidationSupportChainR5.java +++ /dev/null @@ -1,87 +0,0 @@ -package ca.uhn.fhir.jpa.validation; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.jpa.term.api.ITermReadSvcR5; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r5.hapi.validation.SnapshotGeneratingValidationSupport; -import org.hl7.fhir.r5.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; - -public class JpaValidationSupportChainR5 extends ValidationSupportChain { - - @Autowired - private DefaultProfileValidationSupport myDefaultProfileValidationSupport; - - @Autowired - private FhirContext myFhirContext; - - @Autowired - @Qualifier("myJpaValidationSupportR5") - public ca.uhn.fhir.jpa.dao.r5.IJpaValidationSupportR5 myJpaValidationSupportR5; - - @Autowired - private ITermReadSvcR5 myTerminologyService; - - public JpaValidationSupportChainR5() { - super(); - } - - @PreDestroy - public void flush() { - myDefaultProfileValidationSupport.flush(); - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - return super.fetchResource(theContext, theClass, theUri); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - StructureDefinition retVal = super.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null && !retVal.hasSnapshot()) { - retVal = generateSnapshot(retVal, theUrl, null, null); - } - return retVal; - } - - - @PostConstruct - public void postConstruct() { - addValidationSupport(myDefaultProfileValidationSupport); - addValidationSupport(myJpaValidationSupportR5); - addValidationSupport(myTerminologyService); - addValidationSupport(new SnapshotGeneratingValidationSupport(myFhirContext, this)); - } - -} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java index 436627a67b2..34e835f5e83 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java @@ -9,7 +9,6 @@ import ca.uhn.fhir.jpa.entity.BulkExportCollectionFileEntity; import ca.uhn.fhir.jpa.entity.BulkExportJobEntity; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.test.utilities.UnregisterScheduledProcessor; import com.google.common.base.Charsets; import com.google.common.collect.Sets; import org.apache.commons.lang3.time.DateUtils; @@ -23,7 +22,6 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.TestPropertySource; import java.util.Date; import java.util.UUID; @@ -34,6 +32,7 @@ import static org.junit.Assert.*; public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test { private static final Logger ourLog = LoggerFactory.getLogger(BulkDataExportSvcImplR4Test.class); + public static final String TEST_FILTER = "Patient?gender=female"; @Autowired private IBulkExportJobDao myBulkExportJobDao; @Autowired @@ -134,13 +133,13 @@ public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test { createResources(); // Create a bulk job - IBulkDataExportSvc.JobInfo jobDetails = myBulkDataExportSvc.submitJob(null, Sets.newHashSet("Patient", "Observation"), null, null); + IBulkDataExportSvc.JobInfo jobDetails = myBulkDataExportSvc.submitJob(null, Sets.newHashSet("Patient", "Observation"), null, Sets.newHashSet(TEST_FILTER)); assertNotNull(jobDetails.getJobId()); // Check the status IBulkDataExportSvc.JobInfo status = myBulkDataExportSvc.getJobStatusOrThrowResourceNotFound(jobDetails.getJobId()); assertEquals(BulkJobStatusEnum.SUBMITTED, status.getStatus()); - assertEquals("/$export?_outputFormat=application%2Ffhir%2Bndjson&_type=Observation,Patient", status.getRequest()); + assertEquals("/$export?_outputFormat=application%2Ffhir%2Bndjson&_type=Observation,Patient&_typeFilter="+TEST_FILTER, status.getRequest()); // Run a scheduled pass to build the export myBulkDataExportSvc.buildExportFiles(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java index fb81ca3896f..92dd30de97b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu2Config.java @@ -157,7 +157,7 @@ public class TestDstu2Config extends BaseJavaConfigDstu2 { requestValidator.setFailOnSeverity(ResultSeverityEnum.ERROR); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorDstu2()); + requestValidator.addValidatorModule(instanceValidator()); return requestValidator; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java index 87469cab62e..cfe971d22aa 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java @@ -157,7 +157,7 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { requestValidator.setFailOnSeverity(ResultSeverityEnum.ERROR); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorDstu3()); + requestValidator.addValidatorModule(instanceValidator()); return requestValidator; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index c7da23d9005..3955361d5fd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -163,7 +163,7 @@ public class TestR4Config extends BaseJavaConfigR4 { requestValidator.setFailOnSeverity(ResultSeverityEnum.ERROR); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorR4()); + requestValidator.addValidatorModule(instanceValidator()); return requestValidator; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java index 637ef1a7342..90a359ea404 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR5Config.java @@ -159,7 +159,7 @@ public class TestR5Config extends BaseJavaConfigR5 { requestValidator.setFailOnSeverity(ResultSeverityEnum.ERROR); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorR5()); + requestValidator.addValidatorModule(instanceValidator()); return requestValidator; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java index 14b1779dd9c..cc62e1bf1cb 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/BaseJpaTest.java @@ -16,7 +16,7 @@ import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; import ca.uhn.fhir.jpa.search.cache.ISearchResultCacheSvc; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; -import ca.uhn.fhir.jpa.term.VersionIndependentConcept; +import ca.uhn.fhir.util.VersionIndependentConcept; import ca.uhn.fhir.jpa.util.CircularQueueCaptureQueriesListener; import ca.uhn.fhir.jpa.util.ExpungeOptions; import ca.uhn.fhir.model.dstu2.resource.Bundle; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchBuilderTest.java index 10708c8a82d..9915a2cddb0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchBuilderTest.java @@ -4,114 +4,31 @@ import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.param.ParamPrefixEnum; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; -import java.math.BigDecimal; -import java.math.MathContext; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.hamcrest.Matchers.startsWith; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) public class SearchBuilderTest { - private static final Logger ourLog = LoggerFactory.getLogger(SearchBuilderTest.class); - @Test - public void testCalculateMultiplierEqualNoDecimal() { - BigDecimal in = new BigDecimal("200"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertEquals("0.5", out.toPlainString()); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_() { - BigDecimal in = new BigDecimal("200."); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertEquals("0.5", out.toPlainString()); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision123_010() { - BigDecimal in = new BigDecimal("123.010"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.0005")); - - BigDecimal low = in.subtract(out, MathContext.DECIMAL64); - BigDecimal high = in.add(out, MathContext.DECIMAL64); - ourLog.info("{} <= {} <= {}", new Object[] {low.toPlainString(), in.toPlainString(), high.toPlainString()}); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_0() { - BigDecimal in = new BigDecimal("200.0"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.05000000")); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_3() { - BigDecimal in = new BigDecimal("200.3"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.05000000")); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_300() { - BigDecimal in = new BigDecimal("200.300"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.0005000000")); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_30000000() { - BigDecimal in = new BigDecimal("200.30000000"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.000000005000000")); - } - - @Test - public void testCalculateMultiplierEqualDecimalPrecision200_300000001() { - BigDecimal in = new BigDecimal("200.300000001"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("0.0000000005000000")); - } - - @Test - public void testCalculateMultiplierApprox() { - BigDecimal in = new BigDecimal("200"); - BigDecimal out = SearchBuilder.calculateFuzzAmount(ParamPrefixEnum.APPROXIMATE, in); - ourLog.info(out.toPlainString()); - assertThat(out.toPlainString(), startsWith("20.000")); - } @Test public void testIncludeIterator() { BaseHapiFhirDao mockDao = mock(BaseHapiFhirDao.class); - when(mockDao.getConfig()).thenReturn(new DaoConfig()); - SearchBuilder searchBuilder = new SearchBuilder(mockDao); - + SearchBuilder searchBuilder = new SearchBuilder(mockDao, null, null); + searchBuilder.setDaoConfigForUnitTest(new DaoConfig()); searchBuilder.setParamsForUnitTest(new SearchParameterMap()); EntityManager mockEntityManager = mock(EntityManager.class); searchBuilder.setEntityManagerForUnitTest(mockEntityManager); @@ -122,11 +39,10 @@ public class SearchBuilderTest { TypedQuery mockQuery = mock(TypedQuery.class); when(mockEntityManager.createQuery(any(), any())).thenReturn(mockQuery); - List resultList = new ArrayList<>(); - ResourceLink link = new ResourceLink(); + List resultList = new ArrayList<>(); + Long link = 1L; ResourceTable target = new ResourceTable(); target.setId(1L); - link.setTargetResource(target); resultList.add(link); when(mockQuery.getResultList()).thenReturn(resultList); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchFilterSyntaxTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchFilterSyntaxTest.java index 0ac6efd5669..7f3cbd027a5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchFilterSyntaxTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/SearchFilterSyntaxTest.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.dao; +import ca.uhn.fhir.jpa.dao.predicate.SearchFilterParser; import ca.uhn.fhir.util.TestUtil; import org.junit.AfterClass; import org.junit.Assert; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java index a8a2d2ec5e6..0eb46d1ddb5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java @@ -426,7 +426,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { myPatientDao.create(p, mySrd); fail(); } catch (UnprocessableEntityException e) { - assertEquals("Resource contains reference to Organization/" + id1.getIdPart() + " but resource with ID " + id1.getIdPart() + " is actually of type Observation", e.getMessage()); + assertEquals("Resource contains reference to unknown resource ID Organization/" + id1.getIdPart(), e.getMessage()); } // Now with a forced ID diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2ValidateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2ValidateTest.java index df32f31e341..5f767952dfa 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2ValidateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2ValidateTest.java @@ -1,9 +1,5 @@ package ca.uhn.fhir.jpa.dao.dstu2; -import static org.hamcrest.Matchers.containsString; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; @@ -32,7 +28,11 @@ import org.junit.Before; import org.junit.Test; import java.io.IOException; -import java.util.Arrays; +import java.util.Collections; + +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class FhirResourceDaoDstu2ValidateTest extends BaseJpaDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu2ValidateTest.class); @@ -94,15 +94,14 @@ public class FhirResourceDaoDstu2ValidateTest extends BaseJpaDstu2Test { myStructureDefinitionDao.create(sd, mySrd); Observation input = new Observation(); - ResourceMetadataKeyEnum.PROFILES.put(input, Arrays.asList(new IdDt(sd.getUrl()))); + ResourceMetadataKeyEnum.PROFILES.put(input, Collections.singletonList(new IdDt(sd.getUrl()))); input.addIdentifier().setSystem("http://acme").setValue("12345"); input.getEncounter().setReference("http://foo.com/Encounter/9"); input.setStatus(ObservationStatusEnum.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - String encoded = null; - MethodOutcome outcome = null; + String encoded; ValidationModeEnum mode = ValidationModeEnum.CREATE; switch (enc) { case JSON: @@ -130,12 +129,12 @@ public class FhirResourceDaoDstu2ValidateTest extends BaseJpaDstu2Test { } @Test - public void testValidateResourceContainingProfileDeclarationInvalid() throws Exception { + public void testValidateResourceContainingProfileDeclarationInvalid() { String methodName = "testValidateResourceContainingProfileDeclarationInvalid"; Observation input = new Observation(); String profileUri = "http://example.com/StructureDefinition/" + methodName; - ResourceMetadataKeyEnum.PROFILES.put(input, Arrays.asList(new IdDt(profileUri))); + ResourceMetadataKeyEnum.PROFILES.put(input, Collections.singletonList(new IdDt(profileUri))); input.addIdentifier().setSystem("http://acme").setValue("12345"); input.getEncounter().setReference("http://foo.com/Encounter/9"); @@ -144,11 +143,15 @@ public class FhirResourceDaoDstu2ValidateTest extends BaseJpaDstu2Test { ValidationModeEnum mode = ValidationModeEnum.CREATE; String encoded = myFhirCtx.newJsonParser().encodeResourceToString(input); - MethodOutcome outcome = myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); - - String ooString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome.getOperationOutcome()); - ourLog.info(ooString); - assertThat(ooString, containsString("StructureDefinition reference \\\"" + profileUri + "\\\" could not be resolved")); + ourLog.info(encoded); + try { + myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); + fail(); + } catch (PreconditionFailedException e) { + String ooString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()); + ourLog.info(ooString); + assertThat(ooString, containsString("Profile reference \\\"http://example.com/StructureDefinition/testValidateResourceContainingProfileDeclarationInvalid\\\" could not be resolved, so has not been checked")); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java index 45bb5e84837..a8e26bce61f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/BaseJpaDstu3Test.java @@ -1,6 +1,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.jpa.bulk.IBulkDataExportSvc; import ca.uhn.fhir.jpa.config.TestDstu3Config; import ca.uhn.fhir.jpa.dao.*; @@ -24,7 +25,6 @@ import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.jpa.util.ResourceProviderFactory; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainDstu3; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.Constants; @@ -35,8 +35,6 @@ import ca.uhn.fhir.util.UrlUtil; import org.apache.commons.io.IOUtils; import org.hibernate.search.jpa.FullTextEntityManager; import org.hibernate.search.jpa.Search; -import org.hl7.fhir.convertors.VersionConvertor_30_40; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -60,13 +58,14 @@ import java.io.IOException; import java.io.InputStream; import java.util.Map; +import static org.hl7.fhir.convertors.conv30_40.ConceptMap30_40.convertConceptMap; import static org.junit.Assert.fail; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestDstu3Config.class}) public abstract class BaseJpaDstu3Test extends BaseJpaTest { - private static JpaValidationSupportChainDstu3 ourJpaValidationSupportChainDstu3; + private static IValidationSupport ourJpaValidationSupportChainDstu3; private static IFhirResourceDaoValueSet ourValueSetDao; @Autowired @@ -148,6 +147,9 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { @Qualifier("myLocationDaoDstu3") protected IFhirResourceDao myLocationDao; @Autowired + @Qualifier("myPractitionerRoleDaoDstu3") + protected IFhirResourceDao myPractitionerRoleDao; + @Autowired @Qualifier("myMediaDaoDstu3") protected IFhirResourceDao myMediaDao; @Autowired @@ -253,7 +255,7 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { @Autowired protected PlatformTransactionManager myTxManager; @Autowired - @Qualifier("myJpaValidationSupportChainDstu3") + @Qualifier("myJpaValidationSupportChain") protected IValidationSupport myValidationSupport; @Autowired @Qualifier("myValueSetDaoDstu3") @@ -263,7 +265,7 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { @Autowired protected ITermConceptMapGroupElementTargetDao myTermConceptMapGroupElementTargetDao; @Autowired - private JpaValidationSupportChainDstu3 myJpaValidationSupportChainDstu3; + private IValidationSupport myJpaValidationSupportChainDstu3; @Autowired private IBulkDataExportSvc myBulkDataExportSvc; @Autowired @@ -357,7 +359,7 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { @AfterClass public static void afterClassClearContextBaseJpaDstu3Test() { ourValueSetDao.purgeCaches(); - ourJpaValidationSupportChainDstu3.flush(); + ourJpaValidationSupportChainDstu3.invalidateCaches(); TestUtil.clearAllStaticFieldsForUnitTest(); } @@ -386,7 +388,7 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest { */ public static ConceptMap createConceptMap() { try { - return VersionConvertor_30_40.convertConceptMap(BaseJpaR4Test.createConceptMap()); + return convertConceptMap(BaseJpaR4Test.createConceptMap()); } catch (FHIRException fe) { throw new InternalErrorException(fe); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ContainedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ContainedTest.java index 941900ae49d..c24c0825d8a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ContainedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ContainedTest.java @@ -1,5 +1,9 @@ package ca.uhn.fhir.jpa.dao.dstu3; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.param.TokenParamModifier; +import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.dstu3.model.Observation; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.dstu3.model.Reference; @@ -7,8 +11,8 @@ import org.hl7.fhir.instance.model.api.IIdType; import org.junit.AfterClass; import org.junit.Test; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.util.TestUtil; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; public class FhirResourceDaoDstu3ContainedTest extends BaseJpaDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3ContainedTest.class); @@ -47,12 +51,9 @@ public class FhirResourceDaoDstu3ContainedTest extends BaseJpaDstu3Test { ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(o2)); - SearchParameterMap map; - -// map = new SearchParameterMap(); -// map.add(Observation.SP_CODE, new TokenParam(null, "some observation").setModifier(TokenParamModifier.TEXT)); -// assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id1, id2))); - + SearchParameterMap map = new SearchParameterMap(); + map.add(Observation.SP_CODE, new TokenParam(null, "some observation").setModifier(TokenParamModifier.TEXT)); + assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(oid1, oid2))); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ReferentialIntegrityTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ReferentialIntegrityTest.java index 69c2d9472e6..9c6ac1e2bb6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ReferentialIntegrityTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ReferentialIntegrityTest.java @@ -24,7 +24,7 @@ public class FhirResourceDaoDstu3ReferentialIntegrityTest extends BaseJpaDstu3Te } @Test - public void testCreateUnknownReferenceFail() throws Exception { + public void testCreateUnknownReferenceFail() { Patient p = new Patient(); p.setManagingOrganization(new Reference("Organization/AAA")); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java index c9916d62c22..43f2d598f17 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchCustomSearchParamTest.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.dao.dstu3; import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.DaoMethodOutcome; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.rest.api.server.IBundleProvider; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchDistanceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchDistanceTest.java new file mode 100644 index 00000000000..5867db54e93 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchDistanceTest.java @@ -0,0 +1,134 @@ +package ca.uhn.fhir.jpa.dao.dstu3; + +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; +import ca.uhn.fhir.rest.param.TokenParam; +import org.hl7.fhir.dstu3.model.Location; +import org.junit.Before; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.InvalidDataAccessApiUsageException; + +import java.util.List; + +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.*; + +public class FhirResourceDaoDstu3SearchDistanceTest extends BaseJpaDstu3Test { + @Autowired + MatchUrlService myMatchUrlService; + + @Before + public void beforeDisableResultReuse() { + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testNearSearchDistanceNoDistance() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LONGITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + latitude + ":" + longitude, + myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + + @Test + public void testNearSearchDistanceZero() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LONGITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + latitude + ":" + longitude + + "&" + + Location.SP_NEAR_DISTANCE + "=0||", + myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + + @Test + public void testNearSearchApproximate() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + ":" + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + Location.SP_NEAR_DISTANCE + "=" + bigEnoughDistance + "|http://unitsofmeasure.org|km", myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + ":" + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + Location.SP_NEAR_DISTANCE + "=" + tooSmallDistance + "|http://unitsofmeasure.org|km", myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids.size(), is(0)); + } + + } + + @Test + public void testBadCoordsFormat() { + assertInvalidNearFormat("1:2:3"); + assertInvalidNearFormat("1:"); + assertInvalidNearFormat(":"); + assertInvalidNearFormat(""); + } + + private void assertInvalidNearFormat(String theCoords) { + SearchParameterMap map = new SearchParameterMap(); + map.add(Location.SP_NEAR, new TokenParam(theCoords)); + map.setLoadSynchronous(true); + try { + myLocationDao.search(map); + fail(); + } catch (InvalidDataAccessApiUsageException e) { + assertEquals("Invalid position format '" + theCoords + "'. Required format is 'latitude:longitude'", e.getCause().getMessage()); + } + } + + @Test + public void testNearMissingLat() { + SearchParameterMap map = new SearchParameterMap(); + map.add(Location.SP_NEAR, new TokenParam(":2")); + map.setLoadSynchronous(true); + try { + myLocationDao.search(map); + fail(); + } catch (InvalidDataAccessApiUsageException e) { + assertEquals("Invalid position format ':2'. Both latitude and longitude must be provided.", e.getCause().getMessage()); + } + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java index 26c37eb07f8..6167350e701 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java @@ -5,7 +5,7 @@ import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.jpa.searchparam.SearchParamConstants; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum; -import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; +import ca.uhn.fhir.jpa.util.SqlQuery; import ca.uhn.fhir.jpa.util.TestUtil; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.TemporalPrecisionEnum; @@ -16,6 +16,7 @@ import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.*; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.method.SearchParameter; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.dstu3.model.*; @@ -35,6 +36,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; @@ -47,6 +49,7 @@ import java.util.Date; import java.util.List; import java.util.Set; import java.util.TreeSet; +import java.util.stream.Collectors; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; @@ -362,16 +365,16 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { obs.addIdentifier().setSystem("urn:system").setValue("FOO"); obs.setDevice(new Reference(devId)); obs.setSubject(new Reference(pid0)); - myObservationDao.create(obs, mySrd).getId(); + obs.setCode(new CodeableConcept(new Coding("sys", "val", "disp"))); + myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); } - SearchParameterMap params; + SearchParameterMap params = new SearchParameterMap(); - // Not currently working -// params = new SearchParameterMap(); -// params.setLoadSynchronous(true); -// params.add("_has", new HasParam("Observation", "subject", "device.identifier", "urn:system|DEVICEID")); -// assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(pid0.getValue())); + // Target exists and is linked + params.setLoadSynchronous(true); + params.add("_has", new HasParam("Observation", "subject", "device.identifier", "urn:system|DEVICEID")); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(pid0.getValue())); // No targets exist params = new SearchParameterMap(); @@ -489,7 +492,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { assertEquals(2, results.size()); List actual = toUnqualifiedVersionlessIds( - mySubstanceDao.search(new SearchParameterMap().setLoadSynchronous(true).add(Substance.SP_QUANTITY, new QuantityParam((ParamPrefixEnum) null, 123, "http://foo", "UNIT")))); + mySubstanceDao.search(new SearchParameterMap().setLoadSynchronous(true).add(Substance.SP_QUANTITY, new QuantityParam(null, 123, "http://foo", "UNIT")))); assertThat(actual, contains(id)); } @@ -1586,7 +1589,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { dr01.setSubject(new Reference(patientId01)); IIdType drId01 = myDiagnosticReportDao.create(dr01, mySrd).getId(); - ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", new Object[]{patientId01, patientId02, obsId01, obsId02, drId01}); + ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", patientId01, patientId02, obsId01, obsId02, drId01); List result = toList(myObservationDao .search(new SearchParameterMap().setLoadSynchronous(true).add(Observation.SP_SUBJECT, new ReferenceParam(Patient.SP_IDENTIFIER, "urn:system|testSearchResourceLinkWithChain01")))); @@ -1691,7 +1694,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { Date after = new Date(); ca.uhn.fhir.jpa.util.TestUtil.sleepOneClick(); - ourLog.info("P1[{}] L1[{}] Obs1[{}] Obs2[{}]", new Object[]{patientId01, locId01, obsId01, obsId02}); + ourLog.info("P1[{}] L1[{}] Obs1[{}] Obs2[{}]", patientId01, locId01, obsId01, obsId02); List result; SearchParameterMap params; @@ -1754,7 +1757,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { dr01.setSubject(new Reference(patientId01)); IIdType drId01 = myDiagnosticReportDao.create(dr01, mySrd).getId(); - ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", new Object[]{patientId01, patientId02, obsId01, obsId02, drId01}); + ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", patientId01, patientId02, obsId01, obsId02, drId01); List result = toList( myObservationDao.search(new SearchParameterMap().setLoadSynchronous(true).add(Observation.SP_SUBJECT, new ReferenceParam("testSearchResourceLinkWithTextLogicalId01")))); @@ -2845,7 +2848,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { ourLog.info("Initial size: " + value.size()); for (IBaseResource next : value.getResources(0, value.size())) { ourLog.info("Deleting: {}", next.getIdElement()); - myDeviceDao.delete((IIdType) next.getIdElement(), mySrd); + myDeviceDao.delete(next.getIdElement(), mySrd); } value = myDeviceDao.search(new SearchParameterMap()); @@ -2864,7 +2867,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { public void testSearchWithRevIncludes() { final String methodName = "testSearchWithRevIncludes"; TransactionTemplate txTemplate = new TransactionTemplate(myTransactionMgr); - txTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW); + txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); IIdType pid = txTemplate.execute(new TransactionCallback() { @Override @@ -2882,7 +2885,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { }); SearchParameterMap map = new SearchParameterMap(); - map.add(Patient.SP_RES_ID, new StringParam(pid.getIdPart())); + map.add(IAnyResource.SP_RES_ID, new StringParam(pid.getIdPart())); map.addRevInclude(Condition.INCLUDE_PATIENT); IBundleProvider results = myPatientDao.search(map); List foundResources = results.getResources(0, results.size()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3TerminologyTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3TerminologyTest.java index 4ba4f35f181..69be65797b0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3TerminologyTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3TerminologyTest.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.jpa.dao.dstu3; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; @@ -9,36 +9,51 @@ import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.term.TermReindexingSvcImpl; +import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.param.TokenParamModifier; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; -import org.hl7.fhir.dstu3.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; +import org.hl7.fhir.dstu3.model.AllergyIntolerance; import org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCategory; import org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus; +import org.hl7.fhir.dstu3.model.AuditEvent; +import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; +import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.dstu3.model.ValueSet; import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent; import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.dstu3.model.ValueSet.FilterOperator; import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent; import org.hl7.fhir.instance.model.api.IIdType; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.List; import java.util.Set; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.containsStringIgnoringCase; +import static org.hamcrest.Matchers.empty; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { @@ -59,7 +74,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { @Before public void before() { myDaoConfig.setMaximumExpansionSize(5000); - myCachingValidationSupport.flushCaches(); + myCachingValidationSupport.invalidateCaches(); } private CodeSystem createExternalCs() { @@ -134,8 +149,13 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { } myTermCodeSystemStorageSvc.storeNewCodeSystemVersion(new ResourcePersistentId(table.getId()), URL_MY_CODE_SYSTEM, "SYSTEM NAME", "SYSTEM VERSION" , cs, table); + + myTermDeferredStorageSvc.saveAllDeferred(); } + @Autowired + private ITermDeferredStorageSvc myTermDeferredStorageSvc; + private void createExternalCsAndLocalVs() { CodeSystem codeSystem = createExternalCs(); @@ -501,7 +521,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { myTerminologyDeferredStorageSvc.saveDeferred(); myTerminologyDeferredStorageSvc.saveDeferred(); - IContextValidationSupport.LookupCodeResult lookupResults = myCodeSystemDao.lookupCode(new StringType("childAA"), new StringType(URL_MY_CODE_SYSTEM),null, mySrd); + IValidationSupport.LookupCodeResult lookupResults = myCodeSystemDao.lookupCode(new StringType("childAA"), new StringType(URL_MY_CODE_SYSTEM),null, mySrd); assertEquals(true, lookupResults.isFound()); ValueSet vs = new ValueSet(); @@ -542,8 +562,8 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { try { myValueSetDao.expand(vs, null); fail(); - } catch (InvalidRequestException e) { - assertEquals("unable to find code system http://example.com/my_code_systemAA", e.getMessage()); + } catch (PreconditionFailedException e) { + assertEquals("Unknown CodeSystem URI \"http://example.com/my_code_systemAA\" referenced from ValueSet", e.getMessage()); } } @@ -691,7 +711,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test { StringType code = new StringType("ParentA"); StringType system = new StringType("http://snomed.info/sct"); - IContextValidationSupport.LookupCodeResult outcome = myCodeSystemDao.lookupCode(code, system, null, mySrd); + IValidationSupport.LookupCodeResult outcome = myCodeSystemDao.lookupCode(code, system, null, mySrd); assertEquals(true, outcome.isFound()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java index bc693f393c5..066e5df677f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java @@ -700,7 +700,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { myPatientDao.create(p, mySrd); fail(); } catch (UnprocessableEntityException e) { - assertEquals("Resource contains reference to Organization/" + id1.getIdPart() + " but resource with ID " + id1.getIdPart() + " is actually of type Observation", e.getMessage()); + assertEquals("Resource contains reference to unknown resource ID Organization/" + id1.getIdPart(), e.getMessage()); } // Now with a forced ID diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java index 3619811ca47..84a06e342ea 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java @@ -10,8 +10,8 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.validation.IValidatorModule; import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; import org.hl7.fhir.dstu3.model.Observation.ObservationStatus; @@ -76,8 +76,8 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(results.getOperationOutcome())); ourLog.info("Clearing cache"); - myValidationSupport.flushCaches(); - myFhirInstanceValidator.flushCaches(); + myValidationSupport.invalidateCaches(); + myFhirInstanceValidator.invalidateCaches(); try { myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null); @@ -99,7 +99,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { myValueSetDao.create(vs); ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null); - ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); // Questionnaire q = loadResourceFromClasspath(Questionnaire.class,"/dstu3/iar/Questionnaire-iar-test.xml" ); // myQuestionnaireDao.create(q); @@ -323,14 +323,16 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { ValidationModeEnum mode = ValidationModeEnum.CREATE; String encoded = myFhirCtx.newJsonParser().encodeResourceToString(input); try { - myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); + // Expected to throw exception + MethodOutcome output = myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output.getOperationOutcome())); fail(); } catch (PreconditionFailedException e) { - String ooString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()); - ourLog.info(ooString); - assertThat(ooString, containsString("StructureDefinition reference \\\"" + profileUri + "\\\" could not be resolved")); + OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); + String outputString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo); + ourLog.info(outputString); + assertThat(outputString, containsString("Profile reference \\\"http://example.com/StructureDefinition/testValidateResourceContainingProfileDeclarationInvalid\\\" could not be resolved, so has not been checked")); } - } @Test @@ -474,11 +476,17 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { p.setActive(true); String raw = myFhirCtx.newJsonParser().encodeResourceToString(p); - MethodOutcome outcome = myPatientDao.validate(p, null, raw, EncodingEnum.JSON, null, null, mySrd); + try { + MethodOutcome outcome = myPatientDao.validate(p, null, raw, EncodingEnum.JSON, null, null, mySrd); - String encoded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome.getOperationOutcome()); - ourLog.info("OO: {}", encoded); - assertThat(encoded, containsString("No issues detected")); + String encoded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome.getOperationOutcome()); + ourLog.info("OO: {}", encoded); + assertThat(encoded, containsString("No issues detected")); + } catch (PreconditionFailedException e) { + // not expected, but let's log the error + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); + fail(e.toString()); + } } @AfterClass diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java index 0180911b8b2..db664fc3716 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java @@ -1,10 +1,17 @@ package ca.uhn.fhir.jpa.dao.dstu3; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.util.TestUtil; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.CodeSystem; +import org.hl7.fhir.dstu3.model.CodeType; +import org.hl7.fhir.dstu3.model.CodeableConcept; +import org.hl7.fhir.dstu3.model.Coding; +import org.hl7.fhir.dstu3.model.IdType; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.dstu3.model.UriType; +import org.hl7.fhir.dstu3.model.ValueSet; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.junit.AfterClass; @@ -16,8 +23,15 @@ import org.springframework.transaction.annotation.Transactional; import java.io.IOException; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { @@ -49,7 +63,7 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { // good } - ValueSet vs = myValidationSupport.fetchResource(myFhirCtx, ValueSet.class, "http://hl7.org/fhir/ValueSet/endpoint-payload-type"); + ValueSet vs = myValidationSupport.fetchResource(ValueSet.class, "http://hl7.org/fhir/ValueSet/endpoint-payload-type"); myValueSetDao.update(vs); vs = myValueSetDao.read(new IdType("ValueSet/endpoint-payload-type")); @@ -233,9 +247,9 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { IPrimitiveType display = null; Coding coding = null; CodeableConcept codeableConcept = null; - StringType vsIdentifier = new StringType("http://hl7.org/fhir/ValueSet/v2-0487"); - StringType code = new StringType("BRN"); - StringType system = new StringType("http://hl7.org/fhir/v2/0487"); + StringType vsIdentifier = new StringType("http://hl7.org/fhir/ValueSet/administrative-gender"); + StringType code = new StringType("male"); + StringType system = new StringType("http://hl7.org/fhir/administrative-gender"); ValidateCodeResult result = myValueSetDao.validateCode(vsIdentifier, null, code, system, display, coding, codeableConcept, mySrd); ourLog.info(result.getMessage()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoordsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoordsTest.java new file mode 100644 index 00000000000..2da1fb75d06 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/PredicateBuilderCoordsTest.java @@ -0,0 +1,86 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +import ca.uhn.fhir.jpa.dao.SearchBuilder; +import ca.uhn.fhir.jpa.util.CoordCalculator; +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; +import ca.uhn.fhir.jpa.util.SearchBox; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; +import org.mockito.junit.MockitoJUnitRunner; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.From; +import javax.persistence.criteria.Predicate; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.lessThan; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.*; + +@RunWith(MockitoJUnitRunner.class) +public class PredicateBuilderCoordsTest { + PredicateBuilderCoords myPredicateBuilderCoords; + private SearchBuilder mySearchBuilder; + private CriteriaBuilder myBuilder; + private From myFrom; + + @Before + public void before() { + mySearchBuilder = mock(SearchBuilder.class); + myBuilder = mock(CriteriaBuilder.class); + myFrom = mock(From.class); + myPredicateBuilderCoords = new PredicateBuilderCoords(mySearchBuilder); + } + + @Test + public void testLongitudePredicateFromBox() { + SearchBox box = CoordCalculator.getBox(CoordCalculatorTest.LATITUDE_CHIN, CoordCalculatorTest.LONGITUDE_CHIN, CoordCalculatorTest.DISTANCE_TAVEUNI); + assertThat(box.getNorthEast().getLongitude(), greaterThan(box.getSouthWest().getLongitude())); + + ArgumentCaptor andLeft = ArgumentCaptor.forClass(Predicate.class); + ArgumentCaptor andRight = ArgumentCaptor.forClass(Predicate.class); + + ArgumentCaptor gteValue = ArgumentCaptor.forClass(Double.class); + ArgumentCaptor lteValue = ArgumentCaptor.forClass(Double.class); + + Predicate gte = mock(Predicate.class); + Predicate lte = mock(Predicate.class); + when(myBuilder.greaterThanOrEqualTo(any(), gteValue.capture())).thenReturn(gte); + when(myBuilder.lessThanOrEqualTo(any(),lteValue.capture())).thenReturn(lte); + myPredicateBuilderCoords.longitudePredicateFromBox(myBuilder, myFrom, box); + verify(myBuilder).and(andLeft.capture(), andRight.capture()); + assertEquals(andLeft.getValue(), gte); + assertEquals(andRight.getValue(), lte); + assertEquals(gteValue.getValue(), box.getSouthWest().getLongitude()); + assertEquals(lteValue.getValue(), box.getNorthEast().getLongitude()); + } + + @Test + public void testAntiMeridianLongitudePredicateFromBox() { + SearchBox box = CoordCalculator.getBox(CoordCalculatorTest.LATITUDE_TAVEUNI, CoordCalculatorTest.LONGITIDE_TAVEUNI, CoordCalculatorTest.DISTANCE_TAVEUNI); + assertThat(box.getNorthEast().getLongitude(), lessThan(box.getSouthWest().getLongitude())); + assertTrue(box.crossesAntiMeridian()); + + ArgumentCaptor orLeft = ArgumentCaptor.forClass(Predicate.class); + ArgumentCaptor orRight = ArgumentCaptor.forClass(Predicate.class); + + ArgumentCaptor gteValue = ArgumentCaptor.forClass(Double.class); + ArgumentCaptor lteValue = ArgumentCaptor.forClass(Double.class); + + Predicate gte = mock(Predicate.class); + Predicate lte = mock(Predicate.class); + when(myBuilder.greaterThanOrEqualTo(any(), gteValue.capture())).thenReturn(gte); + when(myBuilder.lessThanOrEqualTo(any(),lteValue.capture())).thenReturn(lte); + myPredicateBuilderCoords.longitudePredicateFromBox(myBuilder, myFrom, box); + verify(myBuilder).or(orLeft.capture(), orRight.capture()); + assertEquals(orLeft.getValue(), gte); + assertEquals(orRight.getValue(), lte); + assertEquals(gteValue.getValue(), box.getNorthEast().getLongitude()); + assertEquals(lteValue.getValue(), box.getSouthWest().getLongitude()); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtilTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtilTest.java new file mode 100644 index 00000000000..0ea02794e22 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/predicate/SearchFuzzUtilTest.java @@ -0,0 +1,94 @@ +package ca.uhn.fhir.jpa.dao.predicate; + +import ca.uhn.fhir.jpa.dao.SearchBuilderTest; +import ca.uhn.fhir.rest.param.ParamPrefixEnum; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.math.MathContext; + +import static org.hamcrest.Matchers.startsWith; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +public class SearchFuzzUtilTest { + private static final Logger ourLog = LoggerFactory.getLogger(SearchBuilderTest.class); + + @Test + public void testCalculateMultiplierEqualNoDecimal() { + BigDecimal in = new BigDecimal("200"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertEquals("0.5", out.toPlainString()); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_() { + BigDecimal in = new BigDecimal("200."); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertEquals("0.5", out.toPlainString()); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision123_010() { + BigDecimal in = new BigDecimal("123.010"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.0005")); + + BigDecimal low = in.subtract(out, MathContext.DECIMAL64); + BigDecimal high = in.add(out, MathContext.DECIMAL64); + ourLog.info("{} <= {} <= {}", new Object[] {low.toPlainString(), in.toPlainString(), high.toPlainString()}); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_0() { + BigDecimal in = new BigDecimal("200.0"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.05000000")); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_3() { + BigDecimal in = new BigDecimal("200.3"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.05000000")); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_300() { + BigDecimal in = new BigDecimal("200.300"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.0005000000")); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_30000000() { + BigDecimal in = new BigDecimal("200.30000000"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.000000005000000")); + } + + @Test + public void testCalculateMultiplierEqualDecimalPrecision200_300000001() { + BigDecimal in = new BigDecimal("200.300000001"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.EQUAL, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("0.0000000005000000")); + } + + @Test + public void testCalculateMultiplierApprox() { + BigDecimal in = new BigDecimal("200"); + BigDecimal out = SearchFuzzUtil.calculateFuzzAmount(ParamPrefixEnum.APPROXIMATE, in); + ourLog.info(out.toPlainString()); + assertThat(out.toPlainString(), startsWith("20.000")); + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java index 7dfffc7dfb9..9c098d3c03f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/BaseJpaR4Test.java @@ -1,6 +1,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.interceptor.api.IInterceptorService; import ca.uhn.fhir.jpa.binstore.BinaryAccessProvider; import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor; @@ -9,6 +10,7 @@ import ca.uhn.fhir.jpa.config.TestR4Config; import ca.uhn.fhir.jpa.dao.*; import ca.uhn.fhir.jpa.dao.data.*; import ca.uhn.fhir.jpa.dao.dstu2.FhirResourceDaoDstu2SearchNoFtTest; +import ca.uhn.fhir.jpa.dao.index.IdHelperService; import ca.uhn.fhir.jpa.entity.TermCodeSystem; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; @@ -26,10 +28,13 @@ import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; import ca.uhn.fhir.jpa.subscription.module.cache.SubscriptionRegistry; import ca.uhn.fhir.jpa.term.BaseTermReadSvcImpl; import ca.uhn.fhir.jpa.term.TermDeferredStorageSvcImpl; -import ca.uhn.fhir.jpa.term.api.*; +import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; +import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; +import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; +import ca.uhn.fhir.jpa.term.api.ITermReadSvc; +import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4; import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.jpa.util.ResourceProviderFactory; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR4; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.Constants; @@ -43,10 +48,9 @@ import ca.uhn.fhir.validation.ValidationResult; import org.apache.commons.io.IOUtils; import org.hibernate.search.jpa.FullTextEntityManager; import org.hibernate.search.jpa.Search; +import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; import org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent; @@ -64,7 +68,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.util.AopTestUtils; import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.annotation.Transactional; import javax.persistence.EntityManager; import java.io.IOException; @@ -83,7 +86,7 @@ import static org.mockito.Mockito.mock; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestR4Config.class}) public abstract class BaseJpaR4Test extends BaseJpaTest { - private static JpaValidationSupportChainR4 ourJpaValidationSupportChainR4; + private static IValidationSupport ourJpaValidationSupportChainR4; private static IFhirResourceDaoValueSet ourValueSetDao; @Autowired @@ -163,6 +166,9 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { @Qualifier("myConditionDaoR4") protected IFhirResourceDao myConditionDao; @Autowired + @Qualifier("myEpisodeOfCareDaoR4") + protected IFhirResourceDao myEpisodeOfCareDao; + @Autowired protected DaoConfig myDaoConfig; @Autowired protected ModelConfig myModelConfig; @@ -170,6 +176,9 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { @Qualifier("myDeviceDaoR4") protected IFhirResourceDao myDeviceDao; @Autowired + @Qualifier("myProvenanceDaoR4") + protected IFhirResourceDao myProvenanceDao; + @Autowired @Qualifier("myDiagnosticReportDaoR4") protected IFhirResourceDao myDiagnosticReportDao; @Autowired @@ -201,6 +210,9 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { @Qualifier("myLocationDaoR4") protected IFhirResourceDao myLocationDao; @Autowired + @Qualifier("myPractitionerRoleDaoR4") + protected IFhirResourceDao myPractitionerRoleDao; + @Autowired @Qualifier("myMediaDaoR4") protected IFhirResourceDao myMediaDao; @Autowired @@ -316,7 +328,7 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { @Autowired protected PlatformTransactionManager myTxManager; @Autowired - @Qualifier("myJpaValidationSupportChainR4") + @Qualifier("myJpaValidationSupportChain") protected IValidationSupport myValidationSupport; @Autowired @Qualifier("myValueSetDaoR4") @@ -337,13 +349,15 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { protected SubscriptionRegistry mySubscriptionRegistry; protected IServerInterceptor myInterceptor; @Autowired - private JpaValidationSupportChainR4 myJpaValidationSupportChainR4; + private IValidationSupport myJpaValidationSupportChainR4; private PerformanceTracingLoggingInterceptor myPerformanceTracingLoggingInterceptor; private List mySystemInterceptors; @Autowired private DaoRegistry myDaoRegistry; @Autowired private IBulkDataExportSvc myBulkDataExportSvc; + @Autowired + private IdHelperService myIdHelperService; @After() public void afterCleanupDao() { @@ -372,6 +386,8 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { BaseTermReadSvcImpl.clearOurLastResultsFromTranslationWithReverseCache(); TermDeferredStorageSvcImpl termDeferredStorageSvc = AopTestUtils.getTargetObject(myTerminologyDeferredStorageSvc); termDeferredStorageSvc.clearDeferred(); + + myIdHelperService.clearCache(); } @After() @@ -409,7 +425,6 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { } @Before - @Transactional() public void beforePurgeDatabase() { purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataExportSvc); } @@ -499,7 +514,7 @@ public abstract class BaseJpaR4Test extends BaseJpaTest { @AfterClass public static void afterClassClearContextBaseJpaR4Test() { ourValueSetDao.purgeCaches(); - ourJpaValidationSupportChainR4.flush(); + ourJpaValidationSupportChainR4.invalidateCaches(); TestUtil.clearAllStaticFieldsForUnitTest(); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index ef1fa4282aa..ee797ed0504 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -8,10 +8,14 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.util.TestUtil; +import com.google.common.collect.Sets; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Observation.ObservationStatus; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Task; import org.junit.After; import org.junit.AfterClass; @@ -21,9 +25,12 @@ import java.util.List; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.Matchers.contains; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; -@SuppressWarnings({"unchecked", "deprecation"}) +@SuppressWarnings({"ConstantConditions"}) public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoCreatePlaceholdersR4Test.class); @@ -32,6 +39,9 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { public final void afterResetDao() { myDaoConfig.setAutoCreatePlaceholderReferenceTargets(new DaoConfig().isAutoCreatePlaceholderReferenceTargets()); myDaoConfig.setResourceClientIdStrategy(new DaoConfig().getResourceClientIdStrategy()); + myDaoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(new DaoConfig().isPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets()); + myDaoConfig.setBundleTypesAllowedForStorage(new DaoConfig().getBundleTypesAllowedForStorage()); + } @Test @@ -163,6 +173,90 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { assertEquals("Patient/999999999999999", outcome.getResources(0,1).get(0).getIdElement().toUnqualifiedVersionless().getValue()); } + @Test + public void testCreatePlaceholderWithMatchUrl_IdentifierNotCopiedByDefault() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myDaoConfig.setAllowInlineMatchUrlReferences(true); + + Observation obsToCreate = new Observation(); + obsToCreate.setStatus(ObservationStatus.FINAL); + obsToCreate.getSubject().setReference("Patient?identifier=http://foo|123"); + obsToCreate.getSubject().getIdentifier().setSystem("http://foo").setValue("123"); + IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); + + Observation createdObs = myObservationDao.read(id); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); + + Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); + assertEquals(0, patient.getIdentifier().size()); + } + + + @Test + public void testCreatePlaceholderWithMatchUrl_IdentifierCopied_NotPreExisting() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myDaoConfig.setAllowInlineMatchUrlReferences(true); + myDaoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(true); + + Observation obsToCreate = new Observation(); + obsToCreate.setStatus(ObservationStatus.FINAL); + obsToCreate.getSubject().setReference("Patient?identifier=http://foo|123"); + obsToCreate.getSubject().getIdentifier().setSystem("http://foo").setValue("123"); + IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); + + Observation createdObs = myObservationDao.read(id); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); + + Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); + assertEquals(1, patient.getIdentifier().size()); + assertEquals("http://foo", patient.getIdentifier().get(0).getSystem()); + assertEquals("123", patient.getIdentifier().get(0).getValue()); + } + + @Test + public void testCreatePlaceholderWithMatchUrl_IdentifierNotCopiedBecauseNoFieldMatches() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myDaoConfig.setAllowInlineMatchUrlReferences(true); + myDaoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(true); + myDaoConfig.setBundleTypesAllowedForStorage(Sets.newHashSet("")); + + AuditEvent eventToCreate = new AuditEvent(); + Reference what = eventToCreate.addEntity().getWhat(); + what.setReference("Bundle/ABC"); + what.getIdentifier().setSystem("http://foo"); + what.getIdentifier().setValue("123"); + IIdType id = myAuditEventDao.create(eventToCreate, mySrd).getId(); + + AuditEvent createdEvent = myAuditEventDao.read(id); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEvent)); + + } + + @Test + public void testCreatePlaceholderWithMatchUrl_PreExisting() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myDaoConfig.setAllowInlineMatchUrlReferences(true); + myDaoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(true); + + Patient patient = new Patient(); + patient.setId("ABC"); + patient.addIdentifier().setSystem("http://foo").setValue("123"); + myPatientDao.update(patient); + + Observation obsToCreate = new Observation(); + obsToCreate.setStatus(ObservationStatus.FINAL); + obsToCreate.getSubject().setReference("Patient?identifier=http://foo|123"); + obsToCreate.getSubject().getIdentifier().setSystem("http://foo").setValue("123"); + IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); + + Observation createdObs = myObservationDao.read(id); + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); + assertEquals("Patient/ABC", obsToCreate.getSubject().getReference()); + + } + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4DeleteTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4DeleteTest.java index 65a50f3c335..c5937003522 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4DeleteTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4DeleteTest.java @@ -1,12 +1,18 @@ package ca.uhn.fhir.jpa.dao.r4; +import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable; import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Organization; +import org.hl7.fhir.r4.model.Patient; +import org.junit.After; import org.junit.AfterClass; import org.junit.Test; import org.slf4j.Logger; @@ -14,11 +20,20 @@ import org.slf4j.LoggerFactory; import java.io.IOException; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test { private static final Logger ourLog = LoggerFactory.getLogger(FhirResourceDaoR4DeleteTest.class); + @After + public void after() { + myDaoConfig.setDeleteEnabled(new DaoConfig().isDeleteEnabled()); + } + @Test public void testDeleteMarksResourceAndVersionAsDeleted() { @@ -29,19 +44,19 @@ public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test { myPatientDao.delete(id); // Table should be marked as deleted - runInTransaction(()->{ + runInTransaction(() -> { ResourceTable resourceTable = myResourceTableDao.findById(id.getIdPartAsLong()).get(); assertNotNull(resourceTable.getDeleted()); assertTrue(resourceTable.isDeleted()); }); // Current version should be marked as deleted - runInTransaction(()->{ + runInTransaction(() -> { ResourceHistoryTable resourceTable = myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(id.getIdPartAsLong(), 1); assertNull(resourceTable.getDeleted()); assertNotNull(resourceTable.getPersistentId()); }); - runInTransaction(()->{ + runInTransaction(() -> { ResourceHistoryTable resourceTable = myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(id.getIdPartAsLong(), 2); assertNotNull(resourceTable.getDeleted()); }); @@ -66,6 +81,23 @@ public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test { } + @Test + public void testDeleteDisabled() { + myDaoConfig.setDeleteEnabled(false); + + Patient p = new Patient(); + p.setActive(true); + IIdType pId = myPatientDao.create(p).getId().toUnqualifiedVersionless(); + + try { + myPatientDao.delete(pId); + fail(); + } catch (PreconditionFailedException e) { + assertEquals("Resource deletion is not permitted on this server", e.getMessage()); + } + } + + @Test public void testDeleteCircularReferenceInTransaction() throws IOException { @@ -157,14 +189,14 @@ public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test { myPatientDao.delete(id); // Table should be marked as deleted - runInTransaction(()->{ + runInTransaction(() -> { ResourceTable resourceTable = myResourceTableDao.findById(id.getIdPartAsLong()).get(); assertNotNull(resourceTable.getDeleted()); }); // Mark the current history version as not-deleted even though the actual resource // table entry is marked deleted - runInTransaction(()->{ + runInTransaction(() -> { ResourceHistoryTable resourceTable = myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(id.getIdPartAsLong(), 2); resourceTable.setDeleted(null); myResourceHistoryTableDao.save(resourceTable); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java index ee059080b41..53ba7a20962 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java @@ -1,29 +1,20 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable; -import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.util.TestUtil; -import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import org.hl7.fhir.instance.model.api.IBaseResource; +import ca.uhn.fhir.rest.param.ReferenceParam; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.model.*; -import org.junit.*; -import org.springframework.test.context.TestPropertySource; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; -import java.util.*; - -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; -import static org.mockito.Mockito.reset; +import static org.hamcrest.Matchers.empty; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4QueryCountTest.class); @@ -32,6 +23,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { public void afterResetDao() { myDaoConfig.setResourceMetaCountHardLimit(new DaoConfig().getResourceMetaCountHardLimit()); myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); + myDaoConfig.setDeleteEnabled(new DaoConfig().isDeleteEnabled()); } @Before @@ -53,7 +45,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { Patient p = new Patient(); p.setId(id.getIdPart()); p.addIdentifier().setSystem("urn:system").setValue("2"); - myPatientDao.update(p).getResource(); + myPatientDao.update(p); }); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); assertEquals(5, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); @@ -133,6 +125,209 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { assertEquals(0, myCaptureQueriesListener.getDeleteQueriesForCurrentThread().size()); } + + @Test + public void testCreateWithClientAssignedId() { + myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.DISABLED); + + runInTransaction(() -> { + Patient p = new Patient(); + p.getMaritalStatus().setText("123"); + return myPatientDao.create(p).getId().toUnqualified(); + }); + + myCaptureQueriesListener.clear(); + + runInTransaction(() -> { + Patient p = new Patient(); + p.setId("AAA"); + p.getMaritalStatus().setText("123"); + return myPatientDao.update(p).getId().toUnqualified(); + }); + + myCaptureQueriesListener.logSelectQueriesForCurrentThread(); + assertEquals(1, myCaptureQueriesListener.getSelectQueriesForCurrentThread().size()); + myCaptureQueriesListener.logUpdateQueriesForCurrentThread(); + assertEquals(0, myCaptureQueriesListener.getUpdateQueriesForCurrentThread().size()); + myCaptureQueriesListener.logInsertQueriesForCurrentThread(); + assertEquals(4, myCaptureQueriesListener.getInsertQueriesForCurrentThread().size()); + myCaptureQueriesListener.logDeleteQueriesForCurrentThread(); + assertEquals(0, myCaptureQueriesListener.getDeleteQueriesForCurrentThread().size()); + } + + + @Test + public void testReferenceToForcedId() { + myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.DISABLED); + + Patient patient = new Patient(); + patient.setId("P"); + patient.setActive(true); + + myCaptureQueriesListener.clear(); + myPatientDao.update(patient); + + /* + * Add a resource with a forced ID target link + */ + + myCaptureQueriesListener.clear(); + Observation observation = new Observation(); + observation.getSubject().setReference("Patient/P"); + myObservationDao.create(observation); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // select: lookup forced ID + assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + // insert to: HFJ_RESOURCE, HFJ_RES_VER, HFJ_RES_LINK + assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + + /* + * Add another + */ + + myCaptureQueriesListener.clear(); + observation = new Observation(); + observation.getSubject().setReference("Patient/P"); + myObservationDao.create(observation); + // select: lookup forced ID + assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + // insert to: HFJ_RESOURCE, HFJ_RES_VER, HFJ_RES_LINK + assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + + } + + + @Test + public void testReferenceToForcedId_DeletesDisabled() { + myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.DISABLED); + myDaoConfig.setDeleteEnabled(false); + + Patient patient = new Patient(); + patient.setId("P"); + patient.setActive(true); + + myCaptureQueriesListener.clear(); + myPatientDao.update(patient); + + /* + * Add a resource with a forced ID target link + */ + + myCaptureQueriesListener.clear(); + Observation observation = new Observation(); + observation.getSubject().setReference("Patient/P"); + myObservationDao.create(observation); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // select: lookup forced ID + assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + // insert to: HFJ_RESOURCE, HFJ_RES_VER, HFJ_RES_LINK + assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + + /* + * Add another + */ + + myCaptureQueriesListener.clear(); + observation = new Observation(); + observation.getSubject().setReference("Patient/P"); + myObservationDao.create(observation); + // select: no lookups needed because of cache + assertEquals(0, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + // insert to: HFJ_RESOURCE, HFJ_RES_VER, HFJ_RES_LINK + assertEquals(3, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + + } + + + @Test + public void testSearchUsingForcedIdReference() { + + Patient patient = new Patient(); + patient.setId("P"); + patient.setActive(true); + myPatientDao.update(patient); + + Observation obs = new Observation(); + obs.getSubject().setReference("Patient/P"); + myObservationDao.update(obs); + + SearchParameterMap map = new SearchParameterMap(); + map.setLoadSynchronous(true); + map.add("subject", new ReferenceParam("Patient/P")); + + myCaptureQueriesListener.clear(); + assertEquals(1, myObservationDao.search(map).size().intValue()); +// myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // Resolve forced ID, Perform search, load result + assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + + /* + * Again + */ + + myCaptureQueriesListener.clear(); + assertEquals(1, myObservationDao.search(map).size().intValue()); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // Resolve forced ID, Perform search, load result + assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + } + + + @Test + public void testSearchUsingForcedIdReference_DeletedDisabled() { + myDaoConfig.setDeleteEnabled(false); + + Patient patient = new Patient(); + patient.setId("P"); + patient.setActive(true); + myPatientDao.update(patient); + + Observation obs = new Observation(); + obs.getSubject().setReference("Patient/P"); + myObservationDao.update(obs); + + SearchParameterMap map = new SearchParameterMap(); + map.setLoadSynchronous(true); + map.add("subject", new ReferenceParam("Patient/P")); + + myCaptureQueriesListener.clear(); + assertEquals(1, myObservationDao.search(map).size().intValue()); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // Resolve forced ID, Perform search, load result + assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + + /* + * Again + */ + + myCaptureQueriesListener.clear(); + assertEquals(1, myObservationDao.search(map).size().intValue()); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + // (NO resolve forced ID), Perform search, load result + assertEquals(2, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); + assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); + } + + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchDistanceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchDistanceTest.java new file mode 100644 index 00000000000..3401fc3fbef --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchDistanceTest.java @@ -0,0 +1,140 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; +import org.hl7.fhir.r4.model.Location; +import org.junit.Before; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.contains; +import static org.junit.Assert.assertThat; + +public class FhirResourceDaoR4SearchDistanceTest extends BaseJpaR4Test { + @Before + public void beforeDisableResultReuse() { + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Autowired + MatchUrlService myMatchUrlService; + + @Test + public void testNearSearchDistanceNoDistance() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LATITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + latitude + "|" + longitude, + myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + + @Test + public void testNearSearchDistanceZero() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LATITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + { + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + latitude + "|" + longitude + "|0", + myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + { + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + latitude + "|" + longitude + "|0.0", + myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + } + + @Test + public void testNearSearchApproximate() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + + CoordCalculatorTest.LONGITUDE_CHIN + "|" + + bigEnoughDistance, myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + + CoordCalculatorTest.LONGITUDE_CHIN + "|" + + tooSmallDistance, myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids.size(), is(0)); + } + + } + + @Test + public void testNearSearchApproximateNearAntiMeridian() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_TAVEUNI; + double longitude = CoordCalculatorTest.LONGITIDE_TAVEUNI; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + String locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless().getValue(); + + { // We match even when the box crosses the anti-meridian + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_TAVEUNI; + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_TAVEUNI + "|" + + CoordCalculatorTest.LONGITIDE_TAVEUNI + "|" + + bigEnoughDistance, myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids, contains(locId)); + } + { // We don't match outside a box that crosses the anti-meridian + double tooSmallDistance = CoordCalculatorTest.DISTANCE_TAVEUNI; + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + + CoordCalculatorTest.LONGITUDE_CHIN + "|" + + tooSmallDistance, myFhirCtx.getResourceDefinition("Location")); + + List ids = toUnqualifiedVersionlessIdValues(myLocationDao.search(map)); + assertThat(ids.size(), is(0)); + } + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index 0f5b28be06d..e465c6d03a6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -2,19 +2,12 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.dao.DaoMethodOutcome; import ca.uhn.fhir.jpa.entity.Search; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamNumber; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri; -import ca.uhn.fhir.jpa.model.entity.ResourceLink; -import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum; +import ca.uhn.fhir.jpa.util.SqlQuery; import ca.uhn.fhir.jpa.util.TestUtil; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.TemporalPrecisionEnum; @@ -40,11 +33,7 @@ import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; import org.hl7.fhir.r4.model.Observation.ObservationStatus; import org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType; import org.hl7.fhir.r4.model.Subscription.SubscriptionStatus; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallback; @@ -55,29 +44,11 @@ import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; import java.util.stream.Collectors; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.endsWith; -import static org.hamcrest.Matchers.hasItem; -import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; import static org.mockito.Mockito.mock; @SuppressWarnings({"unchecked", "Duplicates"}) @@ -101,6 +72,28 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { myDaoConfig.setReuseCachedSearchResultsForMillis(null); } + @Test + public void testCanonicalReference() { + StructureDefinition sd = new StructureDefinition(); + sd.getSnapshot().addElement().getBinding().setValueSet("http://foo"); + String id = myStructureDefinitionDao.create(sd).getId().toUnqualifiedVersionless().getValue(); + + { + SearchParameterMap map = new SearchParameterMap(); + map.setLoadSynchronous(true); + map.add(StructureDefinition.SP_VALUESET, new ReferenceParam("http://foo")); + List ids = toUnqualifiedVersionlessIdValues(myStructureDefinitionDao.search(map)); + assertThat(ids, contains(id)); + } + { + SearchParameterMap map = new SearchParameterMap(); + map.setLoadSynchronous(true); + map.add(StructureDefinition.SP_VALUESET, new ReferenceParam("http://foo2")); + List ids = toUnqualifiedVersionlessIdValues(myStructureDefinitionDao.search(map)); + assertThat(ids, empty()); + } + } + @Test public void testHasConditionAgeCompare() { Patient patient = new Patient(); @@ -597,6 +590,41 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { } + @Test + public void testHasLimitsByType() { + + Patient patient = new Patient(); + patient.setActive(true); + IIdType patientId = myPatientDao.create(patient).getId().toUnqualifiedVersionless(); + + Encounter encounter = new Encounter(); + encounter.setStatus(Encounter.EncounterStatus.ARRIVED); + IIdType encounterId = myEncounterDao.create(encounter).getId().toUnqualifiedVersionless(); + + Device device = new Device(); + device.setManufacturer("Acme"); + IIdType deviceId = myDeviceDao.create(device).getId().toUnqualifiedVersionless(); + + Provenance provenance = new Provenance(); + provenance.addTarget().setReferenceElement(patientId); + provenance.addTarget().setReferenceElement(encounterId); + provenance.addAgent().setWho(new Reference(deviceId)); + myProvenanceDao.create(provenance); + + String criteria = "_has:Provenance:target:agent=" + deviceId.getValue(); + SearchParameterMap map = myMatchUrlService.translateMatchUrl(criteria, myFhirCtx.getResourceDefinition(Encounter.class)); + + map.setLoadSynchronous(true); + + myCaptureQueriesListener.clear(); + IBundleProvider results = myEncounterDao.search(map); + myCaptureQueriesListener.logSelectQueriesForCurrentThread(0); + + List ids = toUnqualifiedVersionlessIdValues(results); + assertThat(ids, containsInAnyOrder(encounterId.getValue())); + + } + @Test public void testHasParameter() { IIdType pid0; @@ -1049,6 +1077,65 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { } + @Test + public void testSearchByIdParam_QueryIsMinimal() { + // With only an _id parameter + { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("_id", new StringParam("DiagnosticReport/123")); + myCaptureQueriesListener.clear(); + myDiagnosticReportDao.search(params).size(); + List selectQueries = myCaptureQueriesListener.getSelectQueriesForCurrentThread(); + assertEquals(1, selectQueries.size()); + + String sqlQuery = selectQueries.get(0).getSql(true, true).toLowerCase(); + ourLog.debug("SQL Query:\n{}", sqlQuery); + assertEquals(1, StringUtils.countMatches(sqlQuery, "resourceta0_.res_id in")); + assertEquals(0, StringUtils.countMatches(sqlQuery, "join")); + assertEquals(1, StringUtils.countMatches(sqlQuery, "resourceta0_.res_type='diagnosticreport'")); + assertEquals(1, StringUtils.countMatches(sqlQuery, "resourceta0_.res_deleted_at is null")); + } + // With an _id parameter and a standard search param + { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("_id", new StringParam("DiagnosticReport/123")); + params.add("code", new TokenParam("foo", "bar")); + myCaptureQueriesListener.clear(); + myDiagnosticReportDao.search(params).size(); + List selectQueries = myCaptureQueriesListener.getSelectQueriesForCurrentThread(); + assertEquals(1, selectQueries.size()); + + String sqlQuery = selectQueries.get(0).getSql(true, true).toLowerCase(); + ourLog.info("SQL Query:\n{}", sqlQuery); + assertEquals(1, StringUtils.countMatches(sqlQuery, "resourceta0_.res_id in")); + assertEquals(1, StringUtils.countMatches(sqlQuery, "join")); + assertEquals(1, StringUtils.countMatches(sqlQuery, "hash_sys_and_value")); + assertEquals(0, StringUtils.countMatches(sqlQuery, "diagnosticreport")); + assertEquals(0, StringUtils.countMatches(sqlQuery, "res_deleted_at")); + } + } + + @Test + public void testSearchByIdParamAndOtherSearchParam_QueryIsMinimal() { + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("_id", new StringParam("DiagnosticReport/123")); + params.add("_id", new StringParam("DiagnosticReport/123")); + myCaptureQueriesListener.clear(); + myDiagnosticReportDao.search(params).size(); + List selectQueries = myCaptureQueriesListener.getSelectQueriesForCurrentThread(); + assertEquals(1, selectQueries.size()); + + String sqlQuery = selectQueries.get(0).getSql(true, true).toLowerCase(); + ourLog.info("SQL Query:\n{}", sqlQuery); + assertEquals(1, StringUtils.countMatches(sqlQuery, "resourceta0_.res_id in")); + assertEquals(0, StringUtils.countMatches(sqlQuery, "join")); + assertEquals(1, StringUtils.countMatches(sqlQuery,"resourceta0_.res_type='diagnosticreport'")); + assertEquals(1, StringUtils.countMatches(sqlQuery,"resourceta0_.res_deleted_at is null")); + } + @Test public void testSearchByIdParamAnd() { IIdType id1; @@ -3286,6 +3373,105 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { } } + @Test + public void testSearchWithDateAndReusesExistingJoin() { + // Add a search parameter to Observation.issued, so that between that one + // and the existing one on Observation.effective, we have 2 date search parameters + // on the same resource + { + SearchParameter sp = new SearchParameter(); + sp.setStatus(Enumerations.PublicationStatus.ACTIVE); + sp.addBase("Observation"); + sp.setType(Enumerations.SearchParamType.DATE); + sp.setCode("issued"); + sp.setExpression("Observation.issued"); + mySearchParameterDao.create(sp); + mySearchParamRegistry.forceRefresh(); + } + + // Dates are reversed on these two observations + IIdType obsId1; + { + Observation obs = new Observation(); + obs.setIssuedElement(new InstantType("2020-06-06T12:00:00Z")); + obs.setEffective(new InstantType("2019-06-06T12:00:00Z")); + obsId1 = myObservationDao.create(obs).getId().toUnqualifiedVersionless(); + } + IIdType obsId2; + { + Observation obs = new Observation(); + obs.setIssuedElement(new InstantType("2019-06-06T12:00:00Z")); + obs.setEffective(new InstantType("2020-06-06T12:00:00Z")); + obsId2 = myObservationDao.create(obs).getId().toUnqualifiedVersionless(); + } + + // Add two with a period + IIdType obsId3; + { + Observation obs = new Observation(); + obs.setEffective(new Period().setStartElement(new DateTimeType("2000-06-06T12:00:00Z")).setEndElement(new DateTimeType("2001-06-06T12:00:00Z"))); + obsId3 = myObservationDao.create(obs).getId().toUnqualifiedVersionless(); + } + IIdType obsId4; + { + Observation obs = new Observation(); + obs.setEffective(new Period().setStartElement(new DateTimeType("2001-01-01T12:00:00Z")).setEndElement(new DateTimeType("2002-01-01T12:00:00Z"))); + obsId4 = myObservationDao.create(obs).getId().toUnqualifiedVersionless(); + } + + // Two AND instances of 1 SP + { + myCaptureQueriesListener.clear(); + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("issued", new DateParam("ge2020-06-05")); + params.add("issued", new DateParam("lt2020-06-07")); + List patients = toUnqualifiedVersionlessIds(myObservationDao.search(params)); + assertThat(patients.toString(), patients, contains(obsId1)); + String searchQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, true); + ourLog.info("Search query:\n{}", searchQuery); + assertEquals(searchQuery, 1, StringUtils.countMatches(searchQuery.toLowerCase(), "join")); + assertEquals(searchQuery, 1, StringUtils.countMatches(searchQuery.toLowerCase(), "hash_identity")); + assertEquals(searchQuery, 2, StringUtils.countMatches(searchQuery.toLowerCase(), "sp_value_low")); + } + + // Two AND instances of 1 SP and 1 instance of another + { + myCaptureQueriesListener.clear(); + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("issued", new DateParam("ge2020-06-05")); + params.add("issued", new DateParam("lt2020-06-07")); + params.add("date", new DateParam("gt2019-06-05")); + params.add("date", new DateParam("lt2019-06-07")); + List patients = toUnqualifiedVersionlessIds(myObservationDao.search(params)); + assertThat(patients.toString(), patients, contains(obsId1)); + String searchQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, true); + ourLog.info("Search query:\n{}", searchQuery); + assertEquals(searchQuery, 2, StringUtils.countMatches(searchQuery.toLowerCase(), "join")); + assertEquals(searchQuery, 2, StringUtils.countMatches(searchQuery.toLowerCase(), "hash_identity")); + assertEquals(searchQuery, 4, StringUtils.countMatches(searchQuery.toLowerCase(), "sp_value_low")); + } + + // Period search + { + myCaptureQueriesListener.clear(); + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("date", new DateParam("lt2002-01-01T12:00:00Z")); + List patients = toUnqualifiedVersionlessIds(myObservationDao.search(params)); + assertThat(patients.toString(), patients, containsInAnyOrder(obsId3, obsId4)); + String searchQuery = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, true); + ourLog.info("Search query:\n{}", searchQuery); + assertEquals(searchQuery, 1, StringUtils.countMatches(searchQuery.toLowerCase(), "join")); + assertEquals(searchQuery, 1, StringUtils.countMatches(searchQuery.toLowerCase(), "hash_identity")); + assertEquals(searchQuery, 1, StringUtils.countMatches(searchQuery.toLowerCase(), "sp_value_low")); + } + + } + + + @Test public void testSearchWithFetchSizeDefaultMaximum() { myDaoConfig.setFetchSizeDefaultMaximum(5); @@ -4142,6 +4328,43 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { assertThat(toUnqualifiedVersionlessIdValues(outcome), contains(crId)); } + @Test + public void testCircularReferencesDontBreakRevIncludes() { + + Patient p = new Patient(); + p.setActive(true); + IIdType patientId = myPatientDao.create(p).getId().toUnqualifiedVersionless(); + + Encounter enc = new Encounter(); + enc.setStatus(Encounter.EncounterStatus.ARRIVED); + enc.getSubject().setReference(patientId.getValue()); + IIdType encId = myEncounterDao.create(enc).getId().toUnqualifiedVersionless(); + + Condition cond = new Condition(); + cond.addIdentifier().setSystem("http://foo").setValue("123"); + IIdType conditionId = myConditionDao.create(cond).getId().toUnqualifiedVersionless(); + + EpisodeOfCare ep = new EpisodeOfCare(); + ep.setStatus(EpisodeOfCare.EpisodeOfCareStatus.ACTIVE); + IIdType epId = myEpisodeOfCareDao.create(ep).getId().toUnqualifiedVersionless(); + + enc.getEpisodeOfCareFirstRep().setReference(ep.getId()); + myEncounterDao.update(enc); + cond.getEncounter().setReference(enc.getId()); + myConditionDao.update(cond); + ep.getDiagnosisFirstRep().getCondition().setReference(cond.getId()); + myEpisodeOfCareDao.update(ep); + + // Search time + SearchParameterMap params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.addRevInclude(new Include("*").setRecurse(true)); + IBundleProvider results = myPatientDao.search(params); + List values = toUnqualifiedVersionlessIdValues(results); + assertThat(values.toString(), values, containsInAnyOrder(patientId.getValue(), encId.getValue(), conditionId.getValue(), epId.getValue())); + + } + private String toStringMultiline(List theResults) { StringBuilder b = new StringBuilder(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java index 9d1bbe51f52..a19a466c9c0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java @@ -497,12 +497,10 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { SearchParameterMap params; -// KHS JA When we switched _has from two queries to a nested subquery, we broke support for chains within _has -// We have decided for now to prefer the performance optimization of the subquery over the slower full capability -// params = new SearchParameterMap(); -// params.setLoadSynchronous(true); -// params.add("_has", new HasParam("Observation", "subject", "device.identifier", "urn:system|DEVICEID")); -// assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(pid0.getValue())); + params = new SearchParameterMap(); + params.setLoadSynchronous(true); + params.add("_has", new HasParam("Observation", "subject", "device.identifier", "urn:system|DEVICEID")); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(pid0.getValue())); // No targets exist params = new SearchParameterMap(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java index a446d5e9440..590e86b89a3 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchOptimizedTest.java @@ -30,7 +30,6 @@ import org.junit.Test; import org.springframework.aop.framework.AopProxyUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean; -import org.springframework.test.context.TestPropertySource; import java.util.ArrayList; import java.util.Arrays; @@ -163,7 +162,7 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { } @Test - public void testFetchTotalAccurateForSlowLoading() throws InterruptedException { + public void testFetchTotalAccurateForSlowLoading() { create200Patients(); mySearchCoordinatorSvcImpl.setLoadingThrottleForUnitTests(25); @@ -836,8 +835,6 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test { assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(4, myCaptureQueriesListener.countInsertQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countDeleteQueriesForCurrentThread()); - // Because of the forced ID's bidirectional link HFJ_RESOURCE <-> HFJ_FORCED_ID - assertEquals(1, myCaptureQueriesListener.countUpdateQueriesForCurrentThread()); runInTransaction(() -> { assertEquals(1, myResourceTableDao.count()); assertEquals(1, myResourceHistoryTableDao.count()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchPageExpiryTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchPageExpiryTest.java index fcd0961bd9f..c81ca66f935 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchPageExpiryTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchPageExpiryTest.java @@ -32,7 +32,7 @@ import javax.annotation.Nullable; import java.util.Date; import java.util.concurrent.atomic.AtomicLong; -import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.DEFAULT_CUTOFF_SLACK; +import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLEANUP_JOB_INTERVAL_MILLIS; import static org.awaitility.Awaitility.await; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.*; @@ -47,7 +47,7 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { @After() public void after() { DatabaseSearchCacheSvcImpl staleSearchDeletingSvc = AopTestUtils.getTargetObject(mySearchCacheSvc); - staleSearchDeletingSvc.setCutoffSlackForUnitTest(DEFAULT_CUTOFF_SLACK); + staleSearchDeletingSvc.setCutoffSlackForUnitTest(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS); DatabaseSearchCacheSvcImpl.setNowForUnitTests(null); } @@ -81,8 +81,11 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } Thread.sleep(10); - myDaoConfig.setExpireSearchResultsAfterMillis(1000L); - myDaoConfig.setReuseCachedSearchResultsForMillis(500L); + long reuseCachedSearchResultsForMillis = 500L; + myDaoConfig.setReuseCachedSearchResultsForMillis(reuseCachedSearchResultsForMillis); + long millisBetweenReuseAndExpire = 800L; + long expireSearchResultsAfterMillis = 1000L; + myDaoConfig.setExpireSearchResultsAfterMillis(expireSearchResultsAfterMillis); long start = System.currentTimeMillis(); DatabaseSearchCacheSvcImpl.setNowForUnitTests(start); @@ -107,9 +110,9 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } assertEquals(searchUuid1, searchUuid2); - TestUtil.sleepAtLeast(501); + TestUtil.sleepAtLeast(reuseCachedSearchResultsForMillis + 1); - // We're now past 500ms so we shouldn't reuse the search + // We're now past reuseCachedSearchResultsForMillis so we shouldn't reuse the search final String searchUuid3; { @@ -124,35 +127,36 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { // Search just got used so it shouldn't be deleted - DatabaseSearchCacheSvcImpl.setNowForUnitTests(start + 500); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(start + reuseCachedSearchResultsForMillis); + final AtomicLong search1timestamp = new AtomicLong(); + final AtomicLong search2timestamp = new AtomicLong(); final AtomicLong search3timestamp = new AtomicLong(); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theArg0) { - Search search3 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).orElseThrow(()->new InternalErrorException("Search doesn't exist")); - assertNotNull(search3); + Search search1 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1).orElseThrow(()->new InternalErrorException("Search doesn't exist")); + assertNotNull(search1); + search1timestamp.set(search1.getCreated().getTime()); Search search2 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid2).orElseThrow(()->new InternalErrorException("Search doesn't exist")); assertNotNull(search2); - search3timestamp.set(search2.getSearchLastReturned().getTime()); + search2timestamp.set(search2.getCreated().getTime()); + Search search3 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).orElseThrow(()->new InternalErrorException("Search doesn't exist")); + assertNotNull(search3); + search3timestamp.set(search3.getCreated().getTime()); } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + 800); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(search1timestamp.get() + millisBetweenReuseAndExpire); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theArg0) { - assertNotNull(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3)); - } - }); - newTxTemplate().execute(new TransactionCallbackWithoutResult() { - @Override - protected void doInTransactionWithoutResult(TransactionStatus theArg0) { - assertNotNull(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1)); + assertTrue(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).isPresent()); + assertTrue(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1).isPresent()); } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + 1100); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(search1timestamp.get() + reuseCachedSearchResultsForMillis + expireSearchResultsAfterMillis + 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @@ -163,14 +167,12 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + 2100); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + reuseCachedSearchResultsForMillis + expireSearchResultsAfterMillis + 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); await().until(()-> newTxTemplate().execute(t -> !mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1).isPresent())); await().until(()-> newTxTemplate().execute(t -> !mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).isPresent())); - - } @Test @@ -197,7 +199,6 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { params.add(Patient.SP_FAMILY, new StringParam("EXPIRE")); final IBundleProvider bundleProvider = myPatientDao.search(params); assertThat(toUnqualifiedVersionlessIds(bundleProvider), containsInAnyOrder(pid1, pid2)); - assertThat(toUnqualifiedVersionlessIds(bundleProvider), containsInAnyOrder(pid1, pid2)); waitForSearchToSave(bundleProvider.getUuid()); final AtomicLong start = new AtomicLong(); @@ -213,9 +214,11 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } }); - myDaoConfig.setExpireSearchResultsAfterMillis(500); - myDaoConfig.setReuseCachedSearchResultsForMillis(500L); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(start.get() + 499); + int expireSearchResultsAfterMillis = 700; + myDaoConfig.setExpireSearchResultsAfterMillis(expireSearchResultsAfterMillis); + long reuseCachedSearchResultsForMillis = 400L; + myDaoConfig.setReuseCachedSearchResultsForMillis(reuseCachedSearchResultsForMillis); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(start.get() + expireSearchResultsAfterMillis - 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); txTemplate.execute(new TransactionCallbackWithoutResult() { @Override @@ -224,7 +227,7 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(start.get() + 600); + DatabaseSearchCacheSvcImpl.setNowForUnitTests(start.get() + expireSearchResultsAfterMillis + reuseCachedSearchResultsForMillis + 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); txTemplate.execute(new TransactionCallbackWithoutResult() { @Override @@ -251,8 +254,12 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } Thread.sleep(10); - myDaoConfig.setExpireSearchResultsAfterMillis(1000L); - myDaoConfig.setReuseCachedSearchResultsForMillis(500L); + long expireSearchResultsAfterMillis = 1000L; + myDaoConfig.setExpireSearchResultsAfterMillis(expireSearchResultsAfterMillis); + + long reuseCachedSearchResultsForMillis = 500L; + myDaoConfig.setReuseCachedSearchResultsForMillis(reuseCachedSearchResultsForMillis); + long start = System.currentTimeMillis(); final String searchUuid1; @@ -278,9 +285,10 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } assertEquals(searchUuid1, searchUuid2); - TestUtil.sleepAtLeast(501); + TestUtil.sleepAtLeast(reuseCachedSearchResultsForMillis + 1); + myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); - // We're now past 500ms so we shouldn't reuse the search + // We're now past reuseCachedSearchResultsForMillis so we shouldn't reuse the search final String searchUuid3; { @@ -293,37 +301,35 @@ public class FhirResourceDaoR4SearchPageExpiryTest extends BaseJpaR4Test { } assertNotEquals(searchUuid1, searchUuid3); - // Search just got used so it shouldn't be deleted + waitForSearchToSave(searchUuid3); + + // Search hasn't expired yet so it shouldn't be deleted myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); + final AtomicLong search1timestamp = new AtomicLong(); final AtomicLong search3timestamp = new AtomicLong(); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theArg0) { + Search search1 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1).orElseThrow(()->new InternalErrorException("Search doesn't exist")); Search search3 = mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).orElseThrow(()->new InternalErrorException("Search doesn't exist")); assertNotNull(search3); + search1timestamp.set(search1.getCreated().getTime()); search3timestamp.set(search3.getCreated().getTime()); } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + 800); - + DatabaseSearchCacheSvcImpl.setNowForUnitTests(search1timestamp.get() + expireSearchResultsAfterMillis + reuseCachedSearchResultsForMillis + 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); - newTxTemplate().execute(new TransactionCallbackWithoutResult() { - @Override - protected void doInTransactionWithoutResult(TransactionStatus theArg0) { - assertNotNull(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3)); - } - }); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theArg0) { assertFalse(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid1).isPresent()); + assertTrue(mySearchEntityDao.findByUuidAndFetchIncludes(searchUuid3).isPresent()); } }); - DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + 2100); - + DatabaseSearchCacheSvcImpl.setNowForUnitTests(search3timestamp.get() + expireSearchResultsAfterMillis + reuseCachedSearchResultsForMillis + 1); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); newTxTemplate().execute(new TransactionCallbackWithoutResult() { @Override diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchTest.java index bfe7f9cba39..26fbb97b9ab 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchTest.java @@ -23,6 +23,7 @@ import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; +import org.hamcrest.Matchers; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.*; import org.junit.AfterClass; @@ -37,8 +38,10 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.PlatformTransactionManager; +import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; @@ -47,7 +50,6 @@ import static org.junit.Assert.assertThat; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestR4ConfigWithElasticSearch.class}) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) -@Ignore // FIXME: remove public class FhirResourceDaoR4SearchWithElasticSearchTest extends BaseJpaTest { public static final String URL_MY_CODE_SYSTEM = "http://example.com/my_code_system"; public static final String URL_MY_VALUE_SET = "http://example.com/my_value_set"; @@ -147,6 +149,53 @@ public class FhirResourceDaoR4SearchWithElasticSearchTest extends BaseJpaTest { } + + @Test + public void testExpandVsWithMultiInclude_All() throws IOException { + CodeSystem cs = loadResource(myFhirCtx, CodeSystem.class, "/r4/expand-multi-cs.json"); + myCodeSystemDao.update(cs); + + ValueSet vs = loadResource(myFhirCtx, ValueSet.class, "/r4/expand-multi-vs-all.json"); + ValueSet expanded = myValueSetDao.expand(vs, null); + + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); + + // All codes + List codes = expanded + .getExpansion() + .getContains() + .stream() + .map(t -> t.getCode()) + .sorted() + .collect(Collectors.toList()); + assertThat(codes.toString(), codes, Matchers.contains("advice", "message", "note", "notification")); + } + + + @Test + public void testExpandVsWithMultiInclude_Some() throws IOException { + CodeSystem cs = loadResource(myFhirCtx, CodeSystem.class, "/r4/expand-multi-cs.json"); + myCodeSystemDao.update(cs); + + ValueSet vs = loadResource(myFhirCtx, ValueSet.class, "/r4/expand-multi-vs-all.json"); + vs.getCompose().getInclude().get(0).getConcept().remove(0); + vs.getCompose().getInclude().get(0).getConcept().remove(0); + + ValueSet expanded = myValueSetDao.expand(vs, null); + + ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); + + // All codes + List codes = expanded + .getExpansion() + .getContains() + .stream() + .map(t -> t.getCode()) + .sorted() + .collect(Collectors.toList()); + assertThat(codes.toString(), codes, Matchers.contains("advice", "note")); + } + private CodeSystem createExternalCs() { CodeSystem codeSystem = new CodeSystem(); codeSystem.setUrl(URL_MY_CODE_SYSTEM); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithLuceneDisabledTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithLuceneDisabledTest.java index 74920d87c62..4640e577208 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithLuceneDisabledTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithLuceneDisabledTest.java @@ -1,16 +1,20 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.bulk.IBulkDataExportSvc; import ca.uhn.fhir.jpa.config.TestR4WithLuceneDisabledConfig; -import ca.uhn.fhir.jpa.dao.*; +import ca.uhn.fhir.jpa.dao.BaseJpaTest; +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.jpa.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet; +import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.dao.dstu2.FhirResourceDaoDstu2SearchNoFtTest; import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc; -import ca.uhn.fhir.jpa.term.BaseTermReadSvcImpl; import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.api.EncodingEnum; @@ -23,10 +27,10 @@ import ca.uhn.fhir.util.TestUtil; import org.apache.commons.io.IOUtils; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; import org.hl7.fhir.r4.model.*; import org.junit.AfterClass; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -112,7 +116,7 @@ public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest { @Qualifier("myOrganizationDaoR4") private IFhirResourceDao myOrganizationDao; @Autowired - @Qualifier("myJpaValidationSupportChainR4") + @Qualifier("myJpaValidationSupportChain") private IValidationSupport myValidationSupport; @Autowired private IFhirSystemDao mySystemDao; @@ -197,7 +201,7 @@ public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest { } @Test - public void testExpandValueSet() { + public void testExpandValueSet() { CodeSystem cs = new CodeSystem(); cs.setUrl("http://fooCS"); cs.setContent(CodeSystem.CodeSystemContentMode.COMPLETE); @@ -226,6 +230,33 @@ public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest { } + @Test + @Ignore + public void testExpandValueSetWithFilter() { + CodeSystem cs = new CodeSystem(); + cs.setUrl("http://fooCS"); + cs.setContent(CodeSystem.CodeSystemContentMode.COMPLETE); + cs.addConcept().setCode("CODEA"); + cs.addConcept().setCode("CODEB"); + myCodeSystemDao.create(cs); + + ValueSet vs = new ValueSet(); + vs.setUrl("http://fooVS"); + vs.getCompose() + .addInclude() + .setSystem("http://fooCS") + .addFilter() + .setOp(ValueSet.FilterOperator.EQUAL) + .setProperty("code") + .setValue("CODEA"); + + try { + myValueSetDao.expand(vs, null); + } catch (NullPointerException e) { + assertEquals("", e.getMessage()); + } + } + @Test public void testSearchByCodeIn() { CodeSystem cs = new CodeSystem(); @@ -278,10 +309,10 @@ public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest { */ @Test public void testExpandValueSetContainingSystemIncludeWithNoCodes() throws IOException { - CodeSystem cs = loadResourceFromClasspath(CodeSystem.class, "/dstu3/iar/CodeSystem-iar-citizenship-status.xml"); + CodeSystem cs = loadResourceFromClasspath(CodeSystem.class, "/r4/iar/CodeSystem-iar-citizenship-status.xml"); myCodeSystemDao.create(cs); - ValueSet vs = loadResourceFromClasspath(ValueSet.class, "/dstu3/iar/ValueSet-iar-citizenship-status.xml"); + ValueSet vs = loadResourceFromClasspath(ValueSet.class, "/r4/iar/ValueSet-iar-citizenship-status.xml"); myValueSetDao.create(vs); ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StructureDefinitionTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StructureDefinitionTest.java index acadeeb7efb..7195c3c0635 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StructureDefinitionTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StructureDefinitionTest.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.util.TestUtil; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.validation.SnapshotGeneratingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.r4.model.StructureDefinition; import org.junit.After; import org.junit.AfterClass; @@ -11,10 +11,7 @@ import org.junit.Test; import java.io.IOException; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; @SuppressWarnings({"unchecked", "deprecation"}) public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test { @@ -32,12 +29,12 @@ public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test { // Create a validation chain that includes default validation support and a // snapshot generator - DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(); - SnapshotGeneratingValidationSupport snapshotGenerator = new SnapshotGeneratingValidationSupport(myFhirCtx, defaultSupport); + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(myFhirCtx); + SnapshotGeneratingValidationSupport snapshotGenerator = new SnapshotGeneratingValidationSupport(myFhirCtx); ValidationSupportChain chain = new ValidationSupportChain(defaultSupport, snapshotGenerator); // Generate the snapshot - StructureDefinition snapshot = chain.generateSnapshot(differential, "http://foo", null, "THE BEST PROFILE"); + StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(chain, differential, "http://foo", null, "THE BEST PROFILE"); String url = "http://foo"; String webUrl = null; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TerminologyTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TerminologyTest.java index 1b72bfc8f7e..01a2d7e50d9 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TerminologyTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TerminologyTest.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.jpa.dao.r4; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; @@ -14,6 +14,7 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.param.TokenParamModifier; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.TestUtil; @@ -54,7 +55,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test { @Before public void before() { myDaoConfig.setMaximumExpansionSize(5000); - myCachingValidationSupport.flushCaches(); + myCachingValidationSupport.invalidateCaches(); } private CodeSystem createExternalCs() { @@ -164,6 +165,8 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test { } myTermCodeSystemStorageSvc.storeNewCodeSystemVersion(new ResourcePersistentId(table.getId()), URL_MY_CODE_SYSTEM, "SYSTEM NAME", "SYSTEM VERSION", cs, table); + + myTerminologyDeferredStorageSvc.saveAllDeferred(); } private void createLocalCsAndVs() { @@ -593,8 +596,8 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test { try { myValueSetDao.expand(vs, null); fail(); - } catch (InvalidRequestException e) { - assertEquals("Unable to find code system http://example.com/my_code_systemAA", e.getMessage()); + } catch (PreconditionFailedException e) { + assertEquals("Unknown CodeSystem URI \"http://example.com/my_code_systemAA\" referenced from ValueSet", e.getMessage()); } } @@ -806,7 +809,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test { StringType code = new StringType("ParentA"); StringType system = new StringType("http://snomed.info/sct"); - IContextValidationSupport.LookupCodeResult outcome = myCodeSystemDao.lookupCode(code, system, null, mySrd); + IValidationSupport.LookupCodeResult outcome = myCodeSystemDao.lookupCode(code, system, null, mySrd); assertEquals(true, outcome.isFound()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java index d91bf9ad98c..41289e3aff1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java @@ -910,7 +910,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { myPatientDao.create(p, mySrd); fail(); } catch (UnprocessableEntityException e) { - assertEquals("Resource contains reference to Organization/" + id1.getIdPart() + " but resource with ID " + id1.getIdPart() + " is actually of type Observation", e.getMessage()); + assertEquals("Resource contains reference to unknown resource ID Organization/" + id1.getIdPart(), e.getMessage()); } // Now with a forced ID @@ -3842,7 +3842,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { */ @Test public void testUploadExtensionStructureDefinition() { - StructureDefinition ext = myValidationSupport.fetchStructureDefinition(myFhirCtx, "http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"); + StructureDefinition ext = (StructureDefinition) myValidationSupport.fetchStructureDefinition("http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"); Validate.notNull(ext); myStructureDefinitionDao.update(ext); } @@ -3880,7 +3880,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } private static List toStringList(List theUriType) { - ArrayList retVal = new ArrayList(); + ArrayList retVal = new ArrayList<>(); for (UriType next : theUriType) { retVal.add(next.getValue()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java index 280ce3d021f..8eb000a1a1a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java @@ -20,7 +20,7 @@ import org.apache.commons.io.IOUtils; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; import org.hl7.fhir.r4.model.Observation.ObservationStatus; @@ -127,7 +127,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test { obs.getCode().getCodingFirstRep().setSystem("http://loinc.org").setCode("CODE3").setDisplay("Display 3"); obs.getCategoryFirstRep().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/observation-category").setCode("FOO"); oo = validateAndReturnOutcome(obs); - assertEquals(encode(oo), "Unknown code: http://terminology.hl7.org/CodeSystem/observation-category / FOO", oo.getIssueFirstRep().getDiagnostics()); + assertEquals(encode(oo), "Unknown code {http://terminology.hl7.org/CodeSystem/observation-category}FOO", oo.getIssueFirstRep().getDiagnostics()); } @@ -147,6 +147,8 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test { } myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://loinc.org", codesToAdd); + myTerminologyDeferredStorageSvc.saveAllDeferred(); + // Create a valueset ValueSet vs = new ValueSet(); vs.setUrl("http://example.com/fhir/ValueSet/observation-vitalsignresult"); @@ -208,7 +210,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test { obs.getCode().getCodingFirstRep().setSystem("http://loinc.org").setCode("CODE3").setDisplay("Display 3"); obs.getCategoryFirstRep().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/observation-category").setCode("FOO"); oo = validateAndReturnOutcome(obs); - assertEquals(encode(oo), "Unknown code: http://terminology.hl7.org/CodeSystem/observation-category / FOO", oo.getIssueFirstRep().getDiagnostics()); + assertEquals(encode(oo), "Unknown code {http://terminology.hl7.org/CodeSystem/observation-category}FOO", oo.getIssueFirstRep().getDiagnostics()); } @@ -399,12 +401,11 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test { myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); fail(); } catch (PreconditionFailedException e) { - String ooString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()); - ourLog.info(ooString); - assertThat(ooString, containsString("StructureDefinition reference \\\"" + profileUri + "\\\" could not be resolved")); + org.hl7.fhir.r4.model.OperationOutcome oo = (org.hl7.fhir.r4.model.OperationOutcome) e.getOperationOutcome(); + String outputString = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo); + ourLog.info(outputString); + assertThat(outputString, containsString("Profile reference \\\"http://example.com/StructureDefinition/testValidateResourceContainingProfileDeclarationInvalid\\\" could not be resolved, so has not been checked")); } - - } @Test @@ -618,6 +619,8 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test { upload("/r4/uscore/ValueSet-omb-race-category.json"); upload("/r4/uscore/ValueSet-us-core-usps-state.json"); + myTerminologyDeferredStorageSvc.saveAllDeferred(); + { String resource = loadResource("/r4/uscore/patient-resource-badcode.json"); IBaseResource parsedResource = myFhirCtx.newJsonParser().parseResource(resource); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValueSetTest.java index 6ea35a9edf4..fb7bdde03f0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValueSetTest.java @@ -261,14 +261,14 @@ public class FhirResourceDaoR4ValueSetTest extends BaseJpaR4Test { IPrimitiveType display = null; Coding coding = null; CodeableConcept codeableConcept = null; - StringType vsIdentifier = new StringType("http://hl7.org/fhir/ValueSet/yesnodontknow"); - StringType code = new StringType("Y"); - StringType system = new StringType("http://terminology.hl7.org/CodeSystem/v2-0136"); + StringType vsIdentifier = new StringType("http://hl7.org/fhir/ValueSet/administrative-gender"); + StringType code = new StringType("male"); + StringType system = new StringType("http://hl7.org/fhir/administrative-gender"); ValidateCodeResult result = myValueSetDao.validateCode(vsIdentifier, null, code, system, display, coding, codeableConcept, mySrd); ourLog.info(result.getMessage()); assertTrue(result.getMessage(), result.isResult()); - assertEquals("Yes", result.getDisplay()); + assertEquals("Male", result.getDisplay()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java new file mode 100644 index 00000000000..5a1ff0b6e57 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java @@ -0,0 +1,124 @@ +package ca.uhn.fhir.jpa.dao.r4; + +import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; +import ca.uhn.fhir.jpa.dao.data.ISearchDao; +import ca.uhn.fhir.jpa.dao.data.ISearchResultDao; +import ca.uhn.fhir.jpa.entity.Search; +import ca.uhn.fhir.jpa.entity.SearchResult; +import ca.uhn.fhir.jpa.entity.SearchTypeEnum; +import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.jpa.model.search.SearchStatusEnum; +import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc; +import ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl; +import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.param.StringAndListParam; +import ca.uhn.fhir.rest.param.StringOrListParam; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.util.TestUtil; +import org.apache.commons.lang3.time.DateUtils; +import org.hl7.fhir.r4.model.Organization; +import org.hl7.fhir.r4.model.Patient; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.DEFAULT_MAX_DELETE_CANDIDATES_TO_FIND; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.empty; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +public class SearchCoordinatorSvcImplTest extends BaseJpaR4Test { + + @AfterClass + public static void afterClassClearContext() { + TestUtil.clearAllStaticFieldsForUnitTest(); + } + + + @Autowired + private ISearchDao mySearchDao; + + @Autowired + private ISearchResultDao mySearchResultDao; + + @Autowired + private ISearchCoordinatorSvc mySearchCoordinator; + + @Autowired + private ISearchCacheSvc myDataaseCacheSvc; + + @After + public void after() { + DatabaseSearchCacheSvcImpl.setMaximumResultsToDeleteInOnePassForUnitTest(DatabaseSearchCacheSvcImpl.DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_PAS); + DatabaseSearchCacheSvcImpl.setMaximumSearchesToCheckForDeletionCandidacyForUnitTest(DEFAULT_MAX_DELETE_CANDIDATES_TO_FIND); + } + + @Test + public void testDeleteDontMarkPreviouslyMarkedSearchesAsDeleted() { + DatabaseSearchCacheSvcImpl.setMaximumResultsToDeleteInOnePassForUnitTest(5); + DatabaseSearchCacheSvcImpl.setMaximumSearchesToCheckForDeletionCandidacyForUnitTest(10); + + // Create lots of searches + runInTransaction(()->{ + for (int i = 0; i < 20; i++) { + Search search = new Search(); + search.setCreated(DateUtils.addDays(new Date(), -1)); + search.setLastUpdated(DateUtils.addDays(new Date(), -1), DateUtils.addDays(new Date(), -1)); + search.setUuid(UUID.randomUUID().toString()); + search.setSearchType(SearchTypeEnum.SEARCH); + search.setStatus(SearchStatusEnum.FINISHED); + mySearchDao.save(search); + + // Add a bunch of search results to a few (enough that it will take multiple passes) + if (i < 3) { + for (int j = 0; j < 10; j++) { + SearchResult sr = new SearchResult(search); + sr.setOrder(j); + sr.setResourcePid((long) j); + mySearchResultDao.save(sr); + } + } + + } + }); + + runInTransaction(()->{ + assertEquals(20, mySearchDao.count()); + assertEquals(30, mySearchResultDao.count()); + }); + + myDataaseCacheSvc.pollForStaleSearchesAndDeleteThem(); + runInTransaction(()->{ + // We should delete up to 10, but 3 don't get deleted since they have too many results to delete in one pass + assertEquals(13, mySearchDao.count()); + assertEquals(3, mySearchDao.countDeleted()); + // We delete a max of 5 results per search, so half are gone + assertEquals(15, mySearchResultDao.count()); + }); + + myDataaseCacheSvc.pollForStaleSearchesAndDeleteThem(); + runInTransaction(()->{ + // Once again we attempt to delete 10, but the first 3 don't get deleted and still remain + // (total is 6 because 3 weren't deleted, and they blocked another 3 that might have been) + assertEquals(6, mySearchDao.count()); + assertEquals(6, mySearchDao.countDeleted()); + assertEquals(0, mySearchResultDao.count()); + }); + + myDataaseCacheSvc.pollForStaleSearchesAndDeleteThem(); + runInTransaction(()->{ + assertEquals(0, mySearchDao.count()); + assertEquals(0, mySearchDao.countDeleted()); + assertEquals(0, mySearchResultDao.count()); + }); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java index 2fb74964ecf..07f53c62737 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchParamExtractorR4Test.java @@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.dao.r4; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; @@ -15,8 +16,7 @@ import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.util.TestUtil; import com.google.common.collect.Sets; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Consent; @@ -117,6 +117,23 @@ public class SearchParamExtractorR4Test { } + @Test + public void testExtractSearchParamTokenTest() { + Patient p = new Patient(); + p.addIdentifier().setSystem("sys").setValue("val"); + + SearchParamExtractorR4 extractor = new SearchParamExtractorR4(new ModelConfig(), ourCtx, ourValidationSupport, mySearchParamRegistry); + RuntimeSearchParam param = mySearchParamRegistry.getActiveSearchParam("Patient", Patient.SP_IDENTIFIER); + assertNotNull(param); + ISearchParamExtractor.SearchParamSet params = extractor.extractSearchParamTokens(p, param); + assertEquals(1, params.size()); + ResourceIndexedSearchParamToken paramValue = (ResourceIndexedSearchParamToken) params.iterator().next(); + assertEquals("identifier", paramValue.getParamName()); + assertEquals("sys", paramValue.getSystem()); + assertEquals("val", paramValue.getValue()); + } + + @Test public void testExtensionContainingReference() { String path = "Patient.extension('http://patext').value.as(Reference)"; @@ -227,7 +244,7 @@ public class SearchParamExtractorR4Test { @BeforeClass public static void beforeClass() { - ourValidationSupport = new DefaultProfileValidationSupport(); + ourValidationSupport = new DefaultProfileValidationSupport(ourCtx); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r5/BaseJpaR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r5/BaseJpaR5Test.java index 1af9a906c98..bc34e582f5a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r5/BaseJpaR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r5/BaseJpaR5Test.java @@ -1,6 +1,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.interceptor.api.IInterceptorService; import ca.uhn.fhir.jpa.binstore.BinaryAccessProvider; import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor; @@ -28,7 +29,6 @@ import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; import ca.uhn.fhir.jpa.term.api.ITermReadSvcR5; import ca.uhn.fhir.jpa.util.ResourceCountCache; import ca.uhn.fhir.jpa.util.ResourceProviderFactory; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR5; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.Constants; @@ -43,8 +43,7 @@ import org.apache.commons.io.IOUtils; import org.hibernate.search.jpa.FullTextEntityManager; import org.hibernate.search.jpa.Search; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.model.*; import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent; import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent; @@ -76,7 +75,7 @@ import static org.mockito.Mockito.mock; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestR5Config.class}) public abstract class BaseJpaR5Test extends BaseJpaTest { - private static JpaValidationSupportChainR5 ourJpaValidationSupportChainR5; + private static IValidationSupport ourJpaValidationSupportChainR5; private static IFhirResourceDaoValueSet ourValueSetDao; @Autowired @@ -296,7 +295,7 @@ public abstract class BaseJpaR5Test extends BaseJpaTest { @Autowired protected PlatformTransactionManager myTxManager; @Autowired - @Qualifier("myJpaValidationSupportChainR5") + @Qualifier("myJpaValidationSupportChain") protected IValidationSupport myValidationSupport; @Autowired @Qualifier("myValueSetDaoR5") @@ -317,7 +316,7 @@ public abstract class BaseJpaR5Test extends BaseJpaTest { protected SubscriptionRegistry mySubscriptionRegistry; protected IServerInterceptor myInterceptor; @Autowired - private JpaValidationSupportChainR5 myJpaValidationSupportChainR5; + private IValidationSupport myJpaValidationSupportChain; private PerformanceTracingLoggingInterceptor myPerformanceTracingLoggingInterceptor; private List mySystemInterceptors; @Autowired @@ -359,7 +358,7 @@ public abstract class BaseJpaR5Test extends BaseJpaTest { @After() public void afterGrabCaches() { ourValueSetDao = myValueSetDao; - ourJpaValidationSupportChainR5 = myJpaValidationSupportChainR5; + ourJpaValidationSupportChainR5 = myJpaValidationSupportChain; } @Before @@ -440,7 +439,7 @@ public abstract class BaseJpaR5Test extends BaseJpaTest { @AfterClass public static void afterClassClearContextBaseJpaR5Test() { ourValueSetDao.purgeCaches(); - ourJpaValidationSupportChainR5.flush(); + ourJpaValidationSupportChainR5.invalidateCaches(); TestUtil.clearAllStaticFieldsForUnitTest(); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java index e2fc66fd728..c68203b61d6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java @@ -2713,7 +2713,6 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test { String responseString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); ourLog.info("Response: {}", responseString); assertThat(responseString, not(containsString("Resource has no id"))); - assertEquals(200, response.getStatusLine().getStatusCode()); } finally { IOUtils.closeQuietly(response); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java index 9b74dbdb779..1b971a1b1ae 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.provider.dstu3; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.config.WebsocketDispatcherConfig; import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; import ca.uhn.fhir.jpa.provider.GraphQLProvider; @@ -8,7 +9,6 @@ import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc; import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainDstu3; import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.EncodingEnum; @@ -51,7 +51,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { - protected static JpaValidationSupportChainDstu3 myValidationSupport; + protected static IValidationSupport myValidationSupport; protected static IGenericClient ourClient; protected static CloseableHttpClient ourHttpClient; protected static int ourPort; @@ -61,8 +61,8 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { protected static SearchParamRegistryImpl ourSearchParamRegistry; protected static DatabaseBackedPagingProvider ourPagingProvider; protected static ISearchCoordinatorSvc ourSearchCoordinatorSvc; - private static Server ourServer; protected static SubscriptionTriggeringProvider ourSubscriptionTriggeringProvider; + private static Server ourServer; public BaseResourceProviderDstu3Test() { super(); @@ -75,7 +75,7 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { ourRestServer.getInterceptorService().unregisterAllInterceptors(); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) @Before public void before() throws Exception { myResourceCountsCache.clear(); @@ -123,8 +123,8 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { ServletHolder subsServletHolder = new ServletHolder(); subsServletHolder.setServlet(dispatcherServlet); subsServletHolder.setInitParameter( - ContextLoader.CONFIG_LOCATION_PARAM, - WebsocketDispatcherConfig.class.getName()); + ContextLoader.CONFIG_LOCATION_PARAM, + WebsocketDispatcherConfig.class.getName()); proxyHandler.addServlet(subsServletHolder, "/*"); // Register a CORS filter @@ -147,11 +147,11 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { server.setHandler(proxyHandler); JettyUtil.startServer(server); - ourPort = JettyUtil.getPortForStartedServer(server); - ourServerBase = "http://localhost:" + ourPort + "/fhir/context"; + ourPort = JettyUtil.getPortForStartedServer(server); + ourServerBase = "http://localhost:" + ourPort + "/fhir/context"; WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(subsServletHolder.getServlet().getServletConfig().getServletContext()); - myValidationSupport = wac.getBean(JpaValidationSupportChainDstu3.class); + myValidationSupport = wac.getBean(IValidationSupport.class); ourSearchCoordinatorSvc = wac.getBean(ISearchCoordinatorSvc.class); ourSearchParamRegistry = wac.getBean(SearchParamRegistryImpl.class); ourSubscriptionTriggeringProvider = wac.getBean(SubscriptionTriggeringProvider.class); @@ -161,7 +161,7 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { if (shouldLogClient()) { ourClient.registerInterceptor(new LoggingInterceptor()); } - + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); HttpClientBuilder builder = HttpClientBuilder.create(); builder.setConnectionManager(connectionManager); @@ -196,7 +196,7 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { ourHttpClient.close(); ourServer = null; ourHttpClient = null; - myValidationSupport.flush(); + myValidationSupport.invalidateCaches(); myValidationSupport = null; ourWebApplicationContext.close(); ourWebApplicationContext = null; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3DistanceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3DistanceTest.java new file mode 100644 index 00000000000..75f492e45da --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3DistanceTest.java @@ -0,0 +1,153 @@ +package ca.uhn.fhir.jpa.provider.dstu3; + +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; +import org.hl7.fhir.dstu3.model.Bundle; +import org.hl7.fhir.dstu3.model.Location; +import org.hl7.fhir.dstu3.model.PractitionerRole; +import org.hl7.fhir.instance.model.api.IIdType; +import org.junit.Test; + +import java.net.URLEncoder; + +import static org.junit.Assert.assertEquals; + +public class ResourceProviderDstu3DistanceTest extends BaseResourceProviderDstu3Test { + + @Override + public void before() throws Exception { + super.before(); + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testNearSearchApproximate() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + IIdType locId = ourClient.create().resource(loc).execute().getId().toUnqualifiedVersionless(); + + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + String url = "/Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + URLEncoder.encode(":") + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + Location.SP_NEAR_DISTANCE + "=" + bigEnoughDistance + URLEncoder.encode("|http://unitsofmeasure.org|km"); + + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(locId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + String url = "/Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + URLEncoder.encode(":") + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + Location.SP_NEAR_DISTANCE + "=" + tooSmallDistance + URLEncoder.encode("|http://unitsofmeasure.org|km"); + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(0, actual.getEntry().size()); + } + } + + @Test + public void testNearSearchDistanceNoDistanceChained() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LONGITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + IIdType locId = ourClient.create().resource(loc).execute().getId().toUnqualifiedVersionless(); + + PractitionerRole pr = new PractitionerRole(); + pr.addLocation().setReference(locId.getValue()); + IIdType prId = ourClient.create().resource(pr).execute().getId().toUnqualifiedVersionless(); + + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + latitude + URLEncoder.encode(":") + longitude; + + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(prId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + + @Test + public void testNearSearchApproximateChained() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + myCaptureQueriesListener.clear(); + IIdType locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless(); + myCaptureQueriesListener.logInsertQueries(); + + PractitionerRole pr = new PractitionerRole(); + pr.addLocation().setReference(locId.getValue()); + IIdType prId = myPractitionerRoleDao.create(pr).getId().toUnqualifiedVersionless(); + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + URLEncoder.encode(":") + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + "location." + Location.SP_NEAR_DISTANCE + "=" + bigEnoughDistance + URLEncoder.encode("|http://unitsofmeasure.org|km"); + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(prId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + URLEncoder.encode(":") + CoordCalculatorTest.LONGITUDE_CHIN + + "&" + + "location." + Location.SP_NEAR_DISTANCE + "=" + tooSmallDistance + URLEncoder.encode("|http://unitsofmeasure.org|km"); + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(0, actual.getEntry().size()); + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java index 69a03290a8a..f03f54eefee 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java @@ -35,7 +35,7 @@ import org.apache.http.entity.ByteArrayEntity; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.message.BasicNameValuePair; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.Bundle.*; import org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent; @@ -162,7 +162,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { @Test public void testExtensionUrlWithHl7UrlPost() throws IOException { - ValueSet vs = myValidationSupport.fetchResource(myFhirCtx, ValueSet.class, "http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode"); + ValueSet vs = myValidationSupport.fetchResource(ValueSet.class, "http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode"); myValueSetDao.create(vs); @@ -3003,7 +3003,6 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { .count(5) .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid1 = toSearchUuidFromLinkNext(result1); Search search1 = newTxTemplate().execute(new TransactionCallback() { @@ -3012,7 +3011,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { return mySearchEntityDao.findByUuidAndFetchIncludes(uuid1).orElseThrow(() -> new InternalErrorException("")); } }); - Date lastReturned1 = search1.getSearchLastReturned(); + Date created1 = search1.getCreated(); Bundle result2 = ourClient .search() @@ -3021,7 +3020,6 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { .count(5) .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid2 = toSearchUuidFromLinkNext(result2); Search search2 = newTxTemplate().execute(new TransactionCallback() { @@ -3030,9 +3028,9 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { return mySearchEntityDao.findByUuidAndFetchIncludes(uuid2).orElseThrow(() -> new InternalErrorException("")); } }); - Date lastReturned2 = search2.getSearchLastReturned(); + Date created2 = search2.getCreated(); - assertTrue(lastReturned2.getTime() > lastReturned1.getTime()); + assertEquals(created2.getTime(), created1.getTime()); Thread.sleep(1500); @@ -3067,24 +3065,22 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test { .forResource("Organization") .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid1 = toSearchUuidFromLinkNext(result1); Search search1 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid1).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned1 = search1.getSearchLastReturned(); + Date created1 = search1.getCreated(); Bundle result2 = ourClient .search() .forResource("Organization") .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid2 = toSearchUuidFromLinkNext(result2); Search search2 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid2).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned2 = search2.getSearchLastReturned(); + Date created2 = search2.getCreated(); - assertTrue(lastReturned2.getTime() > lastReturned1.getTime()); + assertEquals(created2.getTime(), created1.getTime()); assertEquals(uuid1, uuid2); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3ValueSetTest.java index 0fd5a1d0a71..254d31a1ae6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3ValueSetTest.java @@ -760,9 +760,9 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3 .operation() .onType(ValueSet.class) .named("validate-code") - .withParameter(Parameters.class, "code", new StringType("BRN")) - .andParameter("identifier", new StringType("http://hl7.org/fhir/ValueSet/v2-0487")) - .andParameter("system", new StringType("http://hl7.org/fhir/v2/0487")) + .withParameter(Parameters.class, "code", new StringType("male")) + .andParameter("identifier", new StringType("http://hl7.org/fhir/ValueSet/administrative-gender")) + .andParameter("system", new StringType("http://hl7.org/fhir/administrative-gender")) .useHttpGet() .execute(); @@ -776,7 +776,7 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3 assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), Matchers.containsStringIgnoringCase("succeeded")); assertEquals("display", respParam.getParameter().get(2).getName()); - assertEquals("Burn", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); + assertEquals("Male", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); } /** @@ -790,9 +790,9 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3 .operation() .onType(ValueSet.class) .named("validate-code") - .withParameter(Parameters.class, "code", new StringType("BRN")) - .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/v2-0487")) - .andParameter("system", new StringType("http://hl7.org/fhir/v2/0487")) + .withParameter(Parameters.class, "code", new StringType("male")) + .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/administrative-gender")) + .andParameter("system", new StringType("http://hl7.org/fhir/administrative-gender")) .useHttpGet() .execute(); @@ -806,7 +806,7 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3 assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), Matchers.containsStringIgnoringCase("succeeded")); assertEquals("display", respParam.getParameter().get(2).getName()); - assertEquals("Burn", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); + assertEquals("Male", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); } @After diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java index 33463d346ae..346bc6a0ea4 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/BaseResourceProviderR4Test.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.provider.r4; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.config.WebsocketDispatcherConfig; import ca.uhn.fhir.jpa.dao.DaoRegistry; import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; @@ -11,7 +12,6 @@ import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; import ca.uhn.fhir.jpa.subscription.SubscriptionMatcherInterceptor; import ca.uhn.fhir.jpa.subscription.module.cache.SubscriptionLoader; import ca.uhn.fhir.jpa.util.ResourceCountCache; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR4; import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.EncodingEnum; @@ -56,26 +56,25 @@ import static org.junit.Assert.fail; public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test { - protected static JpaValidationSupportChainR4 myValidationSupport; + protected static IValidationSupport myValidationSupport; protected static CloseableHttpClient ourHttpClient; protected static int ourPort; protected static RestfulServer ourRestServer; protected static String ourServerBase; protected static SearchParamRegistryImpl ourSearchParamRegistry; - private static DatabaseBackedPagingProvider ourPagingProvider; protected static ISearchCoordinatorSvc mySearchCoordinatorSvc; + protected static Server ourServer; + private static DatabaseBackedPagingProvider ourPagingProvider; private static GenericWebApplicationContext ourWebApplicationContext; private static SubscriptionMatcherInterceptor ourSubscriptionMatcherInterceptor; - protected static Server ourServer; protected IGenericClient ourClient; - ResourceCountCache myResourceCountsCache; - private TerminologyUploaderProvider myTerminologyUploaderProvider; - private boolean ourRestHookSubscriptionInterceptorRequested; - @Autowired protected SubscriptionLoader mySubscriptionLoader; @Autowired protected DaoRegistry myDaoRegistry; + ResourceCountCache myResourceCountsCache; + private TerminologyUploaderProvider myTerminologyUploaderProvider; + private boolean ourRestHookSubscriptionInterceptorRequested; public BaseResourceProviderR4Test() { super(); @@ -157,11 +156,11 @@ public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test { server.setHandler(proxyHandler); JettyUtil.startServer(server); - ourPort = JettyUtil.getPortForStartedServer(server); - ourServerBase = "http://localhost:" + ourPort + "/fhir/context"; + ourPort = JettyUtil.getPortForStartedServer(server); + ourServerBase = "http://localhost:" + ourPort + "/fhir/context"; WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(subsServletHolder.getServlet().getServletConfig().getServletContext()); - myValidationSupport = wac.getBean(JpaValidationSupportChainR4.class); + myValidationSupport = wac.getBean(IValidationSupport.class); mySearchCoordinatorSvc = wac.getBean(ISearchCoordinatorSvc.class); ourSearchParamRegistry = wac.getBean(SearchParamRegistryImpl.class); ourSubscriptionMatcherInterceptor = wac.getBean(SubscriptionMatcherInterceptor.class); @@ -225,7 +224,7 @@ public abstract class BaseResourceProviderR4Test extends BaseJpaR4Test { ourHttpClient.close(); ourServer = null; ourHttpClient = null; - myValidationSupport.flush(); + myValidationSupport.invalidateCaches(); myValidationSupport = null; ourWebApplicationContext.close(); ourWebApplicationContext = null; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ExpungeR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ExpungeR4Test.java index 66ad4b49b82..7d35ccc3046 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ExpungeR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ExpungeR4Test.java @@ -171,6 +171,34 @@ public class ExpungeR4Test extends BaseResourceProviderR4Test { @Test public void testExpungeAllVersionsDeletesRow() { + // Create then delete + Patient p = new Patient(); + p.setId("TEST"); + p.setActive(true); + p.addName().setFamily("FOO"); + myPatientDao.update(p); + + p.setActive(false); + myPatientDao.update(p); + + myPatientDao.delete(new IdType("Patient/TEST")); + + runInTransaction(() -> assertThat(myResourceTableDao.findAll(), not(empty()))); + runInTransaction(() -> assertThat(myResourceHistoryTableDao.findAll(), not(empty()))); + runInTransaction(() -> assertThat(myForcedIdDao.findAll(), not(empty()))); + + myPatientDao.expunge(new ExpungeOptions() + .setExpungeDeletedResources(true) + .setExpungeOldVersions(true), null); + + runInTransaction(() -> assertThat(myResourceTableDao.findAll(), empty())); + runInTransaction(() -> assertThat(myResourceHistoryTableDao.findAll(), empty())); + runInTransaction(() -> assertThat(myForcedIdDao.findAll(), empty())); + + } + + @Test + public void testExpungeAllVersionsWithTagsDeletesRow() { // Create then delete Patient p = new Patient(); p.setId("TEST"); @@ -178,6 +206,10 @@ public class ExpungeR4Test extends BaseResourceProviderR4Test { p.setActive(true); p.addName().setFamily("FOO"); myPatientDao.update(p).getId(); + + p.setActive(false); + myPatientDao.update(p); + myPatientDao.delete(new IdType("Patient/TEST")); runInTransaction(() -> assertThat(myResourceTableDao.findAll(), not(empty()))); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderInterceptorR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderInterceptorR4Test.java index 72234a1a537..180d8483ed8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderInterceptorR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderInterceptorR4Test.java @@ -1,7 +1,9 @@ package ca.uhn.fhir.jpa.provider.r4; +import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IAnonymousInterceptor; +import ca.uhn.fhir.interceptor.api.Interceptor; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.interceptor.PerformanceTracingLoggingInterceptor; @@ -45,8 +47,10 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.any; @@ -421,6 +425,81 @@ public class ResourceProviderInterceptorR4Test extends BaseResourceProviderR4Tes } } + @Test + public void testInterceptorExpandsSearch() { + + @Interceptor + class SearchExpandingInterceptor { + + @Hook(Pointcut.SERVER_INCOMING_REQUEST_POST_PROCESSED) + public void enrich(RequestDetails theRequestDetails) { + + String[] subjectValues = theRequestDetails.getParameters().get("subject"); + if (subjectValues != null) { + for (int index = 0; index < subjectValues.length; index++) { + String nextValue = subjectValues[index]; + if (nextValue.equals("Patient/p1")) { + nextValue = "Patient/p1,Patient/p2"; + subjectValues[index] = nextValue; + } + } + } + + } + + } + + Patient p1 = new Patient(); + p1.setId("p1"); + p1.addIdentifier().setValue("p1"); + myPatientDao.update(p1); + + Observation o1 = new Observation(); + o1.setId("o1"); + o1.getSubject().setReference("Patient/p1"); + myObservationDao.update(o1); + + Patient p2 = new Patient(); + p2.setId("p2"); + p2.addIdentifier().setValue("p2"); + myPatientDao.update(p2); + + Observation o2 = new Observation(); + o2.setId("o2"); + o2.getSubject().setReference("Patient/p2"); + myObservationDao.update(o2); + + Patient p3 = new Patient(); + p3.setId("p3"); + p3.addIdentifier().setValue("p3"); + myPatientDao.update(p3); + + Observation o3 = new Observation(); + o3.setId("o3"); + o3.getSubject().setReference("Patient/p3"); + myObservationDao.update(o3); + + SearchExpandingInterceptor interceptor = new SearchExpandingInterceptor(); + try { + ourRestServer.registerInterceptor(interceptor); + + Bundle bundle = ourClient + .search() + .forResource(Observation.class) + .where(Observation.SUBJECT.hasId("Patient/p1")) + .returnBundle(Bundle.class) + .execute(); + List ids = toUnqualifiedVersionlessIdValues(bundle); + assertThat(ids, containsInAnyOrder("Observation/o1", "Observation/o2")); + + } finally { + ourRestServer.unregisterInterceptor(interceptor); + } + + + } + + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java index ca08514295b..88c27f47a2e 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4CacheTest.java @@ -9,20 +9,29 @@ import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Patient; import org.junit.After; import org.junit.AfterClass; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import java.util.Date; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.blankOrNullString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.core.IsNot.not; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { + private static final Logger ourLog = LoggerFactory.getLogger(ResourceProviderR4CacheTest.class); private CapturingInterceptor myCapturingInterceptor; @Autowired private ISearchDao mySearchEntityDao; @@ -184,6 +193,39 @@ public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test { assertEquals(results1.getId(), results2.getId()); } + @Test + public void testDeletedSearchResultsNotReturnedFromCache() { + Patient p = new Patient(); + p.addName().setFamily("Foo"); + String p1Id = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); + + p = new Patient(); + p.addName().setFamily("Foo"); + String p2Id = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); + + Bundle resp1 = ourClient + .search() + .forResource("Patient") + .where(Patient.NAME.matches().value("foo")) + .returnBundle(Bundle.class) + .execute(); + assertEquals(2, resp1.getEntry().size()); + + ourClient.delete().resourceById(new IdType(p1Id)).execute(); + + Bundle resp2 = ourClient + .search() + .forResource("Patient") + .where(Patient.NAME.matches().value("foo")) + .returnBundle(Bundle.class) + .execute(); + + assertEquals(resp1.getId(), resp2.getId()); + + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp2)); + assertEquals(1, resp2.getEntry().size()); + } + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4DistanceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4DistanceTest.java new file mode 100644 index 00000000000..653f7b7a258 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4DistanceTest.java @@ -0,0 +1,146 @@ +package ca.uhn.fhir.jpa.provider.r4; + +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Location; +import org.hl7.fhir.r4.model.PractitionerRole; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class ResourceProviderR4DistanceTest extends BaseResourceProviderR4Test { + @Override + public void before() throws Exception { + super.before(); + myDaoConfig.setReuseCachedSearchResultsForMillis(null); + } + + @Test + public void testNearSearchApproximate() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + IIdType locId = ourClient.create().resource(loc).execute().getId().toUnqualifiedVersionless(); + + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + String url = "/Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + CoordCalculatorTest.LONGITUDE_CHIN + + "|" + bigEnoughDistance; + + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(locId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + String url = "/Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + CoordCalculatorTest.LONGITUDE_CHIN + + "|" + tooSmallDistance; + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(0, actual.getEntry().size()); + } + } + + @Test + public void testNearSearchDistanceNoDistanceChained() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_CHIN; + double longitude = CoordCalculatorTest.LONGITUDE_CHIN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + IIdType locId = ourClient.create().resource(loc).execute().getId().toUnqualifiedVersionless(); + + PractitionerRole pr = new PractitionerRole(); + pr.addLocation().setReference(locId.getValue()); + IIdType prId = ourClient.create().resource(pr).execute().getId().toUnqualifiedVersionless(); + + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + latitude + "|" + longitude; + + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(prId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + + @Test + public void testNearSearchApproximateChained() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + myCaptureQueriesListener.clear(); + IIdType locId = myLocationDao.create(loc).getId().toUnqualifiedVersionless(); + myCaptureQueriesListener.logInsertQueries(); + + PractitionerRole pr = new PractitionerRole(); + pr.addLocation().setReference(locId.getValue()); + IIdType prId = myPractitionerRoleDao.create(pr).getId().toUnqualifiedVersionless(); + { // In the box + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + CoordCalculatorTest.LONGITUDE_CHIN + + "|" + bigEnoughDistance; + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(1, actual.getEntry().size()); + assertEquals(prId.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + } + + { // Outside the box + double tooSmallDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN / 2; + String url = "PractitionerRole?location." + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + CoordCalculatorTest.LONGITUDE_CHIN + + "|" + tooSmallDistance; + + myCaptureQueriesListener.clear(); + Bundle actual = ourClient + .search() + .byUrl(ourServerBase + "/" + url) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + myCaptureQueriesListener.logSelectQueries(); + + assertEquals(0, actual.getEntry().size()); + } + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java index 22a94634be4..56c98b94cfd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java @@ -14,27 +14,16 @@ import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.PreferReturnEnum; -import ca.uhn.fhir.rest.api.SearchTotalModeEnum; -import ca.uhn.fhir.rest.api.SummaryEnum; +import ca.uhn.fhir.rest.api.*; +import ca.uhn.fhir.rest.client.apache.ResourceEntity; import ca.uhn.fhir.rest.client.api.IClientInterceptor; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.IHttpRequest; import ca.uhn.fhir.rest.client.api.IHttpResponse; import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; import ca.uhn.fhir.rest.gclient.StringClientParam; -import ca.uhn.fhir.rest.param.DateRangeParam; -import ca.uhn.fhir.rest.param.NumberParam; -import ca.uhn.fhir.rest.param.ParamPrefixEnum; -import ca.uhn.fhir.rest.param.StringAndListParam; -import ca.uhn.fhir.rest.param.StringOrListParam; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import ca.uhn.fhir.rest.param.*; +import ca.uhn.fhir.rest.server.exceptions.*; import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.util.UrlUtil; @@ -46,29 +35,16 @@ import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.time.DateUtils; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPatch; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.*; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.message.BasicNameValuePair; import org.hamcrest.Matchers; -import org.hl7.fhir.instance.model.api.IAnyResource; -import org.hl7.fhir.instance.model.api.IBaseBundle; -import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.r4.model.Bundle.BundleLinkComponent; -import org.hl7.fhir.r4.model.Bundle.BundleType; -import org.hl7.fhir.r4.model.Bundle.HTTPVerb; -import org.hl7.fhir.r4.model.Bundle.SearchEntryMode; +import org.hl7.fhir.r4.model.Bundle.*; import org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent; import org.hl7.fhir.r4.model.Encounter.EncounterStatus; import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; @@ -77,11 +53,8 @@ import org.hl7.fhir.r4.model.Observation.ObservationStatus; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType; import org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType; import org.hl7.fhir.r4.model.Subscription.SubscriptionStatus; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; +import org.junit.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.util.AopTestUtils; import org.springframework.transaction.TransactionStatus; @@ -96,28 +69,14 @@ import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketTimeoutException; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; import java.util.stream.Collectors; import static ca.uhn.fhir.jpa.util.TestUtil.sleepAtLeast; import static ca.uhn.fhir.jpa.util.TestUtil.sleepOneClick; import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; @SuppressWarnings("Duplicates") public class ResourceProviderR4Test extends BaseResourceProviderR4Test { @@ -2303,6 +2262,28 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } } + + @Test + public void testValidateResourceContainingProfileDeclarationDoesntResolve() throws IOException { + Observation input = new Observation(); + input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); + input.getMeta().addProfile("http://foo/structuredefinition/myprofile"); + + input.getCode().setText("Hello"); + input.setStatus(ObservationStatus.FINAL); + + HttpPost post = new HttpPost(ourServerBase + "/Observation/$validate?_pretty=true"); + post.setEntity(new ResourceEntity(myFhirCtx, input)); + + try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { + String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); + ourLog.info(respString); + assertEquals(412, resp.getStatusLine().getStatusCode()); + assertThat(respString, containsString("Profile reference \\\"http://foo/structuredefinition/myprofile\\\" could not be resolved, so has not been checked")); + } + } + + @SuppressWarnings("unused") @Test public void testFullTextSearch() throws Exception { @@ -4115,11 +4096,10 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .count(5) .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid1 = toSearchUuidFromLinkNext(result1); Search search1 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid1).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned1 = search1.getSearchLastReturned(); + Date created1 = search1.getCreated(); Bundle result2 = ourClient .search() @@ -4128,13 +4108,12 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .count(5) .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid2 = toSearchUuidFromLinkNext(result2); Search search2 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid2).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned2 = search2.getSearchLastReturned(); + Date created2 = search2.getCreated(); - assertTrue(lastReturned2.getTime() > lastReturned1.getTime()); + assertEquals(created2.getTime(), created1.getTime()); Thread.sleep(1500); @@ -4145,7 +4124,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .count(5) .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); String uuid3 = toSearchUuidFromLinkNext(result3); @@ -4170,11 +4148,10 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .forResource("Organization") .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid1 = toSearchUuidFromLinkNext(result1); Search search1 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid1).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned1 = search1.getSearchLastReturned(); + Date created1 = search1.getCreated(); sleepOneClick(); @@ -4183,13 +4160,12 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .forResource("Organization") .returnBundle(Bundle.class) .execute(); - mySearchCacheSvc.flushLastUpdated(); final String uuid2 = toSearchUuidFromLinkNext(result2); Search search2 = newTxTemplate().execute(theStatus -> mySearchEntityDao.findByUuidAndFetchIncludes(uuid2).orElseThrow(() -> new InternalErrorException(""))); - Date lastReturned2 = search2.getSearchLastReturned(); + Date created2 = search2.getCreated(); - assertTrue(lastReturned2.getTime() > lastReturned1.getTime()); + assertEquals(created2.getTime(), created1.getTime()); assertEquals(uuid1, uuid2); } @@ -5392,7 +5368,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { @Test public void testValidateJsonWithDuplicateKey() throws IOException { - String inputStr = "{\"resourceType\":\"Patient\", \"name\":[{\"text\":foo\"}], name:[{\"text\":\"foo\"}] }"; + String inputStr = "{\"resourceType\":\"Patient\", \"name\":[{\"text\":\"foo\"}], \"name\":[{\"text\":\"foo\"}] }"; HttpPost post = new HttpPost(ourServerBase + "/Patient/$validate"); post.setEntity(new StringEntity(inputStr, ContentType.create(Constants.CT_FHIR_JSON_NEW, "UTF-8"))); @@ -5402,7 +5378,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { ourLog.info(resp); assertEquals(412, response.getStatusLine().getStatusCode()); - assertThat(resp, stringContainsInOrder("Error parsing JSON source: Syntax error in json reading special word false at Line 1")); + assertThat(resp, stringContainsInOrder("Duplicated property name: name")); } finally { response.getEntity().getContent().close(); response.close(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4ValueSetTest.java index ef683ba265f..ba37b2d8ab8 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4ValueSetTest.java @@ -950,9 +950,9 @@ public class ResourceProviderR4ValueSetTest extends BaseResourceProviderR4Test { .operation() .onType(ValueSet.class) .named("validate-code") - .withParameter(Parameters.class, "code", new StringType("Y")) - .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/yesnodontknow")) - .andParameter("system", new StringType("http://terminology.hl7.org/CodeSystem/v2-0136")) + .withParameter(Parameters.class, "code", new StringType("male")) + .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/administrative-gender")) + .andParameter("system", new StringType("http://hl7.org/fhir/administrative-gender")) .useHttpGet() .execute(); @@ -966,7 +966,7 @@ public class ResourceProviderR4ValueSetTest extends BaseResourceProviderR4Test { assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), containsStringIgnoringCase("succeeded")); assertEquals("display", respParam.getParameter().get(2).getName()); - assertEquals("Yes", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); + assertEquals("Male", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); } @Test diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/StaleSearchDeletingSvcR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/StaleSearchDeletingSvcR4Test.java index a760af6a195..c66c824022c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/StaleSearchDeletingSvcR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/StaleSearchDeletingSvcR4Test.java @@ -9,12 +9,10 @@ import ca.uhn.fhir.jpa.entity.SearchResult; import ca.uhn.fhir.jpa.entity.SearchTypeEnum; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.search.SearchStatusEnum; -import ca.uhn.fhir.jpa.search.StaleSearchDeletingSvcImpl; import ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl; import ca.uhn.fhir.rest.gclient.IClientExecutable; import ca.uhn.fhir.rest.gclient.IQuery; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import ca.uhn.fhir.test.utilities.UnregisterScheduledProcessor; import ca.uhn.fhir.util.TestUtil; import org.apache.commons.lang3.time.DateUtils; import org.hl7.fhir.r4.model.Bundle; @@ -25,7 +23,6 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.TestPropertySource; import org.springframework.test.util.AopTestUtils; import java.util.Date; @@ -50,7 +47,7 @@ public class StaleSearchDeletingSvcR4Test extends BaseResourceProviderR4Test { public void after() throws Exception { super.after(); DatabaseSearchCacheSvcImpl staleSearchDeletingSvc = AopTestUtils.getTargetObject(mySearchCacheSvc); - staleSearchDeletingSvc.setCutoffSlackForUnitTest(DatabaseSearchCacheSvcImpl.DEFAULT_CUTOFF_SLACK); + staleSearchDeletingSvc.setCutoffSlackForUnitTest(DatabaseSearchCacheSvcImpl.SEARCH_CLEANUP_JOB_INTERVAL_MILLIS); DatabaseSearchCacheSvcImpl.setMaximumResultsToDeleteForUnitTest(DatabaseSearchCacheSvcImpl.DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_STMT); DatabaseSearchCacheSvcImpl.setMaximumResultsToDeleteInOnePassForUnitTest(DatabaseSearchCacheSvcImpl.DEFAULT_MAX_RESULTS_TO_DELETE_IN_ONE_PAS); } @@ -121,7 +118,6 @@ public class StaleSearchDeletingSvcR4Test extends BaseResourceProviderR4Test { search.setCreated(DateUtils.addDays(new Date(), -10000)); search.setSearchType(SearchTypeEnum.SEARCH); search.setResourceType("Patient"); - search.setSearchLastReturned(DateUtils.addDays(new Date(), -10000)); search = mySearchEntityDao.save(search); for (int i = 0; i < 15; i++) { @@ -163,7 +159,6 @@ public class StaleSearchDeletingSvcR4Test extends BaseResourceProviderR4Test { search.setCreated(DateUtils.addDays(new Date(), -10000)); search.setSearchType(SearchTypeEnum.SEARCH); search.setResourceType("Patient"); - search.setSearchLastReturned(DateUtils.addDays(new Date(), -10000)); mySearchEntityDao.save(search); }); @@ -190,7 +185,6 @@ public class StaleSearchDeletingSvcR4Test extends BaseResourceProviderR4Test { search.setCreated(DateUtils.addDays(new Date(), -10000)); search.setSearchType(SearchTypeEnum.SEARCH); search.setResourceType("Patient"); - search.setSearchLastReturned(DateUtils.addDays(new Date(), -10000)); search = mySearchEntityDao.save(search); }); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java index 5c62e5deb4d..93bc6c28a21 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/SystemProviderR4Test.java @@ -38,7 +38,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.Bundle.BundleType; import org.hl7.fhir.r4.model.Bundle.HTTPVerb; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java index 1eafcc637d7..cfb73e25a0b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java @@ -1,8 +1,12 @@ package ca.uhn.fhir.jpa.provider.r4; +import ca.uhn.fhir.jpa.entity.TermCodeSystem; +import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; +import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; import ca.uhn.fhir.jpa.term.api.ITermLoaderSvc; +import ca.uhn.fhir.model.api.annotation.SimpleSetter; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.TestUtil; @@ -21,10 +25,12 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.Arrays; import java.util.List; +import java.util.Optional; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import static ca.uhn.fhir.jpa.term.loinc.LoincUploadPropertiesEnum.*; +import static org.apache.commons.lang3.StringUtils.leftPad; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; @@ -244,11 +250,132 @@ public class TerminologyUploaderProviderR4Test extends BaseResourceProviderR4Tes )); assertHierarchyContains( - "CHEM seq=1", - " HB seq=1", - " NEUT seq=2", - "MICRO seq=2", - " C&S seq=1" + "CHEM seq=0", + " HB seq=0", + " NEUT seq=1", + "MICRO seq=0", + " C&S seq=0" + ); + } + + @Test + public void testApplyDeltaAdd_UsingCodeSystemWithComma() throws IOException { + + // Create initial codesystem + { + CodeSystem codeSystem = new CodeSystem(); + codeSystem.setContent(CodeSystem.CodeSystemContentMode.NOTPRESENT); + codeSystem.setUrl("https://good.health"); + + LoggingInterceptor interceptor = new LoggingInterceptor(true); + ourClient.registerInterceptor(interceptor); + ourClient + .create() + .resource(codeSystem) + .execute(); + ourClient.unregisterInterceptor(interceptor); + } + + // Add a child with a really long description + Parameters outcome; + { + Parameters inputBundle = loadResourceFromClasspath(Parameters.class, "/term-delta-json.json"); + + LoggingInterceptor interceptor = new LoggingInterceptor(true); + ourClient.registerInterceptor(interceptor); + outcome = ourClient + .operation() + .onType(CodeSystem.class) + .named(JpaConstants.OPERATION_APPLY_CODESYSTEM_DELTA_ADD) + .withParameters(inputBundle) + .execute(); + ourClient.unregisterInterceptor(interceptor); + } + + String encoded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder( + "\"name\": \"conceptCount\"", + "\"valueInteger\": 2", + "\"name\": \"target\"", + "\"reference\": \"CodeSystem/" + )); + + assertHierarchyContains( + "1111222233 seq=0", + " 1111222234 seq=0" + ); + + runInTransaction(()->{ + TermCodeSystem codeSystem = myTermCodeSystemDao.findByCodeSystemUri("https://good.health"); + TermCodeSystemVersion version = codeSystem.getCurrentVersion(); + TermConcept code = myTermConceptDao.findByCodeSystemAndCode(version, "1111222233").get(); + assertEquals("Some label for the parent - with a dash too", code.getDisplay()); + + code = myTermConceptDao.findByCodeSystemAndCode(version, "1111222234").get(); + assertEquals("Some very very very very very looooooong child label with a coma, another one, one more, more and final one", code.getDisplay()); + }); + } + + + + @Test + public void testApplyDeltaAdd_UsingCodeSystemWithVeryLongDescription() { + + // Create initial codesystem + { + CodeSystem codeSystem = new CodeSystem(); + codeSystem.setUrl("http://foo/cs"); + CodeSystem.ConceptDefinitionComponent chem = codeSystem.addConcept().setCode("CHEM").setDisplay("Chemistry"); + chem.addConcept().setCode("HB").setDisplay("Hemoglobin"); + + LoggingInterceptor interceptor = new LoggingInterceptor(true); + ourClient.registerInterceptor(interceptor); + Parameters outcome = ourClient + .operation() + .onType(CodeSystem.class) + .named(JpaConstants.OPERATION_APPLY_CODESYSTEM_DELTA_ADD) + .withParameter(Parameters.class, TerminologyUploaderProvider.PARAM_SYSTEM, new UriType("http://foo/cs")) + .andParameter(TerminologyUploaderProvider.PARAM_CODESYSTEM, codeSystem) + .prettyPrint() + .execute(); + ourClient.unregisterInterceptor(interceptor); + } + + // Add a child with a really long description + Parameters outcome; + { + CodeSystem codeSystem = new CodeSystem(); + codeSystem.setUrl("http://foo/cs"); + CodeSystem.ConceptDefinitionComponent chem = codeSystem.addConcept().setCode("HB").setDisplay("Hemoglobin") + .addConcept().setCode("HBA").setDisplay(leftPad("", 500, 'Z')); + + LoggingInterceptor interceptor = new LoggingInterceptor(true); + ourClient.registerInterceptor(interceptor); + outcome = ourClient + .operation() + .onType(CodeSystem.class) + .named(JpaConstants.OPERATION_APPLY_CODESYSTEM_DELTA_ADD) + .withParameter(Parameters.class, TerminologyUploaderProvider.PARAM_SYSTEM, new UriType("http://foo/cs")) + .andParameter(TerminologyUploaderProvider.PARAM_CODESYSTEM, codeSystem) + .prettyPrint() + .execute(); + ourClient.unregisterInterceptor(interceptor); + } + + String encoded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder( + "\"name\": \"conceptCount\"", + "\"valueInteger\": 2", + "\"name\": \"target\"", + "\"reference\": \"CodeSystem/" + )); + + assertHierarchyContains( + "CHEM seq=0", + " HB seq=0", + " HBA seq=0" ); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/BaseResourceProviderR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/BaseResourceProviderR5Test.java index b9c8f576308..5c266dbfea4 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/BaseResourceProviderR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/BaseResourceProviderR5Test.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.provider.r5; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.config.WebsocketDispatcherConfig; import ca.uhn.fhir.jpa.dao.DaoRegistry; import ca.uhn.fhir.jpa.dao.r5.BaseJpaR5Test; @@ -11,7 +12,6 @@ import ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl; import ca.uhn.fhir.jpa.subscription.SubscriptionMatcherInterceptor; import ca.uhn.fhir.jpa.subscription.module.cache.SubscriptionLoader; import ca.uhn.fhir.jpa.util.ResourceCountCache; -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainR5; import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.rest.api.EncodingEnum; @@ -56,7 +56,7 @@ import static org.junit.Assert.fail; public abstract class BaseResourceProviderR5Test extends BaseJpaR5Test { - protected static JpaValidationSupportChainR5 myValidationSupport; + protected static IValidationSupport myValidationSupport; protected static CloseableHttpClient ourHttpClient; protected static int ourPort; protected static RestfulServer ourRestServer; @@ -162,7 +162,7 @@ public abstract class BaseResourceProviderR5Test extends BaseJpaR5Test { ourServerBase = "http://localhost:" + ourPort + "/fhir/context"; WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(subsServletHolder.getServlet().getServletConfig().getServletContext()); - myValidationSupport = wac.getBean(JpaValidationSupportChainR5.class); + myValidationSupport = wac.getBean(IValidationSupport.class); mySearchCoordinatorSvc = wac.getBean(ISearchCoordinatorSvc.class); ourSearchParamRegistry = wac.getBean(SearchParamRegistryImpl.class); ourSubscriptionMatcherInterceptor = wac.getBean(SubscriptionMatcherInterceptor.class); @@ -226,7 +226,7 @@ public abstract class BaseResourceProviderR5Test extends BaseJpaR5Test { ourHttpClient.close(); ourServer = null; ourHttpClient = null; - myValidationSupport.flush(); + myValidationSupport.invalidateCaches(); myValidationSupport = null; ourWebApplicationContext.close(); ourWebApplicationContext = null; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5Test.java index 3c4ef4772af..6d4a4f4760b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5Test.java @@ -222,6 +222,27 @@ public class ResourceProviderR5Test extends BaseResourceProviderR5Test { assertThat(ids, containsInAnyOrder(oid)); } + + @Test + public void testCount0() { + Observation observation = new Observation(); + observation.setEffective(new DateTimeType("1965-08-09")); + myObservationDao.create(observation).getId().toUnqualified(); + + observation = new Observation(); + observation.setEffective(new DateTimeType("1965-08-10")); + myObservationDao.create(observation).getId().toUnqualified(); + + Bundle output = ourClient + .search() + .byUrl("Observation?_count=0") + .returnBundle(Bundle.class) + .execute(); + + assertEquals(2, output.getTotal()); + assertEquals(0, output.getEntry().size()); + } + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5ValueSetTest.java index de6cd21ce43..ea9d4720934 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r5/ResourceProviderR5ValueSetTest.java @@ -3,8 +3,13 @@ package ca.uhn.fhir.jpa.provider.r5; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; -import ca.uhn.fhir.jpa.entity.*; +import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; +import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum; +import ca.uhn.fhir.jpa.entity.TermValueSet; +import ca.uhn.fhir.jpa.entity.TermValueSetConcept; +import ca.uhn.fhir.jpa.entity.TermValueSetConceptDesignation; +import ca.uhn.fhir.jpa.entity.TermValueSetPreExpansionStatusEnum; import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc; @@ -23,11 +28,10 @@ import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r5.model.*; +import org.hl7.fhir.r5.model.Bundle.HTTPVerb; import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.model.ValueSet.FilterOperator; -import org.hl7.fhir.r5.model.codesystems.HttpVerb; import org.junit.After; import org.junit.AfterClass; import org.junit.Test; @@ -41,8 +45,16 @@ import java.util.Optional; import static ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoR4TerminologyTest.URL_MY_CODE_SYSTEM; import static ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoR4TerminologyTest.URL_MY_VALUE_SET; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.containsStringIgnoringCase; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @@ -54,35 +66,35 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { private Long myExtensionalVsIdOnResourceTable; private ValueSet myLocalVs; - private void loadAndPersistCodeSystemAndValueSet(HttpVerb theVerb) throws IOException { + private void loadAndPersistCodeSystemAndValueSet(HTTPVerb theVerb) throws IOException { loadAndPersistCodeSystem(theVerb); loadAndPersistValueSet(theVerb); } - private void loadAndPersistCodeSystemAndValueSetWithDesignations(HttpVerb theVerb) throws IOException { + private void loadAndPersistCodeSystemAndValueSetWithDesignations(HTTPVerb theVerb) throws IOException { loadAndPersistCodeSystemWithDesignations(theVerb); loadAndPersistValueSet(theVerb); } - private void loadAndPersistCodeSystemAndValueSetWithDesignationsAndExclude(HttpVerb theVerb) throws IOException { + private void loadAndPersistCodeSystemAndValueSetWithDesignationsAndExclude(HTTPVerb theVerb) throws IOException { loadAndPersistCodeSystemWithDesignations(theVerb); loadAndPersistValueSetWithExclude(theVerb); } - private void loadAndPersistCodeSystem(HttpVerb theVerb) throws IOException { + private void loadAndPersistCodeSystem(HTTPVerb theVerb) throws IOException { CodeSystem codeSystem = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs.xml"); codeSystem.setId("CodeSystem/cs"); persistCodeSystem(codeSystem, theVerb); } - private void loadAndPersistCodeSystemWithDesignations(HttpVerb theVerb) throws IOException { + private void loadAndPersistCodeSystemWithDesignations(HTTPVerb theVerb) throws IOException { CodeSystem codeSystem = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs-with-designations.xml"); codeSystem.setId("CodeSystem/cs"); persistCodeSystem(codeSystem, theVerb); } @SuppressWarnings("EnumSwitchStatementWhichMissesCases") - private void persistCodeSystem(CodeSystem theCodeSystem, HttpVerb theVerb) { + private void persistCodeSystem(CodeSystem theCodeSystem, HTTPVerb theVerb) { switch (theVerb) { case POST: new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { @@ -106,20 +118,20 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { myExtensionalCsIdOnResourceTable = myCodeSystemDao.readEntity(myExtensionalCsId, null).getId(); } - private void loadAndPersistValueSet(HttpVerb theVerb) throws IOException { + private void loadAndPersistValueSet(HTTPVerb theVerb) throws IOException { ValueSet valueSet = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); valueSet.setId("ValueSet/vs"); persistValueSet(valueSet, theVerb); } - private void loadAndPersistValueSetWithExclude(HttpVerb theVerb) throws IOException { + private void loadAndPersistValueSetWithExclude(HTTPVerb theVerb) throws IOException { ValueSet valueSet = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs-with-exclude.xml"); valueSet.setId("ValueSet/vs"); persistValueSet(valueSet, theVerb); } @SuppressWarnings("EnumSwitchStatementWhichMissesCases") - private void persistValueSet(ValueSet theValueSet, HttpVerb theVerb) { + private void persistValueSet(ValueSet theValueSet, HTTPVerb theVerb) { switch (theVerb) { case POST: new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { @@ -195,7 +207,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { myLocalVs.setUrl(URL_MY_VALUE_SET); ConceptSetComponent include = myLocalVs.getCompose().addInclude(); include.setSystem(codeSystem.getUrl()); - include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA"); + include.addFilter().setProperty("concept").setOp(Enumerations.FilterOperator.ISA).setValue("ParentA"); myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless(); } @@ -212,13 +224,13 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { myLocalVs.setUrl(URL_MY_VALUE_SET); ConceptSetComponent include = myLocalVs.getCompose().addInclude(); include.setSystem(codeSystem.getUrl()); - include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("childFOOOOOOO"); + include.addFilter().setProperty("concept").setOp(Enumerations.FilterOperator.ISA).setValue("childFOOOOOOO"); myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless(); } @Test public void testExpandById() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); Parameters respParam = ourClient .operation() @@ -250,7 +262,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testExpandByIdWithPreExpansion() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); Parameters respParam = ourClient @@ -281,7 +293,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testExpandByIdWithFilter() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); Parameters respParam = ourClient .operation() @@ -302,7 +314,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testExpandByIdWithFilterWithPreExpansion() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); Parameters respParam = ourClient @@ -322,7 +334,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testExpandByUrl() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); Parameters respParam = ourClient .operation() @@ -342,7 +354,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testExpandByUrlWithBogusUrl() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); try { ourClient @@ -361,7 +373,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testExpandByUrlWithPreExpansion() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); Parameters respParam = ourClient @@ -384,7 +396,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testExpandByUrlWithPreExpansionAndBogusUrl() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); try { @@ -402,7 +414,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testExpandByValueSet() throws IOException { - loadAndPersistCodeSystem(HttpVerb.POST); + loadAndPersistCodeSystem(HTTPVerb.POST); ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); @@ -426,7 +438,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testExpandByValueSetWithPreExpansion() throws IOException { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystem(HttpVerb.POST); + loadAndPersistCodeSystem(HTTPVerb.POST); myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); @@ -491,7 +503,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testExpandInvalidParams() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); try { ourClient @@ -717,7 +729,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testUpdateValueSetTriggersAnotherPreExpansion() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSetWithDesignations(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSetWithDesignations(HTTPVerb.POST); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); ourLog.info("CodeSystem:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); @@ -732,7 +744,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { ValueSet updatedValueSet = valueSet; updatedValueSet.setName(valueSet.getName().concat(" - MODIFIED")); - persistValueSet(updatedValueSet, HttpVerb.PUT); + persistValueSet(updatedValueSet, HTTPVerb.PUT); updatedValueSet = myValueSetDao.read(myExtensionalVsId); ourLog.info("Updated ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet)); @@ -746,7 +758,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { public void testUpdateValueSetTriggersAnotherPreExpansionUsingTransactionBundle() throws Exception { myDaoConfig.setPreExpandValueSets(true); - loadAndPersistCodeSystemAndValueSetWithDesignations(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSetWithDesignations(Bundle.HTTPVerb.POST); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); ourLog.info("CodeSystem:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); @@ -877,7 +889,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testValidateCodeOperationByCodeAndSystemInstance() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); Parameters respParam = ourClient .operation() @@ -938,7 +950,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testValidateCodeOperationByCodeAndSystemType() throws Exception { - loadAndPersistCodeSystemAndValueSet(HttpVerb.POST); + loadAndPersistCodeSystemAndValueSet(HTTPVerb.POST); Parameters respParam = ourClient .operation() @@ -956,27 +968,51 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { @Test public void testValidateCodeAgainstBuiltInSystem() { - Parameters respParam = ourClient - .operation() - .onType(ValueSet.class) - .named("validate-code") - .withParameter(Parameters.class, "code", new StringType("Y")) - .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/yesnodontknow")) - .andParameter("system", new StringType("http://terminology.hl7.org/CodeSystem/v2-0136")) - .useHttpGet() - .execute(); + // Good code and system, good valueset + { + Parameters respParam = ourClient + .operation() + .onType(ValueSet.class) + .named("validate-code") + .withParameter(Parameters.class, "code", new StringType("male")) + .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/administrative-gender")) + .andParameter("system", new StringType("http://hl7.org/fhir/administrative-gender")) + .useHttpGet() + .execute(); - String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam); - ourLog.info(resp); + String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); - assertEquals("result", respParam.getParameter().get(0).getName()); - assertEquals(true, ((BooleanType) respParam.getParameter().get(0).getValue()).getValue()); + assertEquals("result", respParam.getParameter().get(0).getName()); + assertEquals(true, ((BooleanType) respParam.getParameter().get(0).getValue()).getValue()); - assertEquals("message", respParam.getParameter().get(1).getName()); - assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), containsStringIgnoringCase("succeeded")); + assertEquals("message", respParam.getParameter().get(1).getName()); + assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), containsStringIgnoringCase("succeeded")); - assertEquals("display", respParam.getParameter().get(2).getName()); - assertEquals("Yes", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); + assertEquals("display", respParam.getParameter().get(2).getName()); + assertEquals("Male", ((StringType) respParam.getParameter().get(2).getValue()).getValue()); + } + // Good code and system, but not in specified valueset + { + Parameters respParam = ourClient + .operation() + .onType(ValueSet.class) + .named("validate-code") + .withParameter(Parameters.class, "code", new StringType("male")) + .andParameter("url", new StringType("http://hl7.org/fhir/ValueSet/marital-status")) + .andParameter("system", new StringType("http://hl7.org/fhir/administrative-gender")) + .useHttpGet() + .execute(); + + String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam); + ourLog.info(resp); + + assertEquals("result", respParam.getParameter().get(0).getName()); + assertEquals(false, ((BooleanType) respParam.getParameter().get(0).getValue()).getValue()); + + assertEquals("message", respParam.getParameter().get(1).getName()); + assertThat(((StringType) respParam.getParameter().get(1).getValue()).getValue(), containsStringIgnoringCase("Code not found")); + } } @Test @@ -996,7 +1032,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test { .addInclude() .setSystem("http://mycs") .addFilter() - .setOp(FilterOperator.ISA) + .setOp(Enumerations.FilterOperator.ISA) .setProperty("concept") .setValue("ParentA"); IIdType vsId = myValueSetDao.create(vs).getId().toUnqualifiedVersionless(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderTest.java index 27fb7c2940d..c4e578ef62d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderTest.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.search; import ca.uhn.fhir.jpa.dao.IDao; +import ca.uhn.fhir.jpa.dao.SearchBuilderFactory; import ca.uhn.fhir.jpa.entity.Search; import ca.uhn.fhir.rest.api.server.RequestDetails; import org.junit.Before; @@ -15,13 +16,15 @@ import static org.mockito.Mockito.verifyNoInteractions; public class PersistedJpaBundleProviderTest { private PersistedJpaBundleProvider myPersistedJpaBundleProvider; private IDao myDao; + private SearchBuilderFactory mySearchBuilderFactory; @Before public void init() { RequestDetails request = mock(RequestDetails.class); String searchUuid = "this is not a hat"; myDao = mock(IDao.class); - myPersistedJpaBundleProvider = new PersistedJpaBundleProvider(request, searchUuid, myDao); + mySearchBuilderFactory = mock(SearchBuilderFactory.class); + myPersistedJpaBundleProvider = new PersistedJpaBundleProvider(request, searchUuid, myDao, mySearchBuilderFactory); } @Test @@ -31,5 +34,6 @@ public class PersistedJpaBundleProviderTest { myPersistedJpaBundleProvider.setSearchEntity(searchEntity); myPersistedJpaBundleProvider.doSearchOrEverything(0, 1); verifyNoInteractions(myDao); + verifyNoInteractions(mySearchBuilderFactory); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java index 67e050ebcaa..6fdbfb78500 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java @@ -27,7 +27,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +import org.mockito.MockitoAnnotations; import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.MockitoRule; import org.mockito.stubbing.Answer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,7 +62,7 @@ public class SearchCoordinatorSvcImplTest { private EntityManager myEntityManager; private int myExpectedNumberOfSearchBuildersCreated = 2; @Mock - private ISearchBuilder mySearchBuilder; + private SearchBuilder mySearchBuilder; @Mock private ISearchCacheSvc mySearchCacheSvc; @Mock @@ -73,11 +75,14 @@ public class SearchCoordinatorSvcImplTest { private DaoRegistry myDaoRegistry; @Mock private IInterceptorBroadcaster myInterceptorBroadcaster; + @Mock + private SearchBuilderFactory mySearchBuilderFactory; @After public void after() { System.clearProperty(SearchCoordinatorSvcImpl.UNIT_TEST_CAPTURE_STACK); - verify(myCallingDao, atMost(myExpectedNumberOfSearchBuildersCreated)).newSearchBuilder(); + + verify(mySearchBuilderFactory, atMost(myExpectedNumberOfSearchBuildersCreated)).newSearchBuilder(any(), any(), any()); } @Before @@ -93,11 +98,12 @@ public class SearchCoordinatorSvcImplTest { mySvc.setSearchCacheServicesForUnitTest(mySearchCacheSvc, mySearchResultCacheSvc); mySvc.setDaoRegistryForUnitTest(myDaoRegistry); mySvc.setInterceptorBroadcasterForUnitTest(myInterceptorBroadcaster); + mySvc.setSearchBuilderFactoryForUnitTest(mySearchBuilderFactory); DaoConfig daoConfig = new DaoConfig(); mySvc.setDaoConfigForUnitTest(daoConfig); - when(myCallingDao.newSearchBuilder()).thenReturn(mySearchBuilder); + when(mySearchBuilderFactory.newSearchBuilder(any(), any(), any())).thenReturn(mySearchBuilder); when(myTxManager.getTransaction(any())).thenReturn(mock(TransactionStatus.class)); @@ -156,7 +162,6 @@ public class SearchCoordinatorSvcImplTest { } - // TODO INTERMITTENT this test fails intermittently @Test public void testAsyncSearchLargeResultSetBigCountSameCoordinator() { List allResults = new ArrayList<>(); @@ -178,41 +183,19 @@ public class SearchCoordinatorSvcImplTest { when(mySearchBuilder.createQuery(any(), any(), any())).thenReturn(iter); doAnswer(loadPids()).when(mySearchBuilder).loadResourcesByPid(any(Collection.class), any(Collection.class), any(List.class), anyBoolean(), any()); - when(mySearchResultCacheSvc.fetchResultPids(any(), anyInt(), anyInt())).thenAnswer(t -> { - List returnedValues = iter.getReturnedValues(); - int offset = t.getArgument(1, Integer.class); - int end = t.getArgument(2, Integer.class); - end = Math.min(end, returnedValues.size()); - offset = Math.min(offset, returnedValues.size()); - ourLog.info("findWithSearchUuid {} - {} out of {} values", offset, end, returnedValues.size()); - return returnedValues.subList(offset, end); - }); - - when(mySearchResultCacheSvc.fetchAllResultPids(any())).thenReturn(allResults); - - when(mySearchCacheSvc.tryToMarkSearchAsInProgress(any())).thenAnswer(t->{ - Search search = t.getArgument(0, Search.class); - assertEquals(SearchStatusEnum.PASSCMPLET, search.getStatus()); - search.setStatus(SearchStatusEnum.LOADING); - return Optional.of(search); - }); - - IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null); - assertNotNull(result.getUuid()); - assertEquals(null, result.size()); - - List resources; - when(mySearchCacheSvc.save(any())).thenAnswer(t -> { Search search = t.getArgument(0, Search.class); myCurrentSearch = search; return search; }); - when(mySearchCacheSvc.fetchByUuid(any())).thenAnswer(t -> Optional.ofNullable(myCurrentSearch)); - IFhirResourceDao dao = myCallingDao; - when(myDaoRegistry.getResourceDao(any(String.class))).thenReturn(dao); - resources = result.getResources(0, 100000); + // Do all the stubbing before starting any work, since we want to avoid threading issues + + IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null); + assertNotNull(result.getUuid()); + assertEquals(null, result.size()); + + List resources = result.getResources(0, 100000); assertEquals(790, resources.size()); assertEquals("10", resources.get(0).getIdElement().getValueAsString()); assertEquals("799", resources.get(789).getIdElement().getValueAsString()); @@ -379,7 +362,7 @@ public class SearchCoordinatorSvcImplTest { * Now call from a new bundle provider. This simulates a separate HTTP * client request coming in. */ - provider = new PersistedJpaBundleProvider(null, result.getUuid(), myCallingDao); + provider = new PersistedJpaBundleProvider(null, result.getUuid(), myCallingDao, mySearchBuilderFactory); resources = provider.getResources(10, 20); assertEquals(10, resources.size()); assertEquals("20", resources.get(0).getIdElement().getValueAsString()); @@ -457,13 +440,13 @@ public class SearchCoordinatorSvcImplTest { * Now call from a new bundle provider. This simulates a separate HTTP * client request coming in. */ - provider = new PersistedJpaBundleProvider(null, uuid, myCallingDao); + provider = new PersistedJpaBundleProvider(null, uuid, myCallingDao, mySearchBuilderFactory); resources = provider.getResources(10, 20); assertEquals(10, resources.size()); assertEquals("20", resources.get(0).getIdElement().getValueAsString()); assertEquals("29", resources.get(9).getIdElement().getValueAsString()); - provider = new PersistedJpaBundleProvider(null, uuid, myCallingDao); + provider = new PersistedJpaBundleProvider(null, uuid, myCallingDao, mySearchBuilderFactory); resources = provider.getResources(20, 40); assertEquals(20, resources.size()); assertEquals("30", resources.get(0).getIdElement().getValueAsString()); @@ -600,6 +583,11 @@ public class SearchCoordinatorSvcImplTest { return myWrap.getSkippedCount(); } + @Override + public int getNonSkippedCount() { + return myCount; + } + @Override public void close() { // nothing @@ -609,6 +597,7 @@ public class SearchCoordinatorSvcImplTest { public static class ResultIterator extends BaseIterator implements IResultIterator { private final Iterator myWrap; + private int myCount; ResultIterator(Iterator theWrap) { myWrap = theWrap; @@ -621,6 +610,7 @@ public class SearchCoordinatorSvcImplTest { @Override public ResourcePersistentId next() { + myCount++; return myWrap.next(); } @@ -629,6 +619,11 @@ public class SearchCoordinatorSvcImplTest { return 0; } + @Override + public int getNonSkippedCount() { + return myCount; + } + @Override public void close() { // nothing @@ -695,6 +690,11 @@ public class SearchCoordinatorSvcImplTest { } } + @Override + public int getNonSkippedCount() { + return 0; + } + @Override public void close() { // nothing diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java index 803c47e11e6..6ee336af59c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/searchparam/MatchUrlServiceTest.java @@ -2,12 +2,15 @@ package ca.uhn.fhir.jpa.searchparam; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.jpa.config.TestR4Config; +import ca.uhn.fhir.jpa.config.TestDstu3Config; import ca.uhn.fhir.jpa.dao.BaseJpaTest; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; -import ca.uhn.fhir.model.dstu2.resource.Condition; +import ca.uhn.fhir.jpa.searchparam.util.Dstu3DistanceHelper; +import ca.uhn.fhir.rest.param.QuantityParam; import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.util.TestUtil; +import org.hl7.fhir.dstu3.model.Condition; +import org.hl7.fhir.dstu3.model.Location; import org.junit.AfterClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -16,17 +19,17 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.PlatformTransactionManager; -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = {TestR4Config.class}) +@ContextConfiguration(classes = {TestDstu3Config.class}) public class MatchUrlServiceTest extends BaseJpaTest { - private static FhirContext ourCtx = FhirContext.forDstu2(); + private static FhirContext ourCtx = FhirContext.forDstu3(); @Autowired MatchUrlService myMatchUrlService; @@ -44,13 +47,65 @@ public class MatchUrlServiceTest extends BaseJpaTest { SearchParameterMap match = myMatchUrlService.translateMatchUrl("Condition?patient=304&_lastUpdated=>2011-01-01T11:12:21.0000Z", resourceDef); assertEquals("2011-01-01T11:12:21.0000Z", match.getLastUpdated().getLowerBound().getValueAsString()); assertEquals(ReferenceParam.class, match.get("patient").get(0).get(0).getClass()); - assertEquals("304", ((ReferenceParam)match.get("patient").get(0).get(0)).getIdPart()); + assertEquals("304", ((ReferenceParam) match.get("patient").get(0).get(0)).getIdPart()); + } + + @Test + public void testParseNearDistance() { + double kmDistance = 123.4; + + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=1000.0:2000.0" + + "&" + + Location.SP_NEAR_DISTANCE + "=" + kmDistance + "|http://unitsofmeasure.org|km", ourCtx.getResourceDefinition("Location")); + Dstu3DistanceHelper.setNearDistance(Location.class, map); + + QuantityParam nearDistanceParam = map.getNearDistanceParam(); + assertEquals(1, map.size()); + assertNotNull(nearDistanceParam); + assertEquals(kmDistance, nearDistanceParam.getValue().doubleValue(), 0.0); + } + + @Test + public void testTwoDistancesAnd() { + try { + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR_DISTANCE + "=1|http://unitsofmeasure.org|km" + + "&" + + Location.SP_NEAR_DISTANCE + "=2|http://unitsofmeasure.org|km", + ourCtx.getResourceDefinition("Location")); + Dstu3DistanceHelper.setNearDistance(Location.class, map); + + fail(); + } catch (IllegalArgumentException e) { + assertEquals("Only one " + Location.SP_NEAR_DISTANCE + " parameter may be present", e.getMessage()); + } + } + + @Test + public void testTwoDistancesOr() { + try { + SearchParameterMap map = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR_DISTANCE + "=1|http://unitsofmeasure.org|km" + + "," + + "2|http://unitsofmeasure.org|km", + ourCtx.getResourceDefinition("Location")); + Dstu3DistanceHelper.setNearDistance(Location.class, map); + + fail(); + } catch (IllegalArgumentException e) { + assertEquals("Only one " + Location.SP_NEAR_DISTANCE + " parameter may be present", e.getMessage()); + } } @Override protected FhirContext getContext() { return ourCtx; } + @Override protected PlatformTransactionManager getTxManager() { return null; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java new file mode 100644 index 00000000000..14c443b5217 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestParserTest.java @@ -0,0 +1,73 @@ +package ca.uhn.fhir.jpa.stresstest; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.test.BaseTest; +import ca.uhn.fhir.util.StopWatch; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Bundle; +import org.junit.Ignore; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; + +public class StressTestParserTest extends BaseTest { + + private static final Logger ourLog = LoggerFactory.getLogger(StressTestParserTest.class); + + /** + * On Xolo - 2020-03-14 - 150ms/pass after 199 passes + * @throws IOException + */ + @Test + @Ignore + public void test() throws IOException { + FhirContext ctx = FhirContext.forR4(); + String input = loadResource("/org/hl7/fhir/r4/model/valueset/valuesets.xml"); + + Bundle parsed = ctx.newXmlParser().parseResource(Bundle.class, input); + String json = ctx.newJsonParser().encodeResourceToString(parsed); + + StopWatch sw = null; + int loops = 200; + +// for (int i = 0; i < loops; i++) { +// ctx.newXmlParser().parseResource(input); +// if (i < 50) { +// ourLog.info("Parsed XML {} times", i); +// continue; +// } else if (i == 50) { +// sw = new StopWatch(); +// continue; +// } +// ourLog.info("Parsed XML {} times - {}ms/pass", i, sw.getMillisPerOperation(i - 50)); +// } + +// for (int i = 0; i < loops; i++) { +// Bundle parsed = (Bundle) ctx.newJsonParser().parseResource(json); +// if (i < 50) { +// ourLog.info("Parsed JSON with {} entries {} times", parsed.getEntry().size(), i); +// continue; +// } else if (i == 50) { +// sw = new StopWatch(); +// continue; +// } +// ourLog.info("Parsed JSON {} times - {}ms/pass", i, sw.getMillisPerOperation(i - 50)); +// } + + for (int i = 0; i < loops; i++) { + ctx.newJsonParser().encodeResourceToString(parsed); + if (i < 50) { + ourLog.info("Serialized JSON with {} entries {} times", parsed.getEntry().size(), i); + continue; + } else if (i == 50) { + sw = new StopWatch(); + continue; + } + ourLog.info("Parsed JSON {} times - {}ms/pass", i, sw.getMillisPerOperation(i - 50)); + } + + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestR4Test.java index 6fd135eddc8..a75b9aea9af 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/stresstest/StressTestR4Test.java @@ -7,14 +7,10 @@ import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.search.ISearchCoordinatorSvc; import ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.test.utilities.UnregisterScheduledProcessor; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.TokenOrListParam; -import ca.uhn.fhir.rest.server.IPagingProvider; import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; import ca.uhn.fhir.util.StopWatch; @@ -28,11 +24,10 @@ import org.apache.http.client.methods.HttpGet; import org.hamcrest.Matchers; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.Bundle.BundleType; import org.hl7.fhir.r4.model.Bundle.HTTPVerb; -import org.hl7.fhir.r4.model.codesystems.HttpVerb; import org.junit.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; @@ -57,6 +52,7 @@ import static org.junit.Assert.fail; "max_db_connections=10" }) @DirtiesContext +@Ignore public class StressTestR4Test extends BaseResourceProviderR4Test { static { @@ -91,7 +87,7 @@ public class StressTestR4Test extends BaseResourceProviderR4Test { super.before(); myRequestValidatingInterceptor = new RequestValidatingInterceptor(); - FhirInstanceValidator module = new FhirInstanceValidator(); + FhirInstanceValidator module = new FhirInstanceValidator(myFhirCtx); module.setValidationSupport(myValidationSupport); myRequestValidatingInterceptor.addValidatorModule(module); @@ -591,8 +587,8 @@ public class StressTestR4Test extends BaseResourceProviderR4Test { get.addHeader(Constants.HEADER_CONTENT_TYPE, Constants.CT_FHIR_JSON_NEW); getResp = ourHttpClient.execute(get); try { - assertEquals(200, getResp.getStatusLine().getStatusCode()); String respBundleString = IOUtils.toString(getResp.getEntity().getContent(), Charsets.UTF_8); + assertEquals(respBundleString, 200, getResp.getStatusLine().getStatusCode()); respBundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, respBundleString); myTaskCount++; } finally { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR4Test.java index 9ad6d5a1578..cbb53ea3afc 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR4Test.java @@ -193,8 +193,8 @@ public abstract class BaseSubscriptionsR4Test extends BaseResourceProviderR4Test @Update public MethodOutcome update(@ResourceParam Observation theObservation, HttpServletRequest theRequest) { ourLog.info("Received Listener Update"); - ourUpdatedObservations.add(theObservation); ourContentTypes.add(theRequest.getHeader(Constants.HEADER_CONTENT_TYPE).replaceAll(";.*", "")); + ourUpdatedObservations.add(theObservation); extractHeaders(theRequest); return new MethodOutcome(new IdType("Observation/1"), false); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java index 97f9814635b..add5808d885 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionsR5Test.java @@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.subscription; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.provider.r5.BaseResourceProviderR5Test; +import ca.uhn.fhir.jpa.subscription.module.CanonicalSubscriptionChannelType; import ca.uhn.fhir.jpa.subscription.module.LinkedBlockingQueueSubscribableChannel; import ca.uhn.fhir.rest.annotation.Create; import ca.uhn.fhir.rest.annotation.ResourceParam; @@ -21,9 +22,19 @@ import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.model.codesystems.SubscriptionChannelType; -import org.junit.*; +import org.hl7.fhir.r5.model.Bundle; +import org.hl7.fhir.r5.model.CodeableConcept; +import org.hl7.fhir.r5.model.Coding; +import org.hl7.fhir.r5.model.Enumerations; +import org.hl7.fhir.r5.model.IdType; +import org.hl7.fhir.r5.model.Observation; +import org.hl7.fhir.r5.model.Subscription; +import org.hl7.fhir.r5.model.Topic; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.PostConstruct; @@ -131,8 +142,8 @@ public abstract class BaseSubscriptionsR5Test extends BaseResourceProviderR5Test Subscription.SubscriptionChannelComponent channel = subscription.getChannel(); channel.getType().addCoding() - .setSystem(SubscriptionChannelType.RESTHOOK.getSystem()) - .setCode(SubscriptionChannelType.RESTHOOK.toCode()); + .setSystem(CanonicalSubscriptionChannelType.RESTHOOK.getSystem()) + .setCode(CanonicalSubscriptionChannelType.RESTHOOK.toCode()); channel.getPayload().setContentType(thePayload); channel.setEndpoint(ourListenerServerBase); return subscription; @@ -158,7 +169,7 @@ public abstract class BaseSubscriptionsR5Test extends BaseResourceProviderR5Test coding.setCode(code); coding.setSystem(system); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); IIdType id = myObservationDao.create(observation).getId(); observation.setId(id); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirClientSubscriptionProviderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirClientSubscriptionProviderTest.java index 5d23b900dc1..59bfd9b6c99 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirClientSubscriptionProviderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/FhirClientSubscriptionProviderTest.java @@ -56,6 +56,7 @@ public class FhirClientSubscriptionProviderTest extends BaseSubscriptionsR4Test waitForSize(0, ourCreatedObservations); waitForSize(1, ourUpdatedObservations); + waitForSize(1, ourContentTypes); assertEquals(Constants.CT_FHIR_JSON_NEW, ourContentTypes.get(0)); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java index b5b014aace8..ee88580d9d6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR4Test.java @@ -3,11 +3,13 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.config.TestR4Config; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; +import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult; import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher; import ca.uhn.fhir.jpa.subscription.module.CanonicalSubscription; import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage; +import ca.uhn.fhir.jpa.util.CoordCalculatorTest; import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import ca.uhn.fhir.rest.param.*; import org.apache.commons.lang3.StringUtils; @@ -40,7 +42,9 @@ public class InMemorySubscriptionMatcherR4Test { @Autowired SubscriptionStrategyEvaluator mySubscriptionStrategyEvaluator; @Autowired - FhirContext myContext; + FhirContext myFhirContext; + @Autowired + MatchUrlService myMatchUrlService; private void assertMatched(Resource resource, SearchParameterMap params) { InMemoryMatchResult result = match(resource, params); @@ -61,7 +65,7 @@ public class InMemorySubscriptionMatcherR4Test { } private String getCriteria(Resource theResource, SearchParameterMap theParams) { - return theResource.getResourceType().name() + theParams.toNormalizedQueryString(myContext); + return theResource.getResourceType().name() + theParams.toNormalizedQueryString(myFhirContext); } private InMemoryMatchResult match(String criteria, Resource theResource) { @@ -203,6 +207,22 @@ public class InMemorySubscriptionMatcherR4Test { assertUnsupported(patient, params); } + @Test + public void testLocationPositionNotSupported() { + Location loc = new Location(); + double latitude = CoordCalculatorTest.LATITUDE_UHN; + double longitude = CoordCalculatorTest.LONGITUDE_UHN; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + double bigEnoughDistance = CoordCalculatorTest.DISTANCE_KM_CHIN_TO_UHN * 2; + SearchParameterMap params = myMatchUrlService.translateMatchUrl( + "Location?" + + Location.SP_NEAR + "=" + CoordCalculatorTest.LATITUDE_CHIN + "|" + + CoordCalculatorTest.LONGITUDE_CHIN + "|" + + bigEnoughDistance, myFhirContext.getResourceDefinition("Location")); + assertUnsupported(loc, params); + } + @Test public void testSearchLastUpdatedParamUnsupported() { String methodName = "testSearchLastUpdatedParam"; @@ -394,11 +414,11 @@ public class InMemorySubscriptionMatcherR4Test { params = new SearchParameterMap(); params.add(Patient.SP_FAMILY, new StringParam("testSearchNameParam01Fam")); try { - String criteria = params.toNormalizedQueryString(myContext); + String criteria = params.toNormalizedQueryString(myFhirContext); CanonicalSubscription subscription = new CanonicalSubscription(); subscription.setCriteriaString(criteria); subscription.setIdElement(new IdType("Subscription", 123L)); - ResourceModifiedMessage msg = new ResourceModifiedMessage(myContext, patient, ResourceModifiedMessage.OperationTypeEnum.CREATE); + ResourceModifiedMessage msg = new ResourceModifiedMessage(myFhirContext, patient, ResourceModifiedMessage.OperationTypeEnum.CREATE); msg.setSubscriptionId("123"); msg.setId(new IdType("Patient/ABC")); InMemoryMatchResult result = myInMemorySubscriptionMatcher.match(subscription, msg); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR4Test.java index 7682c780025..ea6d27e249d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR4Test.java @@ -21,9 +21,16 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import static org.awaitility.Awaitility.await; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.matchesPattern; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Test the rest-hook subscriptions @@ -869,7 +876,7 @@ public class RestHookTestR4Test extends BaseSubscriptionsR4Test { String criteriaGood = "Patient?gender=male"; Subscription subscription = newSubscription(criteriaGood, payload); ourClient.create().resource(subscription).execute(); - assertEquals(1, subscriptionCount()); + await().until(() -> subscriptionCount() == 1); } /** @@ -889,7 +896,7 @@ public class RestHookTestR4Test extends BaseSubscriptionsR4Test { assertEquals(Subscription.SubscriptionStatus.REQUESTED, subscription.getStatus()); } finally { - existingSupportedSubscriptionTypes.forEach(t-> myDaoConfig.addSupportedSubscriptionType(t)); + existingSupportedSubscriptionTypes.forEach(t -> myDaoConfig.addSupportedSubscriptionType(t)); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java index 6160165c167..8e6d2ac20d7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java @@ -131,7 +131,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { Observation observation = new Observation(); observation.getIdentifierFirstRep().setSystem("foo").setValue("1"); observation.getCode().addCoding().setCode(code).setSystem("SNOMED-CT"); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); observation.getSubject().setReference(patient.getId()); bundle.addEntry().setResource(observation).getRequest().setMethod(Bundle.HTTPVerb.POST).setUrl("Observation"); @@ -160,7 +160,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { Observation observation = new Observation(); observation.getIdentifierFirstRep().setSystem("foo").setValue("1"); observation.getCode().addCoding().setCode(code).setSystem("SNOMED-CT"); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); Bundle bundle = new Bundle(); bundle.setType(Bundle.BundleType.TRANSACTION); bundle.addEntry().setResource(observation).getRequest().setMethod(Bundle.HTTPVerb.POST).setUrl("Observation"); @@ -187,7 +187,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { observation.setId(obs.getId()); observation.getIdentifierFirstRep().setSystem("foo").setValue("2"); observation.getCode().addCoding().setCode(code).setSystem("SNOMED-CT"); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); bundle = new Bundle(); bundle.setType(Bundle.BundleType.TRANSACTION); bundle.addEntry().setResource(observation).getRequest().setMethod(Bundle.HTTPVerb.PUT).setUrl(obs.getIdElement().toUnqualifiedVersionless().getValue()); @@ -220,7 +220,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { Observation observation = new Observation(); observation.getIdentifierFirstRep().setSystem("foo").setValue("ID" + i); observation.getCode().addCoding().setCode(code).setSystem("SNOMED-CT"); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); myObservationDao.create(observation); } @@ -594,6 +594,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { // Should see 1 subscription notification waitForSize(0, ourCreatedObservations); waitForSize(1, ourUpdatedObservations); + waitForSize(1, ourContentTypes); assertEquals(Constants.CT_FHIR_XML_NEW, ourContentTypes.get(0)); Subscription subscriptionTemp = ourClient.read(Subscription.class, subscription2.getId()); @@ -669,7 +670,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { CodeableConcept codeableConcept = new CodeableConcept() .addCoding(new Coding().setCode(code).setSystem("SNOMED-CT")); observation.setCode(codeableConcept); - observation.setStatus(Observation.ObservationStatus.FINAL); + observation.setStatus(Enumerations.ObservationStatus.FINAL); Patient patient = new Patient(); patient.addIdentifier().setSystem("foo").setValue("bar2"); @@ -848,7 +849,7 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test { @Test(expected = UnprocessableEntityException.class) public void testInvalidProvenanceParam() { String payload = "application/fhir+json"; - String criteriabad = "Provenance?activity=http://hl7.org/fhir/v3/DocumentCompletion%7CAU"; + String criteriabad = "Provenance?foo=http://hl7.org/fhir/v3/DocumentCompletion%7CAU"; Subscription subscription = newSubscription(criteriabad, payload); ourClient.create().resource(subscription).execute(); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java index 20b7cc1f52b..8ce8bb95fc7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java @@ -17,7 +17,6 @@ import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.test.utilities.UnregisterScheduledProcessor; import com.google.common.collect.Lists; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -39,14 +38,14 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.TestPropertySource; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; +import static org.awaitility.Awaitility.await; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -56,10 +55,6 @@ import static org.junit.Assert.fail; * Test the rest-hook subscriptions */ @SuppressWarnings("Duplicates") -@TestPropertySource(properties = { - UnregisterScheduledProcessor.SCHEDULING_DISABLED + "=false" -}) -@DirtiesContext public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SubscriptionTriggeringDstu3Test.class); @@ -194,6 +189,9 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); waitForQueueToDrain(); + + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(0, ourCreatedObservations); waitForSize(2, ourUpdatedObservations); @@ -248,6 +246,13 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te responseValue = response.getParameter().get(0).getValue().primitiveValue(); assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(33, ourUpdatedObservations); + + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); waitForSize(51, ourUpdatedObservations); waitForSize(0, ourCreatedObservations); waitForSize(0, ourCreatedPatients); @@ -257,8 +262,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te @Test public void testTriggerUsingOrSeparatedList_MultipleStrings() throws Exception { - myDaoConfig.setSearchPreFetchThresholds(Lists.newArrayList(13, 22, 100)); - String payload = "application/fhir+json"; IdType sub2id = createSubscription("Patient?", payload, ourListenerServerBase).getIdElement(); @@ -284,8 +287,18 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te String responseValue = response.getParameter().get(0).getValue().primitiveValue(); assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); - waitForSize(0, ourCreatedPatients); - waitForSize(3, ourUpdatedPatients); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + assertEquals(0, mySubscriptionTriggeringSvc.getActiveJobCount()); + + assertEquals(0, ourCreatedPatients.size()); + await().until(() -> ourUpdatedPatients.size() == 3); } @@ -316,6 +329,8 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te String responseValue = response.getParameter().get(0).getValue().primitiveValue(); assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(0, ourCreatedPatients); waitForSize(3, ourUpdatedPatients); @@ -367,6 +382,9 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te responseValue = response.getParameter().get(0).getValue().primitiveValue(); assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); + mySubscriptionTriggeringSvc.runDeliveryPass(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(10, ourUpdatedObservations); waitForSize(0, ourCreatedObservations); waitForSize(0, ourCreatedPatients); @@ -421,6 +439,8 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te String responseValue = response.getParameter().get(0).getValue().primitiveValue(); assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(20, ourUpdatedObservations); waitForSize(0, ourCreatedObservations); waitForSize(0, ourCreatedPatients); @@ -458,6 +478,8 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te assertThat(responseValue, containsString("Subscription triggering job submitted as JOB ID")); waitForQueueToDrain(); + mySubscriptionTriggeringSvc.runDeliveryPass(); + waitForSize(0, ourCreatedObservations); waitForSize(1, ourUpdatedObservations); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/websocket/WebsocketWithSubscriptionIdR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/websocket/WebsocketWithSubscriptionIdR4Test.java index 57e360909b4..dbc14355c57 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/websocket/WebsocketWithSubscriptionIdR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/websocket/WebsocketWithSubscriptionIdR4Test.java @@ -9,7 +9,12 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.client.ClientUpgradeRequest; import org.eclipse.jetty.websocket.client.WebSocketClient; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.Subscription; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -20,6 +25,7 @@ import java.net.URI; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; +import static org.awaitility.Awaitility.await; import static org.hamcrest.Matchers.contains; import static org.junit.Assert.assertThat; @@ -112,10 +118,12 @@ public class WebsocketWithSubscriptionIdR4Test extends BaseResourceProviderR4Tes Session session = connection.get(2, TimeUnit.SECONDS); ourLog.info("Connected to WS: {}", session.isOpen()); + + await().until(() -> mySubscriptionRegistry.size() == 1); } @Test - public void createObservation() throws Exception { + public void createObservation() { Observation observation = new Observation(); CodeableConcept codeableConcept = new CodeableConcept(); observation.setCode(codeableConcept); @@ -139,7 +147,7 @@ public class WebsocketWithSubscriptionIdR4Test extends BaseResourceProviderR4Tes } @Test - public void createObservationThatDoesNotMatch() throws Exception { + public void createObservationThatDoesNotMatch() { Observation observation = new Observation(); CodeableConcept codeableConcept = new CodeableConcept(); observation.setCode(codeableConcept); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcIntegrationDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcIntegrationDstu3Test.java index cb5a2b9d82b..8cd82e0b6d2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcIntegrationDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcIntegrationDstu3Test.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.jpa.term; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet; import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; @@ -158,7 +158,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test { TerminologyLoaderSvcLoincTest.addLoincMandatoryFilesToZip(files); myLoader.loadLoinc(files.getFiles(), mySrd); - IContextValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); + IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); Parameters parameters = (Parameters) result.toParameters(myFhirCtx, null); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters)); @@ -188,7 +188,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test { TerminologyLoaderSvcLoincTest.addLoincMandatoryFilesToZip(files); myLoader.loadLoinc(files.getFiles(), mySrd); - IContextValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("17788-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); + IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("17788-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); Parameters parameters = (Parameters) result.toParameters(myFhirCtx, null); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters)); @@ -206,7 +206,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test { TerminologyLoaderSvcLoincTest.addLoincMandatoryFilesToZip(files); myLoader.loadLoinc(files.getFiles(), mySrd); - IContextValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); + IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); List> properties = Lists.newArrayList(new CodeType("SCALE_TYP")); Parameters parameters = (Parameters) result.toParameters(myFhirCtx, properties); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcDeltaR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcDeltaR4Test.java index 904d25197b8..9c79ca29c79 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcDeltaR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcDeltaR4Test.java @@ -1,38 +1,53 @@ package ca.uhn.fhir.jpa.term; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test; -import ca.uhn.fhir.jpa.entity.TermCodeSystem; -import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; import ca.uhn.fhir.jpa.term.custom.CustomTerminologySet; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.param.UriParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.TestUtil; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.ValueSet; +import org.junit.After; import org.junit.AfterClass; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.test.context.TestPropertySource; +import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import static org.apache.commons.lang3.StringUtils.countMatches; +import static org.apache.commons.lang3.StringUtils.leftPad; import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.empty; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.matchesPattern; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { private static final Logger ourLog = LoggerFactory.getLogger(TerminologySvcDeltaR4Test.class); + @After + public void after() { + myDaoConfig.setDeferIndexingForCodesystemsOfSize(new DaoConfig().getDeferIndexingForCodesystemsOfSize()); + } + @Test public void testAddRootConcepts() { @@ -46,8 +61,8 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { delta.addRootConcept("RootB", "Root B"); myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); assertHierarchyContains( - "RootA seq=1", - "RootB seq=2" + "RootA seq=0", + "RootB seq=0" ); delta = new CustomTerminologySet(); @@ -55,10 +70,10 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { delta.addRootConcept("RootD", "Root D"); myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); assertHierarchyContains( - "RootA seq=1", - "RootB seq=2", - "RootC seq=3", - "RootD seq=4" + "RootA seq=0", + "RootB seq=0", + "RootC seq=0", + "RootD seq=0" ); } @@ -102,8 +117,8 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { delta.addRootConcept("RootB", "Root B"); myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); assertHierarchyContains( - "RootA seq=1", - "RootB seq=2" + "RootA seq=0", + "RootB seq=0" ); ourLog.info("Have performed add"); @@ -113,16 +128,23 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { ourLog.info("All concepts: {}", myTermConceptDao.findAll()); }); + myCaptureQueriesListener.clear(); + delta = new CustomTerminologySet(); - delta.addUnanchoredChildConcept("RootA", "ChildAA", "Child AA"); - delta.addUnanchoredChildConcept("RootA", "ChildAB", "Child AB"); + TermConcept root = delta.addRootConcept("RootA", "Root A"); + root.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA"); + root.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAB").setDisplay("Child AB"); myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); + + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + assertHierarchyContains( - "RootA seq=1", - " ChildAA seq=1", - " ChildAB seq=2", - "RootB seq=2" + "RootA seq=0", + " ChildAA seq=0", + " ChildAB seq=1", + "RootB seq=0" ); + } @Test @@ -135,25 +157,103 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { delta = new CustomTerminologySet(); delta.addRootConcept("RootA", "Root A") - .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA"); + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAAA").setDisplay("Child AAA"); delta.addRootConcept("RootB", "Root B"); outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); assertHierarchyContains( - "RootA seq=1", - " ChildAA seq=1", - "RootB seq=2" + "RootA seq=0", + " ChildAA seq=0", + " ChildAAA seq=0", + "RootB seq=0" ); - assertEquals(3, outcome.getUpdatedConceptCount()); + assertEquals(4, outcome.getUpdatedConceptCount()); delta = new CustomTerminologySet(); - delta.addUnanchoredChildConcept("RootB", "ChildAA", "Child AA"); + delta.addRootConcept("RootB", "Root B") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA"); outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); - assertEquals(1, outcome.getUpdatedConceptCount()); assertHierarchyContains( - "RootA seq=1", - "RootB seq=2", - " ChildAA seq=1" + "RootA seq=0", + " ChildAA seq=0", + " ChildAAA seq=0", + "RootB seq=0", + " ChildAA seq=0", + " ChildAAA seq=0" ); + assertEquals(2, outcome.getUpdatedConceptCount()); + + runInTransaction(() -> { + TermConcept concept = myTermSvc.findCode("http://foo/cs", "ChildAA").orElseThrow(() -> new IllegalStateException()); + assertEquals(2, concept.getParents().size()); + assertThat(concept.getParentPidsAsString(), matchesPattern("^[0-9]+ [0-9]+$")); + }); + + } + + @Test + public void testReAddingConceptsDoesntRecreateExistingLinks() { + createNotPresentCodeSystem(); + assertHierarchyContains(); + + UploadStatistics outcome; + CustomTerminologySet delta; + + myCaptureQueriesListener.clear(); + + delta = new CustomTerminologySet(); + delta.addRootConcept("RootA", "Root A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); + assertHierarchyContains( + "RootA seq=0", + " ChildAA seq=0" + ); + + myCaptureQueriesListener.logDeleteQueries(); + assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); + myCaptureQueriesListener.logInsertQueries(); + // 2 concepts, 1 link + assertEquals(3, myCaptureQueriesListener.countInsertQueries()); + myCaptureQueriesListener.clear(); + + delta = new CustomTerminologySet(); + delta.addRootConcept("RootA", "Root A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAAA").setDisplay("Child AAA"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); + assertHierarchyContains( + "RootA seq=0", + " ChildAA seq=0", + " ChildAAA seq=0" + ); + + myCaptureQueriesListener.logDeleteQueries(); + assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); + myCaptureQueriesListener.logInsertQueries(); + // 1 concept, 1 link + assertEquals(2, myCaptureQueriesListener.countInsertQueries()); + myCaptureQueriesListener.clear(); + + delta = new CustomTerminologySet(); + delta.addRootConcept("RootA", "Root A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAAA").setDisplay("Child AAA") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAAAA").setDisplay("Child AAAA"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); + assertHierarchyContains( + "RootA seq=0", + " ChildAA seq=0", + " ChildAAA seq=0", + " ChildAAAA seq=0" + ); + + myCaptureQueriesListener.logDeleteQueries(); + assertEquals(0, myCaptureQueriesListener.countDeleteQueries()); + myCaptureQueriesListener.logInsertQueries(); + // 1 concept, 1 link + assertEquals(2, myCaptureQueriesListener.countInsertQueries()); + myCaptureQueriesListener.clear(); } @@ -166,11 +266,6 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { cs.setContent(CodeSystem.CodeSystemContentMode.COMPLETE); myCodeSystemDao.create(cs); - CodeSystem delta = new CodeSystem(); - delta - .addConcept() - .setCode("codeA") - .setDisplay("displayA"); try { myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", new CustomTerminologySet()); fail(); @@ -180,6 +275,82 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { } + @Test + public void testAddChildToExistingChild() { + CustomTerminologySet set; + + // Create not-present + CodeSystem cs = new CodeSystem(); + cs.setUrl("http://foo"); + cs.setContent(CodeSystem.CodeSystemContentMode.NOTPRESENT); + myCodeSystemDao.create(cs); + + // Add parent with 1 child + set = new CustomTerminologySet(); + set.addRootConcept("ParentA", "Parent A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildA").setDisplay("Child A"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", set); + + // Check so far + assertHierarchyContains( + "ParentA seq=0", + " ChildA seq=0" + ); + + // Add sub-child to existing child + ourLog.info("*** Adding child to existing child"); + set = new CustomTerminologySet(); + set.addRootConcept("ChildA", "Child A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay("Child AA"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", set); + + // Check so far + assertHierarchyContains( + "ParentA seq=0", + " ChildA seq=0", + " ChildAA seq=0" + ); + + } + + @Test + public void testAddChildWithVeryLongDescription() { + CustomTerminologySet set; + + // Create not-present + CodeSystem cs = new CodeSystem(); + cs.setUrl("http://foo"); + cs.setContent(CodeSystem.CodeSystemContentMode.NOTPRESENT); + myCodeSystemDao.create(cs); + + // Add parent with 1 child + set = new CustomTerminologySet(); + set.addRootConcept("ParentA", "Parent A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildA").setDisplay("Child A"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", set); + + // Check so far + assertHierarchyContains( + "ParentA seq=0", + " ChildA seq=0" + ); + + // Add sub-child to existing child + ourLog.info("*** Adding child to existing child"); + set = new CustomTerminologySet(); + set.addRootConcept("ChildA", "Child A") + .addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("ChildAA").setDisplay(leftPad("", 10000, 'Z')); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", set); + + // Check so far + assertHierarchyContains( + "ParentA seq=0", + " ChildA seq=0", + " ChildAA seq=0" + ); + + } + @Test public void testAddWithoutPreExistingCodeSystem() { @@ -198,11 +369,54 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { assertEquals("http://foo", outcome.getUrl()); assertEquals(CodeSystem.CodeSystemContentMode.NOTPRESENT, outcome.getContent()); - IContextValidationSupport.LookupCodeResult lookup = myTermSvc.lookupCode(myFhirCtx, "http://foo", "CBC"); + IValidationSupport.LookupCodeResult lookup = myTermSvc.lookupCode(myValidationSupport, "http://foo", "CBC"); assertEquals("Complete Blood Count", lookup.getCodeDisplay()); } + @Test + public void testAddLargeHierarchy() { + myDaoConfig.setDeferIndexingForCodesystemsOfSize(5); + + createNotPresentCodeSystem(); + ValueSet vs; + vs = expandNotPresentCodeSystem(); + assertEquals(0, vs.getExpansion().getContains().size()); + + CustomTerminologySet delta = new CustomTerminologySet(); + + // Create a nice deep hierarchy + TermConcept concept = delta.addRootConcept("Root", "Root"); + int nestedDepth = 10; + for (int i = 0; i < nestedDepth; i++) { + String name = concept.getCode(); + concept = concept.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode(name + "0").setDisplay(name + "0"); + } + + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); + + assertFalse(myTermDeferredStorageSvc.isStorageQueueEmpty()); + while (!myTermDeferredStorageSvc.isStorageQueueEmpty()) { + myTermDeferredStorageSvc.saveDeferred(); + } + + List expectedHierarchy = new ArrayList<>(); + for (int i = 0; i < nestedDepth + 1; i++) { + String expected = leftPad("", i, " ") + + "Root" + + leftPad("", i, "0") + + " seq=0"; + expectedHierarchy.add(expected); + } + + assertHierarchyContains(expectedHierarchy.toArray(new String[0])); + + } + + @Autowired + private ITermDeferredStorageSvc myTermDeferredStorageSvc; + + @Test public void testAddModifiesExistingCodesInPlace() { @@ -213,7 +427,7 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { UploadStatistics outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", delta); assertEquals(2, outcome.getUpdatedConceptCount()); - assertEquals("CODEA0", myTermSvc.lookupCode(myFhirCtx, "http://foo", "codea").getCodeDisplay()); + assertEquals("CODEA0", myTermSvc.lookupCode(myValidationSupport, "http://foo", "codea").getCodeDisplay()); // Add codes again with different display delta = new CustomTerminologySet(); @@ -221,79 +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(myFhirCtx, "http://foo", "codea").getCodeDisplay()); + assertEquals("CODEA1", myTermSvc.lookupCode(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(myFhirCtx, "http://foo", "codea").getCodeDisplay()); - } - - @Test - public void testAddUnanchoredWithUnknownParent() { - createNotPresentCodeSystem(); - - // Add root code - CustomTerminologySet delta = new CustomTerminologySet(); - delta.addRootConcept("CodeA", "Code A"); - UploadStatistics outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", delta); - assertEquals(1, outcome.getUpdatedConceptCount()); - - // Try to add child to nonexistent root code - delta = new CustomTerminologySet(); - delta.addUnanchoredChildConcept("CodeB", "CodeBB", "Code BB"); - try { - myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); - fail(); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Unable to add code \"CodeBB\" to unknown parent: CodeB")); - } - } - - @Test - public void testAddRelocateHierarchy() { - createNotPresentCodeSystem(); - - // Add code hierarchy - CustomTerminologySet delta = new CustomTerminologySet(); - TermConcept codeA = delta.addRootConcept("CodeA", "Code A"); - TermConcept codeAA = codeA.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeAA").setDisplay("Code AA"); - codeAA.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeAAA").setDisplay("Code AAA"); - codeAA.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeAAB").setDisplay("Code AAB"); - TermConcept codeB = delta.addRootConcept("CodeB", "Code B"); - TermConcept codeBA = codeB.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeBA").setDisplay("Code BA"); - codeBA.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeBAA").setDisplay("Code BAA"); - codeBA.addChild(TermConceptParentChildLink.RelationshipTypeEnum.ISA).setCode("CodeBAB").setDisplay("Code BAB"); - UploadStatistics outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); - assertEquals(8, outcome.getUpdatedConceptCount()); - assertHierarchyContains( - "CodeA seq=1", - " CodeAA seq=1", - " CodeAAA seq=1", - " CodeAAB seq=2", - "CodeB seq=2", - " CodeBA seq=1", - " CodeBAA seq=1", - " CodeBAB seq=2" - ); - - // Move a single child code to a new spot and make sure the hierarchy comes along - // for the ride.. - delta = new CustomTerminologySet(); - delta.addUnanchoredChildConcept("CodeB", "CodeAA", "Code AA"); - outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo/cs", delta); - assertEquals(3, outcome.getUpdatedConceptCount()); - assertHierarchyContains( - "CodeA seq=1", - "CodeB seq=2", - " CodeBA seq=1", - " CodeBAA seq=1", - " CodeBAB seq=2", - " CodeAA seq=2", // <-- CodeAA got added here so it comes second - " CodeAAA seq=1", - " CodeAAB seq=2" - ); - + assertEquals("CODEA1", myTermSvc.lookupCode(myValidationSupport, "http://foo", "codea").getCodeDisplay()); } @Test @@ -330,7 +477,7 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { .setCode("useless_sct_code") .setValue(new Coding("http://snomed.info", "1234567", "Choked on large meal (finding)")); - IContextValidationSupport.LookupCodeResult result = myTermSvc.lookupCode(myFhirCtx, "http://foo/cs", "lunch"); + IValidationSupport.LookupCodeResult result = myTermSvc.lookupCode(myValidationSupport, "http://foo/cs", "lunch"); assertEquals(true, result.isFound()); assertEquals("lunch", result.getSearchedForCode()); assertEquals("http://foo/cs", result.getSearchedForSystem()); @@ -405,9 +552,15 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { assertEquals(true, runInTransaction(() -> myTermSvc.findCode("http://foo/cs", "codeAAA").isPresent())); // Remove CodeA - delta = new CustomTerminologySet(); - delta.addRootConcept("codeA"); - myTermCodeSystemStorageSvc.applyDeltaCodeSystemsRemove("http://foo/cs", delta); + myCaptureQueriesListener.clear(); + runInTransaction(()->{ + CustomTerminologySet delta2 = new CustomTerminologySet(); + delta2.addRootConcept("codeA"); + myTermCodeSystemStorageSvc.applyDeltaCodeSystemsRemove("http://foo/cs", delta2); + }); + myCaptureQueriesListener.logAllQueriesForCurrentThread(); + + ourLog.info("*** Done removing"); assertEquals(false, runInTransaction(() -> myTermSvc.findCode("http://foo/cs", "codeB").isPresent())); assertEquals(false, runInTransaction(() -> myTermSvc.findCode("http://foo/cs", "codeA").isPresent())); @@ -431,8 +584,6 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test { } - - private ValueSet expandNotPresentCodeSystem() { ValueSet vs = new ValueSet(); vs.setUrl("http://foo/vs"); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplDstu3Test.java index 3f2e784734a..e1adbfb5649 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplDstu3Test.java @@ -1,5 +1,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.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; import ca.uhn.fhir.jpa.entity.TermCodeSystem; @@ -12,14 +14,18 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.util.VersionIndependentConcept; import com.google.common.collect.Lists; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.ValueSet; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,8 +40,14 @@ import java.util.Set; import java.util.stream.Collectors; import static ca.uhn.fhir.jpa.term.api.ITermLoaderSvc.LOINC_URI; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { private static final Logger ourLog = LoggerFactory.getLogger(TerminologySvcImplDstu3Test.class); @@ -100,6 +112,8 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { myTermCodeSystemStorageSvc.storeNewCodeSystemVersion(new ResourcePersistentId(table.getId()), CS_URL, "SYSTEM NAME", "SYSTEM VERSION", cs, table); + myTerminologyDeferredStorageSvc.saveAllDeferred(); + return id; } @@ -245,7 +259,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem(CS_URL); include.addConcept().setCode("childAAB"); - ValueSet outcome = myTermSvc.expandValueSetInMemory(vs, null); + ValueSet outcome = myTermSvc.expandValueSet(null, vs); List codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("childAAB")); @@ -279,7 +293,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("propA") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("valueAAA"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("childAAA")); @@ -292,7 +306,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("propB") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("foo"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("childAAA", "childAAB")); @@ -305,7 +319,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("propA") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("valueAAA"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, empty()); } @@ -332,7 +346,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("3rdParty"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4")); @@ -349,7 +363,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("3rdparty"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4")); } @@ -376,7 +390,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("LOINC"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("47239-9")); @@ -393,7 +407,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("loinc"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("47239-9")); } @@ -416,7 +430,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("3rdParty"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("47239-9")); @@ -429,7 +443,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("3rdparty"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("47239-9")); } @@ -452,7 +466,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("LOINC"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4")); @@ -465,7 +479,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("copyright") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("loinc"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4")); } @@ -489,7 +503,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle op=ISA on property copyright"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -512,7 +526,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Invalid filter, property copyright is LOINC-specific and cannot be used with system: http://example.com/my_code_system"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -534,7 +548,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle value=bogus on property copyright"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -559,7 +573,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -576,7 +590,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); @@ -593,7 +607,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); @@ -610,7 +624,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); } @@ -637,7 +651,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); } @@ -660,7 +674,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); @@ -673,7 +687,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); @@ -686,7 +700,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); // Include @@ -698,7 +712,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); } @@ -720,7 +734,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("ancestor") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); } @@ -744,7 +758,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle op=ISA on property ancestor"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -767,7 +781,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Invalid filter, property ancestor is LOINC-specific and cannot be used with system: http://example.com/my_code_system"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -792,7 +806,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); @@ -809,7 +823,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); @@ -826,7 +840,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-4", "47239-9")); @@ -843,7 +857,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-4", "47239-9")); } @@ -870,7 +884,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); } @@ -893,7 +907,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); // Include @@ -905,7 +919,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -918,7 +932,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3")); @@ -931,7 +945,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3")); } @@ -954,7 +968,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("child") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); } @@ -978,7 +992,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle op=ISA on property child"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1001,7 +1015,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Invalid filter, property child is LOINC-specific and cannot be used with system: http://example.com/my_code_system"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1026,7 +1040,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); @@ -1043,7 +1057,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); @@ -1060,7 +1074,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); @@ -1077,7 +1091,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); } @@ -1104,7 +1118,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); } @@ -1127,7 +1141,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); // Include @@ -1139,7 +1153,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -1152,7 +1166,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); @@ -1165,7 +1179,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); } @@ -1188,7 +1202,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("descendant") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); } @@ -1212,7 +1226,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle op=ISA on property descendant"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1235,7 +1249,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Invalid filter, property descendant is LOINC-specific and cannot be used with system: http://example.com/my_code_system"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1260,7 +1274,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-4", "47239-9")); @@ -1277,7 +1291,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3")); @@ -1294,7 +1308,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); @@ -1311,7 +1325,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "43343-3", "43343-4", "47239-9")); } @@ -1338,7 +1352,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); } @@ -1361,7 +1375,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("50015-7"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3")); @@ -1374,7 +1388,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-3"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-4", "47239-9")); @@ -1387,7 +1401,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("43343-4"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); // Include @@ -1399,7 +1413,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.EQUAL) .setValue("47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); assertEquals(0, outcome.getExpansion().getContains().size()); } @@ -1421,7 +1435,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("parent") .setOp(ValueSet.FilterOperator.IN) .setValue("50015-7,43343-3,43343-4,47239-9"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); } @@ -1445,7 +1459,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Don't know how to handle op=ISA on property parent"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1468,7 +1482,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { expectedException.expect(InvalidRequestException.class); expectedException.expectMessage("Invalid filter, property parent is LOINC-specific and cannot be used with system: http://example.com/my_code_system"); - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); } @Test @@ -1493,7 +1507,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue(".*\\^Donor$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4", "47239-9")); } @@ -1520,7 +1534,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("HELLO") .setOp(ValueSet.FilterOperator.REGEX) .setValue("12345-1|12345-2"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7", "47239-9")); } @@ -1543,7 +1557,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue(".*\\^Donor$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -1556,7 +1570,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue("\\^Donor$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -1569,7 +1583,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue("\\^Dono$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, empty()); @@ -1582,7 +1596,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue("^Donor$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, empty()); @@ -1595,7 +1609,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue("\\^Dono"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("50015-7")); @@ -1608,7 +1622,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { .setProperty("SYSTEM") .setOp(ValueSet.FilterOperator.REGEX) .setValue("^Ser$"); - outcome = myTermSvc.expandValueSetInMemory(vs, null); + outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("43343-3", "43343-4")); @@ -1623,7 +1637,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { ValueSet vs = new ValueSet(); ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem(CS_URL); - ValueSet outcome = myTermSvc.expandValueSetInMemory(vs, null); + ValueSet outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("ParentWithNoChildrenA", "ParentWithNoChildrenB", "ParentWithNoChildrenC", "ParentA", "childAAA", "childAAB", "childAA", "childAB", "ParentB")); @@ -1740,7 +1754,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem(CS_URL); include.addConcept().setCode("childAAB"); - ValueSet outcome = myTermSvc.expandValueSetInMemory(vs, null); + ValueSet outcome = myTermSvc.expandValueSet(null, vs); codes = toCodesContains(outcome.getExpansion().getContains()); assertThat(codes, containsInAnyOrder("childAAB")); @@ -1935,7 +1949,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test { @Ignore public void testValidateCodeWithProperties() { createCodeSystem(); - IValidationSupport.CodeValidationResult code = myValidationSupport.validateCode(myFhirCtx, CS_URL, "childAAB", null, (String)null); + IValidationSupport.CodeValidationResult code = myValidationSupport.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "childAAB", null, null); assertEquals(true, code.isOk()); assertEquals(2, code.getProperties().size()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplR4Test.java index f063d4b22df..e9204a1b613 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologySvcImplR4Test.java @@ -1,13 +1,13 @@ package ca.uhn.fhir.jpa.term; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; import ca.uhn.fhir.jpa.entity.TermConceptMap; import ca.uhn.fhir.jpa.entity.TermConceptMapGroup; import ca.uhn.fhir.jpa.entity.TermConceptMapGroupElement; import ca.uhn.fhir.jpa.entity.TermConceptMapGroupElementTarget; import ca.uhn.fhir.jpa.entity.TermValueSet; -import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.instance.model.api.IIdType; @@ -21,6 +21,7 @@ import org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence; import org.hl7.fhir.r4.model.UriType; import org.hl7.fhir.r4.model.ValueSet; import org.hl7.fhir.r4.model.codesystems.HttpVerb; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.junit.AfterClass; import org.junit.Rule; import org.junit.Test; @@ -186,7 +187,7 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); TermValueSet termValueSet = myTermValueSetDao.findByResourcePid(myExtensionalVsIdOnResourceTable).get(); @@ -223,7 +224,7 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); TermValueSet termValueSet = myTermValueSetDao.findByResourcePid(myExtensionalVsIdOnResourceTable).get(); @@ -1774,10 +1775,10 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { public void testValidateCode() { createCodeSystem(); - IContextValidationSupport.CodeValidationResult validation = myTermSvc.validateCode(myFhirCtx, CS_URL, "ParentWithNoChildrenA", null, (String)null); + IValidationSupport.CodeValidationResult validation = myTermSvc.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "ParentWithNoChildrenA", null, null); assertEquals(true, validation.isOk()); - validation = myTermSvc.validateCode(myFhirCtx, CS_URL, "ZZZZZZZ", null, (String)null); + validation = myTermSvc.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "ZZZZZZZ", null, null); assertEquals(false, validation.isOk()); } @@ -1795,32 +1796,32 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValidateCodeResult result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, null, null); + ValidateCodeResult result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, "BOGUS", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, "BOGUS", null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, "11378-7", null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsGuess, valueSet, null, "11378-7", null, null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, "11378-7", "Systolic blood pressure at First encounter", null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsGuess, valueSet, null, "11378-7", "Systolic blood pressure at First encounter", null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, "http://acme.org", "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, "http://acme.org", "11378-7", null, null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); Coding coding = new Coding("http://acme.org", "11378-7", "Systolic blood pressure at First encounter"); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, coding, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, coding, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); @@ -1828,12 +1829,15 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { CodeableConcept codeableConcept = new CodeableConcept(); codeableConcept.addCoding(new Coding("BOGUS", "BOGUS", "BOGUS")); codeableConcept.addCoding(coding); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, null, codeableConcept); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, null, codeableConcept); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); } + ValidationOptions optsNoGuess = new ValidationOptions(); + ValidationOptions optsGuess = new ValidationOptions().guessSystem(); + @Test public void testValidateCodeIsInPreExpandedValueSetWithClientAssignedId() throws Exception { myDaoConfig.setPreExpandValueSets(true); @@ -1848,32 +1852,33 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValidateCodeResult result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, null, null); + ValidateCodeResult result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, "BOGUS", null, null, null); + + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, "BOGUS", null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, "11378-7", null, null, null); assertNull(result); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsGuess, valueSet, null, "11378-7", null, null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, "11378-7", "Systolic blood pressure at First encounter", null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsGuess, valueSet, null, "11378-7", "Systolic blood pressure at First encounter", null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, "http://acme.org", "11378-7", null, null, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, "http://acme.org", "11378-7", null, null, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); Coding coding = new Coding("http://acme.org", "11378-7", "Systolic blood pressure at First encounter"); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, coding, null); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, coding, null); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); @@ -1881,7 +1886,7 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test { CodeableConcept codeableConcept = new CodeableConcept(); codeableConcept.addCoding(new Coding("BOGUS", "BOGUS", "BOGUS")); codeableConcept.addCoding(coding); - result = myTermSvc.validateCodeIsInPreExpandedValueSet(valueSet, null, null, null, null, codeableConcept); + result = myTermSvc.validateCodeIsInPreExpandedValueSet(optsNoGuess, valueSet, null, null, null, null, codeableConcept); assertTrue(result.isResult()); assertEquals("Validation succeeded", result.getMessage()); assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java index f727931f104..ce3bdb87945 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.term; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.jpa.entity.TermCodeSystem; import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion; import ca.uhn.fhir.jpa.entity.TermConcept; @@ -69,7 +70,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myCaptureQueriesListener.clear(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); assertEquals(24, expandedValueSet.getExpansion().getContains().size()); runInTransaction(()->{ @@ -82,7 +83,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { assertEquals(0, myTermValueSetConceptDao.count()); }); - expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + expandedValueSet = myTermSvc.expandValueSet(null, valueSet); assertEquals(24, expandedValueSet.getExpansion().getContains().size()); } @@ -103,7 +104,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myCaptureQueriesListener.clear(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); @@ -185,7 +186,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myCaptureQueriesListener.clear(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, 0, 100); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(3, expandedValueSet.getExpansion().getContains().size()); @@ -204,7 +205,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { ValueSet valueSet = myValueSetDao.read(myExtensionalVsId); ourLog.info("ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet)); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -260,7 +261,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { assertEquals("Systolic blood pressure 8 hour minimum", containsComponent.getDisplay()); assertFalse(containsComponent.hasDesignation()); - expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -331,7 +332,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSet expandedValueSet = myTermSvc.expandValueSet(null, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -406,7 +407,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), 23); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(0) + .setCount(23); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -475,7 +479,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), 23); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(0) + .setCount(23); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -544,7 +551,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), 0); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(0) + .setCount(0); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); String expanded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet); ourLog.info("Expanded ValueSet:\n" + expanded); @@ -573,7 +583,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, myDaoConfig.getPreExpandValueSetsDefaultOffset(), 0); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(0) + .setCount(0); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -601,7 +614,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, 1, myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(1) + .setCount(1000); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -662,7 +678,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, 1, myDaoConfig.getPreExpandValueSetsDefaultCount()); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(1) + .setCount(1000); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -723,7 +742,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, 1, 22); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(1) + .setCount(22); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -769,7 +791,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { ValueSet vs = new ValueSet(); ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem("http://unknown-system"); - ValueSet outcome = myTermSvc.expandValueSetInMemory(vs, null); + ValueSet outcome = myTermSvc.expandValueSet(new ValueSetExpansionOptions().setFailOnMissingCodeSystem(false), vs); assertEquals(0, outcome.getExpansion().getContains().size()); String encoded = myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome); ourLog.info(encoded); @@ -793,7 +815,10 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); - ValueSet expandedValueSet = myTermSvc.expandValueSet(valueSet, 1, 22); + ValueSetExpansionOptions options = new ValueSetExpansionOptions() + .setOffset(1) + .setCount(22); + ValueSet expandedValueSet = myTermSvc.expandValueSet(options, valueSet); ourLog.info("Expanded ValueSet:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expandedValueSet)); assertEquals(codeSystem.getConcept().size(), expandedValueSet.getExpansion().getTotal()); @@ -852,7 +877,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem(CS_URL); try { - myTermSvc.expandValueSetInMemory(vs, null); + myTermSvc.expandValueSet(null, vs); fail(); } catch (InternalErrorException e) { assertEquals("Expansion of ValueSet produced too many codes (maximum 50) - Operation aborted!", e.getMessage()); @@ -863,7 +888,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { vs = new ValueSet(); include = vs.getCompose().addInclude(); include.setSystem(CS_URL); - ValueSet outcome = myTermSvc.expandValueSetInMemory(vs, null); + ValueSet outcome = myTermSvc.expandValueSet(null, vs); assertEquals(109, outcome.getExpansion().getContains().size()); } @@ -878,7 +903,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { ValueSet.ConceptSetComponent include = vs.getCompose().addInclude(); include.setSystem(CS_URL); - myTermSvc.expandValueSet(vs, myValueSetCodeAccumulator); + myTermSvc.expandValueSet(null, vs, myValueSetCodeAccumulator); verify(myValueSetCodeAccumulator, times(9)).includeConceptWithDesignations(anyString(), anyString(), nullable(String.class), anyCollection()); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/CoordCalculatorTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/CoordCalculatorTest.java new file mode 100644 index 00000000000..893ad55795b --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/util/CoordCalculatorTest.java @@ -0,0 +1,70 @@ +package ca.uhn.fhir.jpa.util; + +import org.hibernate.search.spatial.impl.Point; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.junit.Assert.assertEquals; + +public class CoordCalculatorTest { + private final Logger ourLog = LoggerFactory.getLogger(CoordCalculatorTest.class); + // CHIN and UHN coordinates from Google Maps + // Distance and bearing from https://www.movable-type.co.uk/scripts/latlong.html + public static final double LATITUDE_CHIN = 43.65513; + public static final double LONGITUDE_CHIN = -79.4170007; + public static final double LATITUDE_UHN = 43.656765; + public static final double LONGITUDE_UHN = -79.3987645; + public static final double DISTANCE_KM_CHIN_TO_UHN = 1.478; + public static final double BEARING_CHIN_TO_UHN = 82 + (55.0 / 60) + (46.0 / 3600); + + // A Fiji island near the anti-meridian + public static final double LATITUDE_TAVEUNI = -16.8488893; + public static final double LONGITIDE_TAVEUNI = 179.889793; + // enough distance from point to cross anti-meridian + public static final double DISTANCE_TAVEUNI = 100.0; + + @Test + public void testCHINToUHN() { + Point result = CoordCalculator.findTarget(LATITUDE_CHIN, LONGITUDE_CHIN, BEARING_CHIN_TO_UHN, DISTANCE_KM_CHIN_TO_UHN); + + assertEquals(LATITUDE_UHN, result.getLatitude(), 0.0001); + assertEquals(LONGITUDE_UHN, result.getLongitude(), 0.0001); + } + + @Test + public void testBox() { + SearchBox box = CoordCalculator.getBox(LATITUDE_CHIN, LONGITUDE_CHIN, 1.0); + double expectedLatitudeDelta = 0.0090; + assertEquals(LATITUDE_CHIN - expectedLatitudeDelta, box.getSouthWest().getLatitude(), 0.0001); + assertEquals(LATITUDE_CHIN + expectedLatitudeDelta, box.getNorthEast().getLatitude(), 0.0001); + double expectedLongitudeDelta = 0.012414; + assertEquals(LONGITUDE_CHIN - expectedLongitudeDelta, box.getSouthWest().getLongitude(), 0.0001); + assertEquals(LONGITUDE_CHIN + expectedLongitudeDelta, box.getNorthEast().getLongitude(), 0.0001); + } + + @Test + public void testOnPrimeMeridian() { + double meridianLongitide = 0.0; + SearchBox box = CoordCalculator.getBox(LATITUDE_CHIN, meridianLongitide, 1.0); + double expectedLatitudeDelta = 0.0090; + assertEquals(LATITUDE_CHIN - expectedLatitudeDelta, box.getSouthWest().getLatitude(), 0.0001); + assertEquals(LATITUDE_CHIN + expectedLatitudeDelta, box.getNorthEast().getLatitude(), 0.0001); + double expectedLongitudeDelta = 0.012414; + assertEquals(meridianLongitide - expectedLongitudeDelta, box.getSouthWest().getLongitude(), 0.0001); + assertEquals(meridianLongitide + expectedLongitudeDelta, box.getNorthEast().getLongitude(), 0.0001); + } + + @Test + public void testOnAntiMeridian() { + SearchBox box = CoordCalculator.getBox(LATITUDE_TAVEUNI, LONGITIDE_TAVEUNI, 100.0); + double expectedLatitudeDelta = 0.90; + assertEquals(LATITUDE_TAVEUNI - expectedLatitudeDelta, box.getSouthWest().getLatitude(), 0.01); + assertEquals(LATITUDE_TAVEUNI + expectedLatitudeDelta, box.getNorthEast().getLatitude(), 0.01); + double expectedLongitudeDelta = 0.94; + assertEquals(LONGITIDE_TAVEUNI - expectedLongitudeDelta, box.getSouthWest().getLongitude(), 0.01); + // This case wraps + assertEquals(LONGITIDE_TAVEUNI + expectedLongitudeDelta - 360.0, box.getNorthEast().getLongitude(), 0.01); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java index 944ca3395f0..49ce3040de6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/AttachmentUtilTest.java @@ -49,7 +49,7 @@ public class AttachmentUtilTest { AttachmentUtil.setSize(ctx, attachment, 123); org.hl7.fhir.r5.model.Communication communication = new org.hl7.fhir.r5.model.Communication(); - communication.addPayload().setContent((org.hl7.fhir.r5.model.Type) attachment); + communication.addPayload().setContent((org.hl7.fhir.r5.model.DataType) attachment); String encoded = ctx.newJsonParser().encodeResourceToString(communication); assertEquals("{\"resourceType\":\"Communication\",\"payload\":[{\"contentAttachment\":{\"contentType\":\"text/plain\",\"data\":\"AAECAw==\",\"url\":\"http://foo\",\"size\":123}}]}", encoded); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java index c335a1ac6ea..3a55268c859 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/validator/ValidatorAcrossVersionsTest.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.validator; import static org.junit.Assert.*; -import org.hl7.fhir.instance.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.junit.AfterClass; import org.junit.Test; @@ -45,7 +45,7 @@ public class ValidatorAcrossVersionsTest { FhirValidator val = ctxDstu2.newValidator(); val.setValidateAgainstStandardSchema(false); val.setValidateAgainstStandardSchematron(false); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ctxDstu2)); QuestionnaireResponse resp = new QuestionnaireResponse(); resp.setAuthored(DateTimeDt.withCurrentTime()); @@ -54,8 +54,8 @@ public class ValidatorAcrossVersionsTest { ourLog.info(ctxDstu2.newJsonParser().setPrettyPrint(true).encodeResourceToString(result.toOperationOutcome())); assertEquals(2, result.getMessages().size()); - assertEquals("No questionnaire is identified, so no validation can be performed against the base questionnaire", result.getMessages().get(0).getMessage()); - assertEquals("Profile http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse, Element 'QuestionnaireResponse.status': minimum required = 1, but only found 0", result.getMessages().get(1).getMessage()); + assertEquals("Profile http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse, Element 'QuestionnaireResponse.status': minimum required = 1, but only found 0", result.getMessages().get(0).getMessage()); + assertEquals("No questionnaire is identified, so no validation can be performed against the base questionnaire", result.getMessages().get(1).getMessage()); } } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/AccessoryFiles/PartFile/PartRelatedCodeMapping.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/AccessoryFiles/PartFile/PartRelatedCodeMapping.csv index d0d7e122d12..495416894ce 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/loinc/AccessoryFiles/PartFile/PartRelatedCodeMapping.csv +++ b/hapi-fhir-jpaserver-base/src/test/resources/loinc/AccessoryFiles/PartFile/PartRelatedCodeMapping.csv @@ -1,12 +1,12 @@ -"PartNumber","PartName","PartTypeName","ExtCodeId","ExtCodeDisplayName","ExtCodeSystem","MapType","ContentOrigin","ExtCodeSystemVersion","ExtCodeSystemCopyrightNotice" -"LP18172-4","Interferon.beta","COMPONENT"," 420710006","Interferon beta (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP31706-2","Nornicotine","COMPONENT","1018001","Nornicotine (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15826-8","Prostaglandin F2","COMPONENT","10192006","Prostaglandin PGF2 (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP7400-7","Liver","SYSTEM","10200004","Liver structure (body structure)","http://snomed.info/sct","LOINC broader","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP29165-5","Liver.FNA","SYSTEM","10200004","Liver structure (body structure)","http://snomed.info/sct","LOINC broader","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15666-8","Inosine","COMPONENT","102640000","Inosine (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15943-1","Uronate","COMPONENT","102641001","Uronic acid (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15791-4","Phenylketones","COMPONENT","102642008","Phenylketones (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15721-1","Malonate","COMPONENT","102648007","Malonic acid (substance)","http://snomed.info/sct","Exact","Both","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." -"LP15842-5","Pyridoxine","COMPONENT","1054","Pyridoxine","http://pubchem.ncbi.nlm.nih.gov","Exact",,, -"LP15842-5","Pyridoxine","COMPONENT","1054","Pyridoxine","http://foo/bar","Exact",,, +"PartNumber","PartName" ,"PartTypeName","ExtCodeId" ,"ExtCodeDisplayName" ,"ExtCodeSystem" ,"Equivalence","ContentOrigin","ExtCodeSystemVersion" ,"ExtCodeSystemCopyrightNotice" +"LP18172-4" ,"Interferon.beta" ,"COMPONENT" ," 420710006","Interferon beta (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP31706-2" ,"Nornicotine" ,"COMPONENT" ,"1018001" ,"Nornicotine (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15826-8" ,"Prostaglandin F2","COMPONENT" ,"10192006" ,"Prostaglandin PGF2 (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP7400-7" ,"Liver" ,"SYSTEM" ,"10200004" ,"Liver structure (body structure)","http://snomed.info/sct" ,"wider" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP29165-5" ,"Liver.FNA" ,"SYSTEM" ,"10200004" ,"Liver structure (body structure)","http://snomed.info/sct" ,"narrower" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15666-8" ,"Inosine" ,"COMPONENT" ,"102640000" ,"Inosine (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15943-1" ,"Uronate" ,"COMPONENT" ,"102641001" ,"Uronic acid (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15791-4" ,"Phenylketones" ,"COMPONENT" ,"102642008" ,"Phenylketones (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15721-1" ,"Malonate" ,"COMPONENT" ,"102648007" ,"Malonic acid (substance)" ,"http://snomed.info/sct" ,"equivalent" ,"Both" ,"http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO.This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. This may incur a fee in SNOMED International non-Member countries." +"LP15842-5" ,"Pyridoxine" ,"COMPONENT" ,"1054" ,"Pyridoxine" ,"http://pubchem.ncbi.nlm.nih.gov","equivalent" , , , +"LP15842-5" ,"Pyridoxine" ,"COMPONENT" ,"1054" ,"Pyridoxine" ,"http://foo/bar" ,"equivalent" , , , diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-cs.json b/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-cs.json new file mode 100644 index 00000000000..ea72cd32b04 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-cs.json @@ -0,0 +1,86 @@ +{ + "resourceType" : "CodeSystem", + "id" : "ehealth-message-category", + "text" : { + "status" : "generated", + "div" : "

    MessageCategory

    Message category types

    \n

    This code system http://ehealth.sundhed.dk/cs/message-category defines the following codes:

    CodeDisplayDefinition
    message Message
    notification Notification
    advice Advice
    note Note
    " + }, + "url" : "http://ehealth.sundhed.dk/cs/message-category", + "version" : "0.6.0", + "name" : "MessageCategory", + "status" : "active", + "experimental" : false, + "date" : "2019-01-29T00:00:00+00:00", + "publisher" : "ehealth.sundhed.dk", + "contact" : [ + { + "telecom" : [ + { + "system" : "url", + "value" : "http://ehealth.sundhed.dk/terminology" + } + ] + } + ], + "description" : "Message category types", + "caseSensitive" : true, + "content" : "complete", + "concept" : [ + { + "code" : "message", + "display" : "Message", + "designation" : [ + { + "language" : "en-US", + "value" : "Message" + }, + { + "language" : "da", + "value" : "Besked" + } + ] + }, + { + "code" : "notification", + "display" : "Notification", + "designation" : [ + { + "language" : "en-US", + "value" : "Notification" + }, + { + "language" : "da", + "value" : "Notifikation" + } + ] + }, + { + "code" : "advice", + "display" : "Advice", + "designation" : [ + { + "language" : "en-US", + "value" : "Advice" + }, + { + "language" : "da", + "value" : "Advisering" + } + ] + }, + { + "code" : "note", + "display" : "Note", + "designation" : [ + { + "language" : "en-US", + "value" : "Note" + }, + { + "language" : "da", + "value" : "Note" + } + ] + } + ] +} diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-vs-all.json b/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-vs-all.json new file mode 100644 index 00000000000..817b38cbe78 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/expand-multi-vs-all.json @@ -0,0 +1,92 @@ +{ + "resourceType" : "ValueSet", + "id" : "message-category", + "text" : { + "status" : "generated", + "div" : "

    MessageCategory

    The set of possible message types

    \n

    This value set includes codes from the following code systems:

    Additional Language Displays

    CodeDansk (Danish, da)English (United States) (English (United States), en)
    messageBeskedMessage
    notificationNotifikationNotification
    adviceAdviseringAdvice
    noteNoteNote
    " + }, + "url" : "http://ehealth.sundhed.dk/vs/message-category", + "version" : "0.0.1", + "name" : "MessageCategory", + "status" : "active", + "experimental" : true, + "date" : "2019-02-08T00:00:00+00:00", + "publisher" : "ehealth.sundhed.dk", + "contact" : [ + { + "name" : "FUT", + "telecom" : [ + { + "system" : "url", + "value" : "https://digst.dk/digital-service/digital-velfaerd/telemedicin-kol/faelles-udbud-af-telemedicin-fut/" + } + ] + } + ], + "description" : "The set of possible message types", + "compose" : { + "include" : [ + { + "system" : "http://ehealth.sundhed.dk/cs/message-category", + "concept" : [ + { + "code" : "message", + "display" : "Message", + "designation" : [ + { + "language" : "en-US", + "value" : "Message" + }, + { + "language" : "da", + "value" : "Besked" + } + ] + }, + { + "code" : "notification", + "display" : "Notification", + "designation" : [ + { + "language" : "en-US", + "value" : "Notification" + }, + { + "language" : "da", + "value" : "Notifikation" + } + ] + }, + { + "code" : "advice", + "display" : "Advice", + "designation" : [ + { + "language" : "en-US", + "value" : "Advice" + }, + { + "language" : "da", + "value" : "Advisering" + } + ] + }, + { + "code" : "note", + "display" : "Note", + "designation" : [ + { + "language" : "en-US", + "value" : "Note" + }, + { + "language" : "da", + "value" : "Note" + } + ] + } + ] + } + ] + } +} diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/CodeSystem-iar-citizenship-status.xml b/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/CodeSystem-iar-citizenship-status.xml new file mode 100644 index 00000000000..db87c99a0d9 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/CodeSystem-iar-citizenship-status.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/ValueSet-iar-citizenship-status.xml b/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/ValueSet-iar-citizenship-status.xml new file mode 100644 index 00000000000..2c75714b646 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/iar/ValueSet-iar-citizenship-status.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-jpaserver-base/src/test/resources/term-delta-json.json b/hapi-fhir-jpaserver-base/src/test/resources/term-delta-json.json new file mode 100644 index 00000000000..78e18fccaaa --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/term-delta-json.json @@ -0,0 +1,30 @@ +{ + "resourceType": "Parameters", + "parameter": [ + { + "name": "system", + "valueUri": "https://good.health" + }, + { + "name": "codeSystem", + "resource": { + "resourceType": "CodeSystem", + "status": "active", + "content": "not-present", + "url": "https://good.health", + "concept": [ + { + "code": "1111222233", + "display": "Some label for the parent - with a dash too", + "concept": [ + { + "code": "1111222234", + "display": "Some very very very very very looooooong child label with a coma, another one, one more, more and final one" + } + ] + } + ] + } + } + ] +} diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 345bf13d5ee..3411ad7a06f 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/BaseMigrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/BaseMigrator.java index bebb72afcf6..b37a45f2735 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/BaseMigrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/BaseMigrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/DriverTypeEnum.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/DriverTypeEnum.java index 98718ed1f34..2903b36499c 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/DriverTypeEnum.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/DriverTypeEnum.java @@ -22,7 +22,7 @@ import java.sql.SQLException; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java index 6c63e467d22..f143de54a64 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigrator.java index 71d5ead3894..7373e1889ee 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.migrate; */ import ca.uhn.fhir.jpa.migrate.taskdef.BaseTask; +import ca.uhn.fhir.jpa.migrate.taskdef.InitializeSchemaTask; import com.google.common.annotations.VisibleForTesting; import org.flywaydb.core.Flyway; import org.flywaydb.core.api.MigrationInfoService; @@ -63,6 +64,8 @@ public class FlywayMigrator extends BaseMigrator { if (isDryRun()) { StringBuilder statementBuilder = buildExecutedStatementsString(); ourLog.info("SQL that would be executed:\n\n***********************************\n{}***********************************", statementBuilder); + } else { + ourLog.info("Schema migrated successfully."); } } catch (Exception e) { throw e; @@ -85,7 +88,11 @@ public class FlywayMigrator extends BaseMigrator { @Override public void addTasks(List theTasks) { - theTasks.forEach(this::addTask); + if ("true".equals(System.getProperty("unit_test_mode"))) { + theTasks.stream().filter(task -> task instanceof InitializeSchemaTask).forEach(this::addTask); + } else { + theTasks.forEach(this::addTask); + } } @Override diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/IMigrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/IMigrator.java index 071d6c64322..a093c6eafe0 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/IMigrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/IMigrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java index 6398937cbc7..4ae1f557868 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/MigrationTaskSkipper.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/MigrationTaskSkipper.java index af66bac6367..4aae972c193 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/MigrationTaskSkipper.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/MigrationTaskSkipper.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/Migrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/Migrator.java index 5820c464c35..1688de89a5e 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/Migrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/Migrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/SchemaMigrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/SchemaMigrator.java index ac0262518ec..3be8039ac3d 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/SchemaMigrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/SchemaMigrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/TaskOnlyMigrator.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/TaskOnlyMigrator.java index 9290e096f01..86d1d92bcd6 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/TaskOnlyMigrator.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/TaskOnlyMigrator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,11 @@ public class TaskOnlyMigrator extends BaseMigrator { next.setConnectionProperties(connectionProperties); try { - ourLog.info("Executing task of type: {}", next.getClass().getSimpleName()); + if (isDryRun()) { + ourLog.info("Dry run {} {}", next.getFlywayVersion(), next.getDescription()); + } else { + ourLog.info("Executing {} {}", next.getFlywayVersion(), next.getDescription()); + } next.execute(); addExecutedStatements(next.getExecutedStatements()); } catch (SQLException e) { @@ -61,6 +65,8 @@ public class TaskOnlyMigrator extends BaseMigrator { if (isDryRun()) { StringBuilder statementBuilder = buildExecutedStatementsString(); ourLog.info("SQL that would be executed:\n\n***********************************\n{}***********************************", statementBuilder); + } else { + ourLog.info("Schema migrated successfully."); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTask.java index f9e73700311..4797f1cfefc 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; import java.sql.SQLException; import java.util.Set; -public class AddColumnTask extends BaseTableColumnTypeTask { +public class AddColumnTask extends BaseTableColumnTypeTask { private static final Logger ourLog = LoggerFactory.getLogger(AddColumnTask.class); @@ -51,7 +51,7 @@ public class AddColumnTask extends BaseTableColumnTypeTask { String typeStatement = getTypeStatement(); - String sql = ""; + String sql; switch (getDriverType()) { case DERBY_EMBEDDED: case MARIADB_10_1: diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddForeignKeyTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddForeignKeyTask.java index c4dba638a0b..7cbe9832a34 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddForeignKeyTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddForeignKeyTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ import java.util.Set; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public class AddForeignKeyTask extends BaseTableColumnTask { +public class AddForeignKeyTask extends BaseTableColumnTask { private static final Logger ourLog = LoggerFactory.getLogger(AddForeignKeyTask.class); private String myConstraintName; @@ -74,7 +74,7 @@ public class AddForeignKeyTask extends BaseTableColumnTask { return; } - String sql = null; + String sql; switch (getDriverType()) { case MARIADB_10_1: case MYSQL_5_7: @@ -105,28 +105,20 @@ public class AddForeignKeyTask extends BaseTableColumnTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - AddForeignKeyTask that = (AddForeignKeyTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myConstraintName, that.myConstraintName) - .append(myForeignTableName, that.myForeignTableName) - .append(myForeignColumnName, that.myForeignColumnName) - .isEquals(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myConstraintName); + theBuilder.append(myForeignTableName); + theBuilder.append(myForeignColumnName); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myConstraintName) - .append(myForeignTableName) - .append(myForeignColumnName) - .toHashCode(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + AddForeignKeyTask otherObject = (AddForeignKeyTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(myConstraintName, otherObject.myConstraintName); + theBuilder.append(myForeignTableName, otherObject.myForeignTableName); + theBuilder.append(myForeignColumnName, otherObject.myForeignColumnName); } + } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIdGeneratorTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIdGeneratorTask.java index d293174290d..bc148c50cbe 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIdGeneratorTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIdGeneratorTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public class AddIdGeneratorTask extends BaseTask { +public class AddIdGeneratorTask extends BaseTask { private static final Logger ourLog = LoggerFactory.getLogger(AddIdGeneratorTask.class); private final String myGeneratorName; @@ -88,9 +88,9 @@ public class AddIdGeneratorTask extends BaseTask { if (isNotBlank(sql)) { Set sequenceNames = JdbcUtils.getSequenceNames(getConnectionProperties()) - .stream() - .map(String::toLowerCase) - .collect(Collectors.toSet()); + .stream() + .map(String::toLowerCase) + .collect(Collectors.toSet()); ourLog.debug("Currently have sequences: {}", sequenceNames); if (sequenceNames.contains(myGeneratorName.toLowerCase())) { logInfo(ourLog, "Sequence {} already exists - No action performed", myGeneratorName); @@ -103,22 +103,13 @@ public class AddIdGeneratorTask extends BaseTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof AddIdGeneratorTask)) return false; - - AddIdGeneratorTask that = (AddIdGeneratorTask) theO; - - return new EqualsBuilder() - .append(myGeneratorName, that.myGeneratorName) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + AddIdGeneratorTask otherObject = (AddIdGeneratorTask) theOtherObject; + theBuilder.append(myGeneratorName, otherObject.myGeneratorName); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(myGeneratorName) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(myGeneratorName); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIndexTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIndexTask.java index f634c782db9..cd4b3305fb9 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIndexTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddIndexTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; -public class AddIndexTask extends BaseTableTask { +public class AddIndexTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(AddIndexTask.class); private String myIndexName; @@ -97,28 +97,21 @@ public class AddIndexTask extends BaseTableTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + super.generateEquals(theBuilder, theOtherObject); - if (theO == null || getClass() != theO.getClass()) return false; + AddIndexTask otherObject = (AddIndexTask) theOtherObject; + theBuilder.append(myIndexName, otherObject.myIndexName); + theBuilder.append(myColumns, otherObject.myColumns); + theBuilder.append(myUnique, otherObject.myUnique); - AddIndexTask that = (AddIndexTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myIndexName, that.myIndexName) - .append(myColumns, that.myColumns) - .append(myUnique, that.myUnique) - .isEquals(); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myIndexName) - .append(myColumns) - .append(myUnique) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myIndexName); + theBuilder.append(myColumns); + theBuilder.append(myUnique); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableByColumnTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableByColumnTask.java index eb98d6d8e7f..c31267bd682 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableByColumnTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableByColumnTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -public class AddTableByColumnTask extends BaseTableTask { +public class AddTableByColumnTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(AddTableByColumnTask.class); @@ -110,26 +110,17 @@ public class AddTableByColumnTask extends BaseTableTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - AddTableByColumnTask that = (AddTableByColumnTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myAddColumnTasks, that.myAddColumnTasks) - .append(myPkColumns, that.myPkColumns) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + super.generateEquals(theBuilder, theOtherObject); + AddTableByColumnTask otherObject = (AddTableByColumnTask) theOtherObject; + theBuilder.append(myAddColumnTasks, otherObject.myAddColumnTasks); + theBuilder.append(myPkColumns, otherObject.myPkColumns); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myAddColumnTasks) - .append(myPkColumns) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myAddColumnTasks); + theBuilder.append(myPkColumns); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableRawSqlTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableRawSqlTask.java index 65f241aae91..2cc9dbec6ef 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableRawSqlTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/AddTableRawSqlTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,13 @@ import org.slf4j.LoggerFactory; import org.springframework.jdbc.core.JdbcTemplate; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; -public class AddTableRawSqlTask extends BaseTableTask { +public class AddTableRawSqlTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(AddTableRawSqlTask.class); private Map> myDriverToSqls = new HashMap<>(); @@ -87,24 +91,15 @@ public class AddTableRawSqlTask extends BaseTableTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - AddTableRawSqlTask that = (AddTableRawSqlTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myDriverNeutralSqls, that.myDriverNeutralSqls) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + super.generateEquals(theBuilder, theOtherObject); + AddTableRawSqlTask otherObject = (AddTableRawSqlTask) theOtherObject; + theBuilder.append(myDriverNeutralSqls, otherObject.myDriverNeutralSqls); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myDriverNeutralSqls) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myDriverNeutralSqls); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java index 2d9170b8637..056f861fd64 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import java.util.Map; import java.util.Set; import java.util.function.Consumer; -public class ArbitrarySqlTask extends BaseTask { +public class ArbitrarySqlTask extends BaseTask { private static final Logger ourLog = LoggerFactory.getLogger(ArbitrarySqlTask.class); private final String myDescription; @@ -103,6 +103,17 @@ public class ArbitrarySqlTask extends BaseTask { myConditionalOnExistenceOf.add(new TableAndColumn(theTableName, theColumnName)); } + @Override + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + ArbitrarySqlTask otherObject = (ArbitrarySqlTask) theOtherObject; + theBuilder.append(myTableName, otherObject.myTableName); + } + + @Override + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(myTableName); + } + public enum QueryModeEnum { BATCH_UNTIL_NO_MORE } @@ -113,12 +124,10 @@ public class ArbitrarySqlTask extends BaseTask { private class QueryTask extends Task { private final String mySql; - private final QueryModeEnum myMode; private final Consumer> myConsumer; public QueryTask(String theSql, QueryModeEnum theMode, Consumer> theConsumer) { mySql = theSql; - myMode = theMode; myConsumer = theConsumer; setDescription("Execute raw sql"); } @@ -134,7 +143,7 @@ public class ArbitrarySqlTask extends BaseTask { do { logInfo(ourLog, "Querying for up to {} rows", myBatchSize); rows = getTxTemplate().execute(t -> { - JdbcTemplate jdbcTemplate = newJdbcTemnplate(); + JdbcTemplate jdbcTemplate = newJdbcTemplate(); jdbcTemplate.setMaxRows(myBatchSize); return jdbcTemplate.query(mySql, new ColumnMapRowMapper()); }); @@ -168,26 +177,4 @@ public class ArbitrarySqlTask extends BaseTask { return myColumn; } } - - @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof ArbitrarySqlTask)) return false; - - ArbitrarySqlTask that = (ArbitrarySqlTask) theO; - - return new EqualsBuilder() - .append(myTableName, that.myTableName) - .append(myExecuteOnlyIfTableExists, that.myExecuteOnlyIfTableExists) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(myTableName) - .append(myExecuteOnlyIfTableExists) - .toHashCode(); - } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTask.java index 3edd2f799dc..a58fbdf0f0d 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.thymeleaf.util.StringUtils; import java.util.Locale; -public abstract class BaseTableColumnTask extends BaseTableTask { +public abstract class BaseTableColumnTask extends BaseTableTask { private String myColumnName; @@ -35,10 +35,9 @@ public abstract class BaseTableColumnTask extends BaseT super(theProductVersion, theSchemaVersion); } - @SuppressWarnings("unchecked") - public T setColumnName(String theColumnName) { + public BaseTableColumnTask setColumnName(String theColumnName) { myColumnName = StringUtils.toUpperCase(theColumnName, Locale.US); - return (T) this; + return this; } @@ -53,24 +52,15 @@ public abstract class BaseTableColumnTask extends BaseT } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof BaseTableColumnTask)) return false; - - BaseTableColumnTask that = (BaseTableColumnTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myColumnName, that.myColumnName) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + BaseTableColumnTask otherObject = (BaseTableColumnTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(myColumnName, otherObject.myColumnName); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myColumnName) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myColumnName); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java index 5680d6f4a27..b757db13ce6 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,17 +25,12 @@ import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.jetbrains.annotations.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; import java.util.Objects; -public abstract class BaseTableColumnTypeTask extends BaseTableColumnTask { - private static final Logger ourLog = LoggerFactory.getLogger(BaseTableColumnTypeTask.class); - - +public abstract class BaseTableColumnTypeTask extends BaseTableColumnTask { private ColumnTypeEnum myColumnType; private Map> myColumnTypeToDriverTypeToSqlType = new HashMap<>(); private Boolean myNullable; @@ -116,6 +111,11 @@ public abstract class BaseTableColumnTypeTask extends B return myColumnType; } + public BaseTableColumnTask setColumnType(ColumnTypeEnum theColumnType) { + myColumnType = theColumnType; + return this; + } + private void setColumnType(ColumnTypeEnum theColumnType, DriverTypeEnum theDriverType, String theColumnTypeSql) { Map columnSqlType = myColumnTypeToDriverTypeToSqlType.computeIfAbsent(theColumnType, k -> new HashMap<>()); if (columnSqlType.containsKey(theDriverType)) { @@ -124,7 +124,6 @@ public abstract class BaseTableColumnTypeTask extends B columnSqlType.put(theDriverType, theColumnTypeSql); } - @Override public void validate() { super.validate(); @@ -138,12 +137,6 @@ public abstract class BaseTableColumnTypeTask extends B } } - @SuppressWarnings("unchecked") - public T setColumnType(ColumnTypeEnum theColumnType) { - myColumnType = theColumnType; - return (T) this; - } - protected String getSqlType() { return getSqlType(getColumnLength()); } @@ -163,9 +156,9 @@ public abstract class BaseTableColumnTypeTask extends B return myNullable; } - public T setNullable(boolean theNullable) { + public BaseTableColumnTask setNullable(boolean theNullable) { myNullable = theNullable; - return (T) this; + return this; } protected String getSqlNotNull() { @@ -176,11 +169,35 @@ public abstract class BaseTableColumnTypeTask extends B return myColumnLength; } - public BaseTableColumnTypeTask setColumnLength(long theColumnLength) { + public BaseTableColumnTypeTask setColumnLength(long theColumnLength) { myColumnLength = theColumnLength; return this; } + @Override + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(getColumnTypeName(myColumnType)); + theBuilder.append(myNullable); + theBuilder.append(myColumnLength); + } + + @Override + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + BaseTableColumnTypeTask otherObject = (BaseTableColumnTypeTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(getColumnTypeName(myColumnType), getColumnTypeName(otherObject.myColumnType)); + theBuilder.append(myNullable, otherObject.myNullable); + theBuilder.append(myColumnLength, otherObject.myColumnLength); + } + + @Nullable + private Object getColumnTypeName(ColumnTypeEnum theColumnType) { + if (theColumnType == null) { + return null; + } + return myColumnType.name(); + } public enum ColumnTypeEnum { @@ -191,42 +208,7 @@ public abstract class BaseTableColumnTypeTask extends B FLOAT, INT, BLOB, - CLOB - ; + CLOB; } - - @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof BaseTableColumnTypeTask)) return false; - - BaseTableColumnTypeTask that = (BaseTableColumnTypeTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(getColumnTypeName(myColumnType), getColumnTypeName(that.myColumnType)) - .append(myNullable, that.myNullable) - .append(myColumnLength, that.myColumnLength) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(getColumnTypeName(myColumnType)) - .append(myNullable) - .append(myColumnLength) - .toHashCode(); - } - - @Nullable - private Object getColumnTypeName(ColumnTypeEnum theColumnType) { - if (theColumnType == null) { - return null; - } - return myColumnType.name(); - } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableTask.java index 0f9a378654f..ad3596b7bc0 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; -public abstract class BaseTableTask extends BaseTask { +public abstract class BaseTableTask extends BaseTask { private String myTableName; public BaseTableTask(String theProductVersion, String theSchemaVersion) { @@ -35,10 +35,10 @@ public abstract class BaseTableTask extends BaseTask { return myTableName; } - public T setTableName(String theTableName) { + public BaseTableTask setTableName(String theTableName) { Validate.notBlank(theTableName); myTableName = theTableName; - return (T) this; + return this; } @Override @@ -47,22 +47,13 @@ public abstract class BaseTableTask extends BaseTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof BaseTableTask)) return false; - - BaseTableTask that = (BaseTableTask) theO; - - return new EqualsBuilder() - .append(myTableName, that.myTableName) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + BaseTableTask otherObject = (BaseTableTask) theOtherObject; + theBuilder.append(myTableName, otherObject.myTableName); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(myTableName) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(myTableName); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTask.java index e74dacadb34..6e66298a827 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ package ca.uhn.fhir.jpa.migrate.taskdef; */ import ca.uhn.fhir.jpa.migrate.DriverTypeEnum; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.intellij.lang.annotations.Language; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,11 +38,13 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -public abstract class BaseTask { +public abstract class BaseTask { - private static final Logger ourLog = LoggerFactory.getLogger(BaseTask.class); public static final String MIGRATION_VERSION_PATTERN = "\\d{8}\\.\\d+"; + private static final Logger ourLog = LoggerFactory.getLogger(BaseTask.class); private static final Pattern versionPattern = Pattern.compile(MIGRATION_VERSION_PATTERN); + private final String myProductVersion; + private final String mySchemaVersion; private DriverTypeEnum.ConnectionProperties myConnectionProperties; private DriverTypeEnum myDriverType; private String myDescription; @@ -50,8 +54,6 @@ public abstract class BaseTask { private List myExecutedStatements = new ArrayList<>(); private boolean myNoColumnShrink; private boolean myFailureAllowed; - private final String myProductVersion; - private final String mySchemaVersion; protected BaseTask(String theProductVersion, String theSchemaVersion) { myProductVersion = theProductVersion; @@ -82,9 +84,9 @@ public abstract class BaseTask { } @SuppressWarnings("unchecked") - public T setDescription(String theDescription) { + public BaseTask setDescription(String theDescription) { myDescription = theDescription; - return (T) this; + return this; } public List getExecutedStatements() { @@ -106,7 +108,9 @@ public abstract class BaseTask { JdbcTemplate jdbcTemplate = getConnectionProperties().newJdbcTemplate(); try { int changesCount = jdbcTemplate.update(theSql, theArguments); - logInfo(ourLog, "SQL \"{}\" returned {}", theSql, changesCount); + if (!"true".equals(System.getProperty("unit_test_mode"))) { + logInfo(ourLog, "SQL \"{}\" returned {}", theSql, changesCount); + } return changesCount; } catch (DataAccessException e) { if (myFailureAllowed) { @@ -151,7 +155,7 @@ public abstract class BaseTask { return getConnectionProperties().getTxTemplate(); } - public JdbcTemplate newJdbcTemnplate() { + public JdbcTemplate newJdbcTemplate() { return getConnectionProperties().newJdbcTemplate(); } @@ -192,11 +196,35 @@ public abstract class BaseTask { return myDoNothing; } - public BaseTask setDoNothing(boolean theDoNothing) { + public BaseTask setDoNothing(boolean theDoNothing) { myDoNothing = theDoNothing; return this; } + @Override + public final int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + generateHashCode(builder); + return builder.hashCode(); + } + + protected abstract void generateHashCode(HashCodeBuilder theBuilder); + + @Override + public final boolean equals(Object theObject) { + if (theObject == null || getClass().equals(theObject.getClass()) == false) { + return false; + } + @SuppressWarnings("unchecked") + BaseTask otherObject = (BaseTask) theObject; + + EqualsBuilder b = new EqualsBuilder(); + generateEquals(b, otherObject); + return b.isEquals(); + } + + protected abstract void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject); + public static class ExecutedStatement { private final String mySql; private final List myArguments; diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/CalculateHashesTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/CalculateHashesTask.java index 75ef31a94a2..c1310abd39b 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/CalculateHashesTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/CalculateHashesTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,21 +34,26 @@ import org.springframework.jdbc.core.RowCallbackHandler; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.*; -import java.util.concurrent.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.RejectedExecutionHandler; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; import java.util.function.Function; -public class CalculateHashesTask extends BaseTableColumnTask { +public class CalculateHashesTask extends BaseTableColumnTask { private static final Logger ourLog = LoggerFactory.getLogger(CalculateHashesTask.class); private int myBatchSize = 10000; private Map, Long>> myCalculators = new HashMap<>(); private ThreadPoolExecutor myExecutor; - public void setBatchSize(int theBatchSize) { - myBatchSize = theBatchSize; - } - /** * Constructor */ @@ -57,6 +62,16 @@ public class CalculateHashesTask extends BaseTableColumnTask { - JdbcTemplate jdbcTemplate = newJdbcTemnplate(); + JdbcTemplate jdbcTemplate = newJdbcTemplate(); jdbcTemplate.setMaxRows(100000); String sql = "SELECT * FROM " + getTableName() + " WHERE " + getColumnName() + " IS NULL"; logInfo(ourLog, "Finding up to {} rows in {} that requires hashes", myBatchSize, getTableName()); @@ -184,7 +199,7 @@ public class CalculateHashesTask extends BaseTableColumnTask { +public class DropColumnTask extends BaseTableColumnTask { private static final Logger ourLog = LoggerFactory.getLogger(DropColumnTask.class); diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropForeignKeyTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropForeignKeyTask.java index 0fe92666b69..33a78d4c29a 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropForeignKeyTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropForeignKeyTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ import java.util.Set; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public class DropForeignKeyTask extends BaseTableTask { +public class DropForeignKeyTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(DropForeignKeyTask.class); private String myConstraintName; @@ -81,6 +81,21 @@ public class DropForeignKeyTask extends BaseTableTask { } + @Override + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + DropForeignKeyTask otherObject = (DropForeignKeyTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(myConstraintName, otherObject.myConstraintName); + theBuilder.append(myParentTableName, otherObject.myParentTableName); + } + + @Override + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myConstraintName); + theBuilder.append(myParentTableName); + } + @Nonnull static List generateSql(String theTableName, String theConstraintName, DriverTypeEnum theDriverType) { List sqls = new ArrayList<>(); @@ -103,28 +118,4 @@ public class DropForeignKeyTask extends BaseTableTask { } return sqls; } - - @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - DropForeignKeyTask that = (DropForeignKeyTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myConstraintName, that.myConstraintName) - .append(myParentTableName, that.myParentTableName) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myConstraintName) - .append(myParentTableName) - .toHashCode(); - } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIdGeneratorTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIdGeneratorTask.java index dccce05f45f..1ab00b6c41e 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIdGeneratorTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIdGeneratorTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public class DropIdGeneratorTask extends BaseTask { +public class DropIdGeneratorTask extends BaseTask { private static final Logger ourLog = LoggerFactory.getLogger(DropIdGeneratorTask.class); private final String myGeneratorName; @@ -88,9 +88,9 @@ public class DropIdGeneratorTask extends BaseTask { if (isNotBlank(sql)) { Set sequenceNames = JdbcUtils.getSequenceNames(getConnectionProperties()) - .stream() - .map(String::toLowerCase) - .collect(Collectors.toSet()); + .stream() + .map(String::toLowerCase) + .collect(Collectors.toSet()); ourLog.debug("Currently have sequences: {}", sequenceNames); if (!sequenceNames.contains(myGeneratorName.toLowerCase())) { logInfo(ourLog, "Sequence {} does not exist - No action performed", myGeneratorName); @@ -103,22 +103,13 @@ public class DropIdGeneratorTask extends BaseTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof DropIdGeneratorTask)) return false; - - DropIdGeneratorTask that = (DropIdGeneratorTask) theO; - - return new EqualsBuilder() - .append(myGeneratorName, that.myGeneratorName) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + DropIdGeneratorTask otherObject = (DropIdGeneratorTask) theOtherObject; + theBuilder.append(myGeneratorName, otherObject.myGeneratorName); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(myGeneratorName) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(myGeneratorName); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIndexTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIndexTask.java index 21b80a972d3..6053b4112a7 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIndexTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropIndexTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import java.util.Collections; import java.util.List; import java.util.Set; -public class DropIndexTask extends BaseTableTask { +public class DropIndexTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(DropIndexTask.class); private String myIndexName; @@ -78,6 +78,19 @@ public class DropIndexTask extends BaseTableTask { return this; } + @Override + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + DropIndexTask otherObject = (DropIndexTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(myIndexName, otherObject.myIndexName); + } + + @Override + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myIndexName); + } + static List createDropIndexSql(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName, String theIndexName, DriverTypeEnum theDriverType) throws SQLException { Validate.notBlank(theIndexName, "theIndexName must not be blank"); Validate.notBlank(theTableName, "theTableName must not be blank"); @@ -130,26 +143,4 @@ public class DropIndexTask extends BaseTableTask { } return sql; } - - @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - DropIndexTask that = (DropIndexTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myIndexName, that.myIndexName) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myIndexName) - .toHashCode(); - } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropTableTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropTableTask.java index a5c33b4683a..3d9eb3b4fcf 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropTableTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/DropTableTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ import java.sql.SQLException; import java.util.List; import java.util.Set; -public class DropTableTask extends BaseTableTask { +public class DropTableTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(DropTableTask.class); diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java index 04c06fe33ea..1a10bb95729 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -public class ExecuteRawSqlTask extends BaseTask { +public class ExecuteRawSqlTask extends BaseTask { private static final Logger ourLog = LoggerFactory.getLogger(ExecuteRawSqlTask.class); private Map> myDriverToSqls = new HashMap<>(); @@ -80,22 +80,15 @@ public class ExecuteRawSqlTask extends BaseTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (!(theO instanceof ExecuteRawSqlTask)) return false; - - ExecuteRawSqlTask that = (ExecuteRawSqlTask) theO; - - return new EqualsBuilder() - .append(myDriverNeutralSqls, that.myDriverNeutralSqls) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + ExecuteRawSqlTask otherObject = (ExecuteRawSqlTask) theOtherObject; + theBuilder.append(myDriverNeutralSqls, otherObject.myDriverNeutralSqls); + theBuilder.append(myDriverToSqls, otherObject.myDriverToSqls); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(myDriverNeutralSqls) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(myDriverNeutralSqls); + theBuilder.append(myDriverToSqls); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTask.java index c3b1f0832db..3a2f28c6474 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,14 +32,15 @@ import java.sql.SQLException; import java.util.List; import java.util.Set; -public class InitializeSchemaTask extends BaseTask { +public class InitializeSchemaTask extends BaseTask { private static final Logger ourLog = LoggerFactory.getLogger(InitializeSchemaTask.class); + private final ISchemaInitializationProvider mySchemaInitializationProvider; public InitializeSchemaTask(String theProductVersion, String theSchemaVersion, ISchemaInitializationProvider theSchemaInitializationProvider) { super(theProductVersion, theSchemaVersion); mySchemaInitializationProvider = theSchemaInitializationProvider; - setDescription("Initialize schema"); + setDescription("Initialize schema for " + mySchemaInitializationProvider.getSchemaDescription()); } @Override @@ -58,32 +59,29 @@ public class InitializeSchemaTask extends BaseTask { return; } - logInfo(ourLog, "Initializing schema for {}", driverType); + logInfo(ourLog, "Initializing {} schema for {}", driverType, mySchemaInitializationProvider.getSchemaDescription()); List sqlStatements = mySchemaInitializationProvider.getSqlStatements(driverType); for (String nextSql : sqlStatements) { executeSql(null, nextSql); } + + logInfo(ourLog, "{} schema for {} initialized successfully", driverType, mySchemaInitializationProvider.getSchemaDescription()); } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - InitializeSchemaTask that = (InitializeSchemaTask) theO; - - return new EqualsBuilder() - .append(mySchemaInitializationProvider, that.mySchemaInitializationProvider) - .isEquals(); + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + InitializeSchemaTask otherObject = (InitializeSchemaTask) theOtherObject; + theBuilder.append(mySchemaInitializationProvider, otherObject.mySchemaInitializationProvider); } @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(mySchemaInitializationProvider) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + theBuilder.append(mySchemaInitializationProvider); + } + + public ISchemaInitializationProvider getSchemaInitializationProvider() { + return mySchemaInitializationProvider; } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ModifyColumnTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ModifyColumnTask.java index fb24e1c492a..2b6033a0be9 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ModifyColumnTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ModifyColumnTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory; import java.sql.SQLException; import java.util.Set; -public class ModifyColumnTask extends BaseTableColumnTypeTask { +public class ModifyColumnTask extends BaseTableColumnTypeTask { private static final Logger ourLog = LoggerFactory.getLogger(ModifyColumnTask.class); diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameColumnTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameColumnTask.java index a3c80db70da..22ae7c2bcc6 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameColumnTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameColumnTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ package ca.uhn.fhir.jpa.migrate.taskdef; import ca.uhn.fhir.jpa.migrate.JdbcUtils; import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,7 +31,7 @@ import org.springframework.jdbc.core.JdbcTemplate; import java.sql.SQLException; import java.util.Set; -public class RenameColumnTask extends BaseTableTask { +public class RenameColumnTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(RenameColumnTask.class); private String myOldName; @@ -137,30 +136,9 @@ public class RenameColumnTask extends BaseTableTask { } @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - RenameColumnTask that = (RenameColumnTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myIsOkayIfNeitherColumnExists, that.myIsOkayIfNeitherColumnExists) - .append(myDeleteTargetColumnFirstIfBothExist, that.myDeleteTargetColumnFirstIfBothExist) - .append(myOldName, that.myOldName) - .append(myNewName, that.myNewName) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myOldName) - .append(myNewName) - .append(myIsOkayIfNeitherColumnExists) - .append(myDeleteTargetColumnFirstIfBothExist) - .toHashCode(); + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myOldName); + theBuilder.append(myNewName); } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameIndexTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameIndexTask.java index ad6852fa3ad..630733ef3f2 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameIndexTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/RenameIndexTask.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import java.util.Collections; import java.util.List; import java.util.Set; -public class RenameIndexTask extends BaseTableTask { +public class RenameIndexTask extends BaseTableTask { private static final Logger ourLog = LoggerFactory.getLogger(RenameIndexTask.class); private String myOldIndexName; private String myNewIndexName; @@ -81,6 +81,21 @@ public class RenameIndexTask extends BaseTableTask { return this; } + @Override + protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) { + RenameIndexTask otherObject = (RenameIndexTask) theOtherObject; + super.generateEquals(theBuilder, otherObject); + theBuilder.append(myOldIndexName, otherObject.myOldIndexName); + theBuilder.append(myNewIndexName, otherObject.myNewIndexName); + } + + @Override + protected void generateHashCode(HashCodeBuilder theBuilder) { + super.generateHashCode(theBuilder); + theBuilder.append(myOldIndexName); + theBuilder.append(myNewIndexName); + } + static List createRenameIndexSql(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName, String theOldIndexName, String theNewIndexName, DriverTypeEnum theDriverType) throws SQLException { Validate.notBlank(theOldIndexName, "theOldIndexName must not be blank"); Validate.notBlank(theNewIndexName, "theNewIndexName must not be blank"); @@ -110,28 +125,4 @@ public class RenameIndexTask extends BaseTableTask { } return sql; } - - @Override - public boolean equals(Object theO) { - if (this == theO) return true; - - if (theO == null || getClass() != theO.getClass()) return false; - - RenameIndexTask that = (RenameIndexTask) theO; - - return new EqualsBuilder() - .appendSuper(super.equals(theO)) - .append(myOldIndexName, that.myOldIndexName) - .append(myNewIndexName, that.myNewIndexName) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .appendSuper(super.hashCode()) - .append(myOldIndexName) - .append(myNewIndexName) - .toHashCode(); - } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java index 542931d9c33..b6df9abad7f 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.tasks; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,11 +56,29 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { init360(); // 20180918 - 20181112 init400(); // 20190401 - 20190814 init410(); // 20190815 - 20191014 - init420(); // 20191015 - present + init420(); // 20191015 - 20200217 + init430(); // 20200218 - present } - protected void init420() { // 20191015 - present + protected void init430() { // 20200218 - present + Builder version = forVersion(VersionEnum.V4_3_0); + + // Eliminate circular dependency. + version.onTable("HFJ_RESOURCE").dropColumn("20200218.1", "FORCED_ID_PID"); + version.onTable("HFJ_RES_VER").dropColumn("20200218.2", "FORCED_ID_PID"); + version.onTable("HFJ_RES_VER").addForeignKey("20200218.3", "FK_RESOURCE_HISTORY_RESOURCE").toColumn("RES_ID").references("HFJ_RESOURCE", "RES_ID"); + version.onTable("HFJ_RES_VER").modifyColumn("20200220.1", "RES_ID").nonNullable().failureAllowed().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); + } + + protected void init420() { // 20191015 - 20200217 Builder version = forVersion(VersionEnum.V4_2_0); + + // TermValueSetConceptDesignation + version.onTable("TRM_VALUESET_C_DESIGNATION").dropIndex("20200202.1", "IDX_VALUESET_C_DSGNTN_VAL").failureAllowed(); + Builder.BuilderWithTableName searchTable = version.onTable("HFJ_SEARCH"); + searchTable.dropIndex("20200203.1", "IDX_SEARCH_LASTRETURNED"); + searchTable.dropColumn("20200203.2", "SEARCH_LAST_RETURNED"); + searchTable.addIndex("20200203.3", "IDX_SEARCH_CREATED").unique(false).withColumns("CREATED"); } protected void init410() { // 20190815 - 20191014 @@ -883,10 +901,10 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { } - private void init330() { // 20180114 - 20180329 + protected void init330() { // 20180114 - 20180329 Builder version = forVersion(VersionEnum.V3_3_0); - version.initializeSchema("20180115.0", new SchemaInitializationProvider("/ca/uhn/hapi/fhir/jpa/docs/database", "HFJ_RESOURCE")); + version.initializeSchema("20180115.0", new SchemaInitializationProvider("HAPI FHIR", "/ca/uhn/hapi/fhir/jpa/docs/database", "HFJ_RESOURCE")); Builder.BuilderWithTableName hfjResource = version.onTable("HFJ_RESOURCE"); version.startSectionWithMessage("Starting work on table: " + hfjResource.getTableName()); diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/SchemaInitializationProvider.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/SchemaInitializationProvider.java index 30db7c29569..262dbb576af 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/SchemaInitializationProvider.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/SchemaInitializationProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.tasks; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,14 +37,17 @@ import static org.apache.commons.lang3.StringUtils.isBlank; public class SchemaInitializationProvider implements ISchemaInitializationProvider { - private final String mySchemaFileClassPath; + private String mySchemaFileClassPath; + + private String mySchemaDescription; private final String mySchemaExistsIndicatorTable; /** * @param theSchemaFileClassPath pathname to script used to initialize schema * @param theSchemaExistsIndicatorTable a table name we can use to determine if this schema has already been initialized */ - public SchemaInitializationProvider(String theSchemaFileClassPath, String theSchemaExistsIndicatorTable) { + public SchemaInitializationProvider(String theSchemaDescription, String theSchemaFileClassPath, String theSchemaExistsIndicatorTable) { + mySchemaDescription = theSchemaDescription; mySchemaFileClassPath = theSchemaFileClassPath; mySchemaExistsIndicatorTable = theSchemaExistsIndicatorTable; } @@ -110,5 +113,21 @@ public class SchemaInitializationProvider implements ISchemaInitializationProvid public String getSchemaExistsIndicatorTable() { return mySchemaExistsIndicatorTable; } + + public SchemaInitializationProvider setSchemaFileClassPath(String theSchemaFileClassPath) { + mySchemaFileClassPath = theSchemaFileClassPath; + return this; + } + + @Override + public String getSchemaDescription() { + return mySchemaDescription; + } + + @Override + public SchemaInitializationProvider setSchemaDescription(String theSchemaDescription) { + mySchemaDescription = theSchemaDescription; + return this; + } } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/BaseMigrationTasks.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/BaseMigrationTasks.java index bf197f78138..7198767ee0e 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/BaseMigrationTasks.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/BaseMigrationTasks.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.tasks.api; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,6 +81,13 @@ public class BaseMigrationTasks { return retval; } + protected BaseTask getTaskWithVersion(String theFlywayVersion) { + return myTasks.values().stream() + .filter(task -> theFlywayVersion.equals(task.getFlywayVersion())) + .findFirst() + .get(); + } + void validate(Collection theTasks) { for (BaseTask task: theTasks) { task.validateVersion(); diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/Builder.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/Builder.java index 6d5506bdb9c..82cbdf4e6c0 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/Builder.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/Builder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.tasks.api; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,9 +50,10 @@ public class Builder { return new BuilderAddTableRawSql(theVersion, theTableName); } - public Builder executeRawSql(String theVersion, @Language("SQL") String theSql) { - mySink.addTask(new ExecuteRawSqlTask(myRelease, theVersion).addSql(theSql)); - return this; + public BuilderCompleteTask executeRawSql(String theVersion, @Language("SQL") String theSql) { + ExecuteRawSqlTask task = new ExecuteRawSqlTask(myRelease, theVersion).addSql(theSql); + mySink.addTask(task); + return new BuilderCompleteTask(task); } public Builder initializeSchema(String theVersion, ISchemaInitializationProvider theSchemaInitializationProvider) { @@ -60,6 +61,7 @@ public class Builder { return this; } + @SuppressWarnings("unused") public Builder initializeSchema(String theVersion, String theSchemaName, ISchemaInitializationProvider theSchemaInitializationProvider) { InitializeSchemaTask task = new InitializeSchemaTask(myRelease, theVersion, theSchemaInitializationProvider); task.setDescription("Initialize " + theSchemaName + " schema"); @@ -72,6 +74,7 @@ public class Builder { return this; } + // Flyway doesn't support these kinds of migrations @Deprecated public Builder startSectionWithMessage(String theMessage) { @@ -156,20 +159,22 @@ public class Builder { return myTableName; } - public void dropIndex(String theVersion, String theIndexName) { - dropIndexOptional(false, theVersion, theIndexName); + public BuilderCompleteTask dropIndex(String theVersion, String theIndexName) { + BaseTask task = dropIndexOptional(false, theVersion, theIndexName); + return new BuilderCompleteTask(task); } public void dropIndexStub(String theVersion, String theIndexName) { dropIndexOptional(true, theVersion, theIndexName); } - private void dropIndexOptional(boolean theDoNothing, String theVersion, String theIndexName) { + private DropIndexTask dropIndexOptional(boolean theDoNothing, String theVersion, String theIndexName) { DropIndexTask task = new DropIndexTask(myRelease, theVersion); task.setIndexName(theIndexName); task.setTableName(myTableName); task.setDoNothing(theDoNothing); addTask(task); + return task; } public void renameIndex(String theVersion, String theOldIndexName, String theNewIndexName) { @@ -213,7 +218,7 @@ public class Builder { @Override public void addTask(BaseTask theTask) { - ((BaseTableTask) theTask).setTableName(myTableName); + ((BaseTableTask) theTask).setTableName(myTableName); mySink.addTask(theTask); } @@ -284,11 +289,12 @@ public class Builder { withColumnsOptional(true, theColumnNames); } - public void withColumns(String... theColumnNames) { - withColumnsOptional(false, theColumnNames); + public BuilderCompleteTask withColumns(String... theColumnNames) { + BaseTask task = withColumnsOptional(false, theColumnNames); + return new BuilderCompleteTask(task); } - private void withColumnsOptional(boolean theDoNothing, String... theColumnNames) { + private AddIndexTask withColumnsOptional(boolean theDoNothing, String... theColumnNames) { AddIndexTask task = new AddIndexTask(myRelease, myVersion); task.setTableName(myTableName); task.setIndexName(myIndexName); @@ -296,6 +302,7 @@ public class Builder { task.setColumns(theColumnNames); task.setDoNothing(theDoNothing); addTask(task); + return task; } } } @@ -395,7 +402,7 @@ public class Builder { } } - public static class BuilderAddColumnWithName { + public class BuilderAddColumnWithName { private final String myRelease; private final String myVersion; private final String myColumnName; @@ -427,11 +434,11 @@ public class Builder { myNullable = theNullable; } - public void type(AddColumnTask.ColumnTypeEnum theColumnType) { - type(theColumnType, null); + public BuilderCompleteTask type(AddColumnTask.ColumnTypeEnum theColumnType) { + return type(theColumnType, null); } - public void type(AddColumnTask.ColumnTypeEnum theColumnType, Integer theLength) { + public BuilderCompleteTask type(AddColumnTask.ColumnTypeEnum theColumnType, Integer theLength) { AddColumnTask task = new AddColumnTask(myRelease, myVersion); task.setColumnName(myColumnName); task.setNullable(myNullable); @@ -440,9 +447,33 @@ public class Builder { task.setColumnLength(theLength); } myTaskSink.addTask(task); + + return new BuilderCompleteTask(task); } + } } } + + public static class BuilderCompleteTask { + + private final BaseTask myTask; + + public BuilderCompleteTask(BaseTask theTask) { + myTask = theTask; + } + + public BuilderCompleteTask failureAllowed() { + myTask.setFailureAllowed(true); + return this; + } + + public BuilderCompleteTask doNothing() { + myTask.setDoNothing(true); + return this; + } + + } + } diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/ISchemaInitializationProvider.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/ISchemaInitializationProvider.java index 1dd3a8370cf..1be30796e25 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/ISchemaInitializationProvider.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/api/ISchemaInitializationProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.migrate.tasks.api; * #%L * HAPI FHIR JPA Server - Migration * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,12 @@ import ca.uhn.fhir.jpa.migrate.DriverTypeEnum; import java.util.List; public interface ISchemaInitializationProvider { + List getSqlStatements(DriverTypeEnum theDriverType); String getSchemaExistsIndicatorTable(); + + String getSchemaDescription(); + + ISchemaInitializationProvider setSchemaDescription(String theSchemaDescription); } diff --git a/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTest.java b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTest.java index 892b14d08b0..23bd61a2b8b 100644 --- a/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTest.java +++ b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/AddColumnTest.java @@ -1,13 +1,20 @@ package ca.uhn.fhir.jpa.migrate.taskdef; import ca.uhn.fhir.jpa.migrate.JdbcUtils; +import ca.uhn.fhir.jpa.migrate.tasks.api.BaseMigrationTasks; +import ca.uhn.fhir.jpa.migrate.tasks.api.Builder; +import ca.uhn.fhir.util.VersionEnum; +import org.flywaydb.core.internal.command.DbMigrate; import org.junit.Test; import java.sql.SQLException; +import java.util.Set; +import java.util.stream.Collectors; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; public class AddColumnTest extends BaseTest { @@ -58,4 +65,41 @@ public class AddColumnTest extends BaseTest { assertThat(JdbcUtils.getColumnNames(getConnectionProperties(), "SOMETABLE"), containsInAnyOrder("PID", "TEXTCOL", "NEWCOL")); } + + @Test + public void testAddColumnToNonExistantTable_Failing() { + BaseMigrationTasks tasks = new BaseMigrationTasks<>(); + tasks + .forVersion(VersionEnum.V4_0_0) + .onTable("FOO_TABLE") + .addColumn("2001.01", "FOO_COLUMN") + .nullable() + .type(BaseTableColumnTypeTask.ColumnTypeEnum.INT); + + getMigrator().addTasks(tasks.getTasks(VersionEnum.V0_1, VersionEnum.V4_0_0)); + try { + getMigrator().migrate(); + fail(); + } catch (DbMigrate.FlywayMigrateException e) { + assertEquals("Migration failed !", e.getMessage()); + } + } + + + @Test + public void testAddColumnToNonExistantTable_FailureAllowed() { + BaseMigrationTasks tasks = new BaseMigrationTasks<>(); + tasks + .forVersion(VersionEnum.V4_0_0) + .onTable("FOO_TABLE") + .addColumn("2001.01", "FOO_COLUMN") + .nullable() + .type(BaseTableColumnTypeTask.ColumnTypeEnum.INT) + .failureAllowed(); + + getMigrator().addTasks(tasks.getTasks(VersionEnum.V0_1, VersionEnum.V4_0_0)); + getMigrator().migrate(); + + } + } diff --git a/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTaskTest.java b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTaskTest.java new file mode 100644 index 00000000000..96ec78d6aa6 --- /dev/null +++ b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTaskTest.java @@ -0,0 +1,48 @@ +package ca.uhn.fhir.jpa.migrate.taskdef; + +import ca.uhn.fhir.jpa.migrate.tasks.api.BaseMigrationTasks; +import ca.uhn.fhir.util.VersionEnum; +import org.junit.Test; + +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class ExecuteRawSqlTaskTest extends BaseTest { + + @Test + public void testExecuteSql() { + executeSql("create table SOMETABLE (PID bigint not null, TEXTCOL varchar(255))"); + + BaseMigrationTasks tasks = new BaseMigrationTasks<>(); + tasks + .forVersion(VersionEnum.V4_0_0) + .executeRawSql("2001.01", "INSERT INTO SOMETABLE (PID, TEXTCOL) VALUES (123, 'abc')"); + + getMigrator().addTasks(tasks.getTasks(VersionEnum.V0_1, VersionEnum.V4_0_0)); + getMigrator().migrate(); + + List> output = executeQuery("SELECT PID FROM SOMETABLE"); + assertEquals(1, output.size()); + assertEquals(123L, output.get(0).get("PID")); + } + + @Test + public void testExecuteSql_AllowedToFail() { + executeSql("create table SOMETABLE (PID bigint not null, TEXTCOL varchar(255))"); + + BaseMigrationTasks tasks = new BaseMigrationTasks<>(); + tasks + .forVersion(VersionEnum.V4_0_0) + .executeRawSql("2001.01", "INSERT INTO SOMETABLE (PID_BAD_COLUMN, TEXTCOL) VALUES (123, 'abc')") + .failureAllowed(); + + getMigrator().addTasks(tasks.getTasks(VersionEnum.V0_1, VersionEnum.V4_0_0)); + getMigrator().migrate(); + + List> output = executeQuery("SELECT PID FROM SOMETABLE"); + assertEquals(0, output.size()); + } + +} diff --git a/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTaskTest.java b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTaskTest.java index a55cd045f9d..c65bcb06006 100644 --- a/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTaskTest.java +++ b/hapi-fhir-jpaserver-migrate/src/test/java/ca/uhn/fhir/jpa/migrate/taskdef/InitializeSchemaTaskTest.java @@ -40,6 +40,16 @@ public class InitializeSchemaTaskTest extends BaseTest { return "DONT_MATCH_ME"; } + @Override + public String getSchemaDescription() { + return "TEST"; + } + + @Override + public ISchemaInitializationProvider setSchemaDescription(String theSchemaDescription) { + return this; + } + @Override public boolean equals(Object theO) { if (this == theO) return true; diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 123f22b7a3a..a1cce679076 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/api/IDaoRegistry.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/api/IDaoRegistry.java index ef560576c70..9ed9a5869eb 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/api/IDaoRegistry.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/api/IDaoRegistry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.api; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyBundle.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyBundle.java deleted file mode 100644 index c886a116177..00000000000 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyBundle.java +++ /dev/null @@ -1,110 +0,0 @@ -package ca.uhn.fhir.jpa.model.any; - -/*- - * #%L - * HAPI FHIR Model - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseBundle; -import org.hl7.fhir.instance.model.api.IBaseResource; - -public class AnyBundle { - private final FhirVersionEnum myFhirVersion; - private final IBaseBundle myBundle; - - public static AnyBundle fromFhirContext(FhirContext theFhirContext) { - FhirVersionEnum version = theFhirContext.getVersion().getVersion(); - switch (version) { - case DSTU2: - return new AnyBundle(new ca.uhn.fhir.model.dstu2.resource.Bundle()); - case DSTU3: - return new AnyBundle(new org.hl7.fhir.dstu3.model.Bundle()); - case R4: - return new AnyBundle(new org.hl7.fhir.r4.model.Bundle()); - default: - throw new UnsupportedOperationException(version + " not supported"); - } - } - - public AnyBundle(ca.uhn.fhir.model.dstu2.resource.Bundle theBundleR2) { - myFhirVersion = FhirVersionEnum.DSTU2; - myBundle = theBundleR2; - } - - public AnyBundle(org.hl7.fhir.dstu3.model.Bundle theBundleR3) { - myFhirVersion = FhirVersionEnum.DSTU3; - myBundle = theBundleR3; - } - - public AnyBundle(org.hl7.fhir.r4.model.Bundle theBundleR4) { - myFhirVersion = FhirVersionEnum.R4; - myBundle = theBundleR4; - } - - public static AnyBundle fromResource(IBaseResource theBundle) { - if (theBundle instanceof ca.uhn.fhir.model.dstu2.resource.Bundle) { - return new AnyBundle((ca.uhn.fhir.model.dstu2.resource.Bundle) theBundle); - } else if (theBundle instanceof org.hl7.fhir.dstu3.model.Bundle) { - return new AnyBundle((org.hl7.fhir.dstu3.model.Bundle) theBundle); - } else if (theBundle instanceof org.hl7.fhir.r4.model.Bundle) { - return new AnyBundle((org.hl7.fhir.r4.model.Bundle) theBundle); - } else { - throw new UnsupportedOperationException("Cannot convert " + theBundle.getClass().getName() + " to AnyBundle"); - } - } - - public IBaseBundle get() { - return myBundle; - } - - public ca.uhn.fhir.model.dstu2.resource.Bundle getDstu2() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU2); - return (ca.uhn.fhir.model.dstu2.resource.Bundle) get(); - } - - public org.hl7.fhir.dstu3.model.Bundle getDstu3() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU3); - return (org.hl7.fhir.dstu3.model.Bundle) get(); - } - - public org.hl7.fhir.r4.model.Bundle getR4() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.R4); - return (org.hl7.fhir.r4.model.Bundle) get(); - } - - public void addResource(IBaseResource theResource) { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent entry = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); - entry.setResource((org.hl7.fhir.dstu3.model.Resource) theResource); - getDstu3().getEntry().add(entry); - break; - case R4: - org.hl7.fhir.r4.model.Bundle.BundleEntryComponent entryr4 = new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent(); - entryr4.setResource((org.hl7.fhir.r4.model.Resource) theResource); - getR4().getEntry().add(entryr4); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - - } -} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyComposition.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyComposition.java deleted file mode 100644 index 4105d7e7de1..00000000000 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyComposition.java +++ /dev/null @@ -1,235 +0,0 @@ -package ca.uhn.fhir.jpa.model.any; - -/*- - * #%L - * HAPI FHIR Model - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.List; - -public class AnyComposition { - private final FhirVersionEnum myFhirVersion; - private final IBaseResource myComposition; - - public static AnyComposition fromFhirContext(FhirContext theFhirContext) { - FhirVersionEnum version = theFhirContext.getVersion().getVersion(); - switch (version) { - case DSTU3: - return new AnyComposition(new org.hl7.fhir.dstu3.model.Composition()); - case R4: - return new AnyComposition(new org.hl7.fhir.r4.model.Composition()); - default: - throw new UnsupportedOperationException(version + " not supported"); - } - } - - public AnyComposition(org.hl7.fhir.dstu3.model.Composition theCompositionR3) { - myFhirVersion = FhirVersionEnum.DSTU3; - myComposition = theCompositionR3; - } - - public AnyComposition(org.hl7.fhir.r4.model.Composition theCompositionR4) { - myFhirVersion = FhirVersionEnum.R4; - myComposition = theCompositionR4; - } - - public static AnyComposition fromResource(IBaseResource theComposition) { - if (theComposition instanceof org.hl7.fhir.dstu3.model.Composition) { - return new AnyComposition((org.hl7.fhir.dstu3.model.Composition) theComposition); - } else if (theComposition instanceof org.hl7.fhir.r4.model.Composition) { - return new AnyComposition((org.hl7.fhir.r4.model.Composition) theComposition); - } else { - throw new UnsupportedOperationException("Cannot convert " + theComposition.getClass().getName() + " to AnyList"); - } - } - - public IBaseResource get() { - return myComposition; - } - - public org.hl7.fhir.dstu3.model.Composition getDstu3() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU3); - return (org.hl7.fhir.dstu3.model.Composition) get(); - } - - public org.hl7.fhir.r4.model.Composition getR4() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.R4); - return (org.hl7.fhir.r4.model.Composition) get(); - } - - public void setIdentifier(String theSystem, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setIdentifier(new org.hl7.fhir.dstu3.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - case R4: - getR4().setIdentifier(new org.hl7.fhir.r4.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getIdentifier() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getIdentifier().getValue(); - case R4: - return getR4().getIdentifier().getValue(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setClass(String theSystem, String theCode) { - switch (myFhirVersion) { - case DSTU3: - setClassDstu3(theSystem, theCode); - break; - case R4: - setClassR4(theSystem, theCode); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private void setClassDstu3(String theSystem, String theCode) { - org.hl7.fhir.dstu3.model.CodeableConcept codeableConcept = new org.hl7.fhir.dstu3.model.CodeableConcept(); - codeableConcept.addCoding().setSystem(theSystem).setCode(theCode); - getDstu3().setClass_(codeableConcept); - } - - private void setClassR4(String theSystem, String theCode) { - org.hl7.fhir.r4.model.CodeableConcept codeableConcept = new org.hl7.fhir.r4.model.CodeableConcept(); - codeableConcept.addCoding().setSystem(theSystem).setCode(theCode); - getR4().addCategory(codeableConcept); - } - - public void addStringExtension(String theUrl, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.dstu3.model.StringType(theValue)); - break; - case R4: - getR4().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.r4.model.StringType(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - // TODO KHS Consolidate with other classes in this package - public String getStringExtensionValueOrNull(String theUrl) { - switch (myFhirVersion) { - case DSTU3: - return getStringExtensionValueOrNullDstu3(theUrl); - case R4: - return getStringExtensionValueOrNullR4(theUrl); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private String getStringExtensionValueOrNullDstu3(String theUrl) { - List targetTypes = getDstu3().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.dstu3.model.StringType targetType = (org.hl7.fhir.dstu3.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - private String getStringExtensionValueOrNullR4(String theUrl) { - List targetTypes = getR4().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.r4.model.StringType targetType = (org.hl7.fhir.r4.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - public void setSubject(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setSubject(new org.hl7.fhir.dstu3.model.Reference(theReferenceId)); - break; - case R4: - getR4().setSubject(new org.hl7.fhir.r4.model.Reference(theReferenceId)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setTitle(String theTitle) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setTitle(theTitle); - break; - case R4: - getR4().setTitle(theTitle); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getTitle() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getTitle(); - case R4: - return getR4().getTitle(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addEntry(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().getSectionFirstRep().addEntry(new org.hl7.fhir.dstu3.model.Reference(theReferenceId)); - break; - case R4: - getR4().getSectionFirstRep().addEntry(new org.hl7.fhir.r4.model.Reference(theReferenceId)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setRandomUuid() { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setId(org.hl7.fhir.dstu3.model.IdType.newRandomUuid()); - break; - case R4: - getR4().setId(org.hl7.fhir.r4.model.IdType.newRandomUuid()); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - - } -} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyListResource.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyListResource.java deleted file mode 100644 index 9ba10073f52..00000000000 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyListResource.java +++ /dev/null @@ -1,361 +0,0 @@ -package ca.uhn.fhir.jpa.model.any; - -/*- - * #%L - * HAPI FHIR Model - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.rest.param.TokenParam; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseReference; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.List; -import java.util.stream.Stream; - -public class AnyListResource { - private final FhirVersionEnum myFhirVersion; - private final IBaseResource myListResource; - - public static AnyListResource fromFhirContext(FhirContext theFhirContext) { - FhirVersionEnum version = theFhirContext.getVersion().getVersion(); - switch (version) { - case DSTU2: - return new AnyListResource(new ca.uhn.fhir.model.dstu2.resource.ListResource()); - case DSTU3: - return new AnyListResource(new org.hl7.fhir.dstu3.model.ListResource()); - case R4: - return new AnyListResource(new org.hl7.fhir.r4.model.ListResource()); - case R5: - return new AnyListResource(new org.hl7.fhir.r5.model.ListResource()); - default: - throw new UnsupportedOperationException(version + " not supported"); - } - } - - public AnyListResource(ca.uhn.fhir.model.dstu2.resource.ListResource theListResourceR2) { - myFhirVersion = FhirVersionEnum.DSTU2; - myListResource = theListResourceR2; - } - - public AnyListResource(org.hl7.fhir.dstu3.model.ListResource theListResourceR3) { - myFhirVersion = FhirVersionEnum.DSTU3; - myListResource = theListResourceR3; - } - - public AnyListResource(org.hl7.fhir.r4.model.ListResource theListResourceR4) { - myFhirVersion = FhirVersionEnum.R4; - myListResource = theListResourceR4; - } - - public AnyListResource(org.hl7.fhir.r5.model.ListResource theListResourceR5) { - myFhirVersion = FhirVersionEnum.R5; - myListResource = theListResourceR5; - } - - public static AnyListResource fromResource(IBaseResource theListResource) { - if (theListResource instanceof ca.uhn.fhir.model.dstu2.resource.ListResource) { - return new AnyListResource((ca.uhn.fhir.model.dstu2.resource.ListResource) theListResource); - } else if (theListResource instanceof org.hl7.fhir.dstu3.model.ListResource) { - return new AnyListResource((org.hl7.fhir.dstu3.model.ListResource) theListResource); - } else if (theListResource instanceof org.hl7.fhir.r4.model.ListResource) { - return new AnyListResource((org.hl7.fhir.r4.model.ListResource) theListResource); - } else if (theListResource instanceof org.hl7.fhir.r5.model.ListResource) { - return new AnyListResource((org.hl7.fhir.r5.model.ListResource) theListResource); - } else { - throw new UnsupportedOperationException("Cannot convert " + theListResource.getClass().getName() + " to AnyList"); - } - } - - public IBaseResource get() { - return myListResource; - } - - public ca.uhn.fhir.model.dstu2.resource.ListResource getDstu2() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU2); - return (ca.uhn.fhir.model.dstu2.resource.ListResource) get(); - } - - public org.hl7.fhir.dstu3.model.ListResource getDstu3() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU3); - return (org.hl7.fhir.dstu3.model.ListResource) get(); - } - - public org.hl7.fhir.r4.model.ListResource getR4() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.R4); - return (org.hl7.fhir.r4.model.ListResource) get(); - } - - public org.hl7.fhir.r5.model.ListResource getR5() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.R5); - return (org.hl7.fhir.r5.model.ListResource) get(); - } - - public FhirVersionEnum getFhirVersion() { - return myFhirVersion; - } - - public void addCode(String theSystem, String theCode) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().getCode().addCoding().setSystem(theSystem).setCode(theCode); - break; - case R4: - getR4().getCode().addCoding().setSystem(theSystem).setCode(theCode); - break; - case R5: - getR5().getCode().addCoding().setSystem(theSystem).setCode(theCode); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addIdentifier(String theSystem, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().getIdentifier().add(new org.hl7.fhir.dstu3.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - case R4: - getR4().getIdentifier().add(new org.hl7.fhir.r4.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - case R5: - getR5().getIdentifier().add(new org.hl7.fhir.r5.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addStringExtension(String theUrl, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.dstu3.model.StringType(theValue)); - break; - case R4: - getR4().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.r4.model.StringType(theValue)); - break; - case R5: - getR5().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.r5.model.StringType(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getStringExtensionValueOrNull(String theUrl) { - switch (myFhirVersion) { - case DSTU3: - return getStringExtensionValueOrNullDstu3(theUrl); - case R4: - return getStringExtensionValueOrNullR4(theUrl); - case R5: - return getStringExtensionValueOrNullR5(theUrl); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private String getStringExtensionValueOrNullDstu3(String theUrl) { - List targetTypes = getDstu3().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.dstu3.model.StringType targetType = (org.hl7.fhir.dstu3.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - private String getStringExtensionValueOrNullR4(String theUrl) { - List targetTypes = getR4().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.r4.model.StringType targetType = (org.hl7.fhir.r4.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - private String getStringExtensionValueOrNullR5(String theUrl) { - List targetTypes = getR5().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.r5.model.StringType targetType = (org.hl7.fhir.r5.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - public void addReference(IBaseReference theReference) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().addEntry().setItem((org.hl7.fhir.dstu3.model.Reference) theReference); - break; - case R4: - getR4().addEntry().setItem((org.hl7.fhir.r4.model.Reference) theReference); - break; - case R5: - getR5().addEntry().setItem((org.hl7.fhir.r5.model.Reference) theReference); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addReference(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().addEntry().setItem(new org.hl7.fhir.dstu3.model.Reference(theReferenceId)); - break; - case R4: - getR4().addEntry().setItem(new org.hl7.fhir.r4.model.Reference(theReferenceId)); - break; - case R5: - getR5().addEntry().setItem(new org.hl7.fhir.r5.model.Reference(theReferenceId)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public Stream getReferenceStream() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getEntry().stream() - .map(entry -> entry.getItem().getReference()) - .map(reference -> new org.hl7.fhir.dstu3.model.IdType(reference).toUnqualifiedVersionless().getValue()); - case R4: - return getR4().getEntry().stream() - .map(entry -> entry.getItem().getReference()) - .map(reference -> new org.hl7.fhir.r4.model.IdType(reference).toUnqualifiedVersionless().getValue()); - case R5: - return getR5().getEntry().stream() - .map(entry -> entry.getItem().getReference()) - .map(reference -> new org.hl7.fhir.r5.model.IdType(reference).toUnqualifiedVersionless().getValue()); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public boolean removeItem(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - return removeItemDstu3(theReferenceId); - case R4: - return removeItemR4(theReferenceId); - case R5: - return removeItemR5(theReferenceId); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private boolean removeItemDstu3(String theReferenceId) { - boolean removed = false; - for (org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent entry : getDstu3().getEntry()) { - if (theReferenceId.equals(entry.getItem().getReference()) && !entry.getDeleted()) { - entry.setDeleted(true); - removed = true; - break; - } - } - - if (removed) { - getDstu3().getEntry().removeIf(entry -> entry.getDeleted()); - } - return removed; - } - - private boolean removeItemR4(String theReferenceId) { - boolean removed = false; - for (org.hl7.fhir.r4.model.ListResource.ListEntryComponent entry : getR4().getEntry()) { - if (theReferenceId.equals(entry.getItem().getReference()) && !entry.getDeleted()) { - entry.setDeleted(true); - removed = true; - break; - } - } - - if (removed) { - getR4().getEntry().removeIf(entry -> entry.getDeleted()); - } - return removed; - } - - private boolean removeItemR5(String theReferenceId) { - boolean removed = false; - for (org.hl7.fhir.r5.model.ListResource.ListEntryComponent entry : getR5().getEntry()) { - if (theReferenceId.equals(entry.getItem().getReference()) && !entry.getDeleted()) { - entry.setDeleted(true); - removed = true; - break; - } - } - - if (removed) { - getR5().getEntry().removeIf(entry -> entry.getDeleted()); - } - return removed; - } - - public TokenParam getCodeFirstRep() { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.Coding codingDstu3 = getDstu3().getCode().getCodingFirstRep(); - return new TokenParam(codingDstu3.getSystem(), codingDstu3.getCode()); - case R4: - org.hl7.fhir.r4.model.Coding codingR4 = getR4().getCode().getCodingFirstRep(); - return new TokenParam(codingR4.getSystem(), codingR4.getCode()); - case R5: - org.hl7.fhir.r5.model.Coding codingR5 = getR5().getCode().getCodingFirstRep(); - return new TokenParam(codingR5.getSystem(), codingR5.getCode()); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public TokenParam getIdentifierirstRep() { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.Identifier identDstu3 = getDstu3().getIdentifierFirstRep(); - return new TokenParam(identDstu3.getSystem(), identDstu3.getValue()); - case R4: - org.hl7.fhir.r4.model.Identifier identR4 = getR4().getIdentifierFirstRep(); - return new TokenParam(identR4.getSystem(), identR4.getValue()); - case R5: - org.hl7.fhir.r5.model.Identifier identR5 = getR5().getIdentifierFirstRep(); - return new TokenParam(identR5.getSystem(), identR5.getValue()); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - - - public boolean isEmpty() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getEntry().isEmpty(); - case R4: - return getR4().getEntry().isEmpty(); - case R5: - return getR5().getEntry().isEmpty(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } -} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyMeasure.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyMeasure.java deleted file mode 100644 index 1def38d9729..00000000000 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/any/AnyMeasure.java +++ /dev/null @@ -1,451 +0,0 @@ -package ca.uhn.fhir.jpa.model.any; - -/*- - * #%L - * HAPI FHIR Model - * %% - * Copyright (C) 2014 - 2019 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.rest.param.TokenParam; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseReference; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class AnyMeasure { - private final FhirVersionEnum myFhirVersion; - private final IBaseResource myMeasure; - - public static AnyMeasure fromFhirContext(FhirContext theFhirContext) { - FhirVersionEnum version = theFhirContext.getVersion().getVersion(); - switch (version) { - case DSTU3: - return new AnyMeasure(new org.hl7.fhir.dstu3.model.Measure()); - case R4: - return new AnyMeasure(new org.hl7.fhir.r4.model.Measure()); - default: - throw new UnsupportedOperationException(version + " not supported"); - } - } - - public AnyMeasure(org.hl7.fhir.dstu3.model.Measure theMeasureR3) { - myFhirVersion = FhirVersionEnum.DSTU3; - myMeasure = theMeasureR3; - } - - public AnyMeasure(org.hl7.fhir.r4.model.Measure theMeasureR4) { - myFhirVersion = FhirVersionEnum.R4; - myMeasure = theMeasureR4; - } - - public static AnyMeasure fromResource(IBaseResource theMeasure) { - if (theMeasure instanceof org.hl7.fhir.dstu3.model.Measure) { - return new AnyMeasure((org.hl7.fhir.dstu3.model.Measure) theMeasure); - } else if (theMeasure instanceof org.hl7.fhir.r4.model.Measure) { - return new AnyMeasure((org.hl7.fhir.r4.model.Measure) theMeasure); - } else { - throw new UnsupportedOperationException("Cannot convert " + theMeasure.getClass().getName() + " to AnyList"); - } - } - - public IBaseResource get() { - return myMeasure; - } - - public org.hl7.fhir.dstu3.model.Measure getDstu3() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.DSTU3); - return (org.hl7.fhir.dstu3.model.Measure) get(); - } - - public org.hl7.fhir.r4.model.Measure getR4() { - Validate.isTrue(myFhirVersion == FhirVersionEnum.R4); - return (org.hl7.fhir.r4.model.Measure) get(); - } - - public void addIdentifier(String theSystem, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().getIdentifier().add(new org.hl7.fhir.dstu3.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - case R4: - getR4().getIdentifier().add(new org.hl7.fhir.r4.model.Identifier().setSystem(theSystem).setValue(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addType(String theSystem, String theCode) { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.CodeableConcept codeableConcept = new org.hl7.fhir.dstu3.model.CodeableConcept(); - codeableConcept.addCoding().setSystem(theSystem).setCode(theCode); - getDstu3().getType().add(codeableConcept); - break; - case R4: - org.hl7.fhir.r4.model.CodeableConcept codeableConceptR4 = new org.hl7.fhir.r4.model.CodeableConcept(); - codeableConceptR4.addCoding().setSystem(theSystem).setCode(theCode); - getR4().getType().add(codeableConceptR4); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void addStringExtension(String theUrl, String theValue) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.dstu3.model.StringType(theValue)); - break; - case R4: - getR4().addExtension().setUrl(theUrl).setValue(new org.hl7.fhir.r4.model.StringType(theValue)); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getStringExtensionValueOrNull(String theUrl) { - switch (myFhirVersion) { - case DSTU3: - return getStringExtensionValueOrNullDstu3(theUrl); - case R4: - return getStringExtensionValueOrNullR4(theUrl); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private String getStringExtensionValueOrNullDstu3(String theUrl) { - List targetTypes = getDstu3().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.dstu3.model.StringType targetType = (org.hl7.fhir.dstu3.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - private String getStringExtensionValueOrNullR4(String theUrl) { - List targetTypes = getR4().getExtensionsByUrl(theUrl); - if (targetTypes.size() < 1) { - return null; - } - org.hl7.fhir.r4.model.StringType targetType = (org.hl7.fhir.r4.model.StringType) targetTypes.get(0).getValue(); - return targetType.getValue(); - } - - public String getIdentifierFirstRep() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getIdentifierFirstRep().getValue(); - case R4: - return getR4().getIdentifierFirstRep().getValue(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setComposedOf(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getRelatedArtifactDstu3(theReferenceId, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF); - break; - case R4: - getRelatedArtifactR4(theReferenceId, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private void getRelatedArtifactDstu3(String theReferenceId, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType theArtifactType) { - org.hl7.fhir.dstu3.model.RelatedArtifact artifact = new org.hl7.fhir.dstu3.model.RelatedArtifact(); - artifact.setType(theArtifactType); - artifact.setResource(new org.hl7.fhir.dstu3.model.Reference(theReferenceId)); - getDstu3().getRelatedArtifact().add(artifact); - } - - private void getRelatedArtifactR4(String theReferenceId, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType theArtifactType) { - org.hl7.fhir.r4.model.RelatedArtifact artifact = new org.hl7.fhir.r4.model.RelatedArtifact(); - artifact.setType(theArtifactType); - artifact.setResource(theReferenceId); - getR4().getRelatedArtifact().add(artifact); - } - - public IBaseReference getComposedOf() { - switch (myFhirVersion) { - case DSTU3: - return getArtifactOfTypeDstu3(getDstu3(), org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF); - case R4: - return getArtifactOfTypeR4(getR4(), org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setPredecessor(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getRelatedArtifactDstu3(theReferenceId, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR); - break; - case R4: - getRelatedArtifactR4(theReferenceId, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - - public IBaseReference getPredecessor() { - switch (myFhirVersion) { - case DSTU3: - return getArtifactOfTypeDstu3(getDstu3(), org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR); - case R4: - return getArtifactOfTypeR4(getR4(), org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public IBaseReference getDerivedFrom() { - switch (myFhirVersion) { - case DSTU3: - return getArtifactOfTypeDstu3(getDstu3(), org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM); - case R4: - return getArtifactOfTypeR4(getR4(), org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setDerivedFrom(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getRelatedArtifactDstu3(theReferenceId, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM); - break; - case R4: - getRelatedArtifactR4(theReferenceId, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public IBaseReference getSuccessor() { - switch (myFhirVersion) { - case DSTU3: - return getArtifactOfTypeDstu3(getDstu3(), org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR); - case R4: - return getArtifactOfTypeR4(getR4(), org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setSuccessor(String theReferenceId) { - switch (myFhirVersion) { - case DSTU3: - getRelatedArtifactDstu3(theReferenceId, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR); - break; - case R4: - getRelatedArtifactR4(theReferenceId, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private IBaseReference getArtifactOfTypeDstu3(org.hl7.fhir.dstu3.model.Measure theMeasure, org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType theType) { - return theMeasure.getRelatedArtifact() - .stream() - .filter(artifact -> theType == artifact.getType()) - .map(org.hl7.fhir.dstu3.model.RelatedArtifact::getResource) - .findFirst() - .get(); - } - - private IBaseReference getArtifactOfTypeR4(org.hl7.fhir.r4.model.Measure theMeasure, org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType theType) { - return new org.hl7.fhir.r4.model.Reference(theMeasure.getRelatedArtifact() - .stream() - .filter(artifact -> theType == artifact.getType()) - .map(org.hl7.fhir.r4.model.RelatedArtifact::getResource) - .findFirst() - .get()); - } - - public void setPublisher(String thePublisher) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setPublisher(thePublisher); - break; - case R4: - getR4().setPublisher(thePublisher); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getPublisher() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getPublisher(); - case R4: - return getR4().getPublisher(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setName(String theName) { - switch (myFhirVersion) { - case DSTU3: - getDstu3().setName(theName); - break; - case R4: - getR4().setName(theName); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public String getName() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getName(); - case R4: - return getR4().getName(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setEffectivePeriod(Date start, Date end) { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.Period effectivePeriod = new org.hl7.fhir.dstu3.model.Period(); - effectivePeriod.setStart(start); - effectivePeriod.setEnd(end); - getDstu3().setEffectivePeriod(effectivePeriod); - break; - case R4: - org.hl7.fhir.r4.model.Period effectivePeriodr4 = new org.hl7.fhir.r4.model.Period(); - effectivePeriodr4.setStart(start); - effectivePeriodr4.setEnd(end); - getR4().setEffectivePeriod(effectivePeriodr4); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public Date getEffectivePeriodStart() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getEffectivePeriod().getStart(); - case R4: - return getR4().getEffectivePeriod().getStart(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public Date getEffectivePeriodEnd() { - switch (myFhirVersion) { - case DSTU3: - return getDstu3().getEffectivePeriod().getEnd(); - case R4: - return getR4().getEffectivePeriod().getEnd(); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public void setTopics(List theTokenParamList) { - switch (myFhirVersion) { - case DSTU3: - setTopicsDstu3(theTokenParamList); - break; - case R4: - setTopicsR4(theTokenParamList); - break; - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - private void setTopicsDstu3(List theTokenParamList) { - List topicList = new ArrayList<>(); - - for (TokenParam tokenParam : theTokenParamList) { - org.hl7.fhir.dstu3.model.CodeableConcept codeableConcept = new org.hl7.fhir.dstu3.model.CodeableConcept(); - codeableConcept.addCoding().setSystem(tokenParam.getSystem()).setCode(tokenParam.getValue()); - topicList.add(codeableConcept); - } - getDstu3().setTopic(topicList); - } - - private void setTopicsR4(List theTokenParamList) { - List topicList = new ArrayList<>(); - - for (TokenParam tokenParam : theTokenParamList) { - org.hl7.fhir.r4.model.CodeableConcept codeableConcept = new org.hl7.fhir.r4.model.CodeableConcept(); - codeableConcept.addCoding().setSystem(tokenParam.getSystem()).setCode(tokenParam.getValue()); - topicList.add(codeableConcept); - } - getR4().setTopic(topicList); - } - - public TokenParam getTopicFirstRep() { - switch (myFhirVersion) { - case DSTU3: - org.hl7.fhir.dstu3.model.Coding codingDstu3 = getDstu3().getTopicFirstRep().getCodingFirstRep(); - return new TokenParam(codingDstu3.getSystem(), codingDstu3.getCode()); - case R4: - org.hl7.fhir.r4.model.Coding codingR4 = getR4().getTopicFirstRep().getCodingFirstRep(); - return new TokenParam(codingR4.getSystem(), codingR4.getCode()); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } - - public TokenParam getTopicSecondRepOrNull() { - switch (myFhirVersion) { - case DSTU3: - if (getDstu3().getTopic().size() < 2) { - return null; - } - org.hl7.fhir.dstu3.model.Coding codingDstu3 = getDstu3().getTopic().get(1).getCodingFirstRep(); - return new TokenParam(codingDstu3.getSystem(), codingDstu3.getCode()); - case R4: - if (getR4().getTopic().size() < 2) { - return null; - } - org.hl7.fhir.r4.model.Coding codingR4 = getR4().getTopic().get(1).getCodingFirstRep(); - return new TokenParam(codingR4.getSystem(), codingR4.getCode()); - default: - throw new UnsupportedOperationException(myFhirVersion + " not supported"); - } - } -} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IBasePersistedResource.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IBasePersistedResource.java index c2386009848..328a7b68b86 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IBasePersistedResource.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IBasePersistedResource.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.cross; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IResourceLookup.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IResourceLookup.java new file mode 100644 index 00000000000..06b9decfc8c --- /dev/null +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/IResourceLookup.java @@ -0,0 +1,31 @@ +package ca.uhn.fhir.jpa.model.cross; + +/*- + * #%L + * HAPI FHIR Model + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.Date; + +public interface IResourceLookup { + String getResourceType(); + + Long getResourceId(); + + Date getDeleted(); +} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourceLookup.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourceLookup.java new file mode 100644 index 00000000000..661b635e691 --- /dev/null +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourceLookup.java @@ -0,0 +1,50 @@ +package ca.uhn.fhir.jpa.model.cross; + +/*- + * #%L + * HAPI FHIR Model + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.Date; + +public class ResourceLookup implements IResourceLookup { + private final String myResourceType; + private final Long myResourcePid; + private final Date myDeletedAt; + + public ResourceLookup(String theResourceType, Long theResourcePid, Date theDeletedAt) { + myResourceType = theResourceType; + myResourcePid = theResourcePid; + myDeletedAt = theDeletedAt; + } + + @Override + public String getResourceType() { + return myResourceType; + } + + @Override + public Long getResourceId() { + return myResourcePid; + } + + @Override + public Date getDeleted() { + return myDeletedAt; + } +} diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourcePersistentId.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourcePersistentId.java index 9e1408f43ce..5d98279bcff 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourcePersistentId.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/cross/ResourcePersistentId.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.cross; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import ca.uhn.fhir.util.ObjectUtil; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Optional; /** * This class is an abstraction for however primary keys are stored in the underlying storage engine. This might be @@ -35,6 +36,7 @@ public class ResourcePersistentId { private Object myId; public ResourcePersistentId(Object theId) { + assert !(theId instanceof Optional); myId = theId; } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseHasResource.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseHasResource.java index 64d29094ef7..0118382b324 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseHasResource.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseHasResource.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,11 +45,6 @@ public abstract class BaseHasResource implements IBaseResourceEntity, IBasePersi @OptimisticLock(excluded = true) private FhirVersionEnum myFhirVersion; - @OneToOne(optional = true, fetch = FetchType.LAZY, cascade = {}, orphanRemoval = false) - @JoinColumn(name = "FORCED_ID_PID") - @OptimisticLock(excluded = true) - private ForcedId myForcedId; - @Column(name = "HAS_TAGS", nullable = false) @OptimisticLock(excluded = true) private boolean myHasTags; @@ -96,29 +91,13 @@ public abstract class BaseHasResource implements IBaseResourceEntity, IBasePersi myFhirVersion = theFhirVersion; } - public ForcedId getForcedId() { - return myForcedId; - } + abstract public ForcedId getForcedId(); - public void setForcedId(ForcedId theForcedId) { - myForcedId = theForcedId; - } + abstract public void setForcedId(ForcedId theForcedId); @Override public abstract Long getId(); - @Override - public IdDt getIdDt() { - if (getForcedId() == null) { - Long id = getResourceId(); - return new IdDt(getResourceType() + '/' + id + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); - } else { - // Avoid a join query if possible - String forcedId = getTransientForcedId() != null ? getTransientForcedId() : getForcedId().getForcedId(); - return new IdDt(getResourceType() + '/' + forcedId + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); - } - } - @Override public boolean isDeleted() { return myDeleted != null; diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndex.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndex.java index 5666672055d..df24e65b0b4 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndex.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndex.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java index cac4e12e1a3..b891a3889b2 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseTag.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseTag.java index ed8f242579c..8ba03fca400 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseTag.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseTag.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BinaryStorageEntity.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BinaryStorageEntity.java index 8933d99e647..3fe3308b0b0 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BinaryStorageEntity.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BinaryStorageEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ForcedId.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ForcedId.java index 8ed222cac92..720163bec12 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ForcedId.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ForcedId.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/IBaseResourceEntity.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/IBaseResourceEntity.java index 4619f005014..45c1aa9968b 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/IBaseResourceEntity.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/IBaseResourceEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java index fb3b2c5d9f0..171c6d31866 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceEncodingEnum.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceEncodingEnum.java index 7172e7f0471..e2fa2c3ae2d 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceEncodingEnum.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceEncodingEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryProvenanceEntity.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryProvenanceEntity.java index b0a66b3b283..15dde30bba0 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryProvenanceEntity.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryProvenanceEntity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java index 3ca9e09c404..fea5496300e 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ package ca.uhn.fhir.jpa.model.entity; */ import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.api.Constants; import org.hibernate.annotations.OptimisticLock; import javax.persistence.*; @@ -54,7 +56,11 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl @Column(name = "PID") private Long myId; - @Column(name = "RES_ID") + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "RES_ID", nullable = false, updatable = false, foreignKey = @ForeignKey(name = "FK_RESOURCE_HISTORY_RESOURCE")) + private ResourceTable myResourceTable; + + @Column(name = "RES_ID", nullable = false, updatable = false, insertable = false) private Long myResourceId; @Column(name = "RES_TYPE", length = ResourceTable.RESTYPE_LEN, nullable = false) @@ -165,4 +171,35 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl public ResourcePersistentId getPersistentId() { return new ResourcePersistentId(myResourceId); } + + public ResourceTable getResourceTable() { + return myResourceTable; + } + + public void setResourceTable(ResourceTable theResourceTable) { + myResourceTable = theResourceTable; + } + + @Override + public IdDt getIdDt() { + if (getResourceTable().getForcedId() == null) { + Long id = getResourceId(); + return new IdDt(getResourceType() + '/' + id + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); + } else { + // Avoid a join query if possible + String forcedId = getTransientForcedId() != null ? getTransientForcedId() : getResourceTable().getForcedId().getForcedId(); + return new IdDt(getResourceType() + '/' + forcedId + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); + } + } + + @Override + public ForcedId getForcedId() { + return getResourceTable().getForcedId(); + } + + @Override + public void setForcedId(ForcedId theForcedId) { + getResourceTable().setForcedId(theForcedId); + } + } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTag.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTag.java index dca198eb432..e3482c765da 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTag.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTag.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,9 @@ public class ResourceHistoryTag extends BaseTag implements Serializable { @JoinColumn(name="RES_VER_PID", referencedColumnName="PID", nullable=false, foreignKey=@ForeignKey(name="FK_HISTORYTAG_HISTORY")) private ResourceHistoryTable myResourceHistory; + @Column(name="RES_VER_PID", insertable = false, updatable = false, nullable = false) + private Long myResourceHistoryPid; + @Column(name = "RES_TYPE", length = ResourceTable.RESTYPE_LEN, nullable=false) private String myResourceType; diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedCompositeStringUnique.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedCompositeStringUnique.java index cb08ff978af..2c6305ebdd8 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedCompositeStringUnique.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedCompositeStringUnique.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamCoords.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamCoords.java index c7269d7c052..69155cd5dba 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamCoords.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamCoords.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamDate.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamDate.java index f96218358b8..7b097893c0f 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamDate.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamDate.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamNumber.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamNumber.java index cf438378e51..f88e357ccd7 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamNumber.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamNumber.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamQuantity.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamQuantity.java index 98b9b2886a4..6107df7884d 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamQuantity.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamQuantity.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java index d5c15a13ff0..155bf7a8da3 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamToken.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamToken.java index 78520ee7f09..44a14bf41ee 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamToken.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamToken.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamUri.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamUri.java index 0d502038135..c827890d54b 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamUri.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamUri.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java index 3bb9795a1d6..44438c28626 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,44 +60,38 @@ public class ResourceLink extends BaseResourceIndex { private String mySourceResourceType; @ManyToOne(optional = true, fetch = FetchType.LAZY) - @JoinColumn(name = "TARGET_RESOURCE_ID", referencedColumnName = "RES_ID", nullable = true, foreignKey = @ForeignKey(name = "FK_RESLINK_TARGET")) + @JoinColumn(name = "TARGET_RESOURCE_ID", referencedColumnName = "RES_ID", nullable = true, insertable = false, updatable = false, foreignKey = @ForeignKey(name = "FK_RESLINK_TARGET")) private ResourceTable myTargetResource; - @Column(name = "TARGET_RESOURCE_ID", insertable = false, updatable = false, nullable = true) + @Column(name = "TARGET_RESOURCE_ID", insertable = true, updatable = true, nullable = true) @Field() private Long myTargetResourcePid; - @Column(name = "TARGET_RESOURCE_TYPE", nullable = false, length = ResourceTable.RESTYPE_LEN) @Field() private String myTargetResourceType; - @Column(name = "TARGET_RESOURCE_URL", length = 200, nullable = true) @Field() private String myTargetResourceUrl; - @Field() @Column(name = "SP_UPDATED", nullable = true) // TODO: make this false after HAPI 2.3 @Temporal(TemporalType.TIMESTAMP) private Date myUpdated; + @Transient + private transient String myTargetResourceId; public ResourceLink() { super(); } - public ResourceLink(String theSourcePath, ResourceTable theSourceResource, IIdType theTargetResourceUrl, Date theUpdated) { - super(); - setSourcePath(theSourcePath); - setSourceResource(theSourceResource); - setTargetResourceUrl(theTargetResourceUrl); - setUpdated(theUpdated); + public String getTargetResourceId() { + if (myTargetResourceId == null && myTargetResource != null) { + myTargetResourceId = getTargetResource().getIdDt().getIdPart(); + } + return myTargetResourceId; } - public ResourceLink(String theSourcePath, ResourceTable theSourceResource, ResourceTable theTargetResource, Date theUpdated) { - super(); - setSourcePath(theSourcePath); - setSourceResource(theSourceResource); - setTargetResource(theTargetResource); - setUpdated(theUpdated); + public String getTargetResourceType() { + return myTargetResourceType; } @Override @@ -115,8 +109,9 @@ public class ResourceLink extends BaseResourceIndex { EqualsBuilder b = new EqualsBuilder(); b.append(mySourcePath, obj.mySourcePath); b.append(mySourceResource, obj.mySourceResource); - b.append(myTargetResourcePid, obj.myTargetResourcePid); b.append(myTargetResourceUrl, obj.myTargetResourceUrl); + b.append(myTargetResourceType, obj.myTargetResourceType); + b.append(getTargetResourceId(), obj.getTargetResourceId()); return b.isEquals(); } @@ -138,46 +133,42 @@ public class ResourceLink extends BaseResourceIndex { mySourceResourceType = theSourceResource.getResourceType(); } - public Long getSourceResourcePid() { - return mySourceResourcePid; - } + public void setTargetResource(String theResourceType, Long theResourcePid, String theTargetResourceId) { + Validate.notBlank(theResourceType); - public ResourceTable getTargetResource() { - return myTargetResource; - } - - public void setTargetResource(ResourceTable theTargetResource) { - Validate.notNull(theTargetResource); - myTargetResource = theTargetResource; - myTargetResourcePid = theTargetResource.getId(); - myTargetResourceType = theTargetResource.getResourceType(); + myTargetResourceType = theResourceType; + myTargetResourcePid = theResourcePid; + myTargetResourceId = theTargetResourceId; } public Long getTargetResourcePid() { return myTargetResourcePid; } - public String getTargetResourceUrl() { - return myTargetResourceUrl; - } - public void setTargetResourceUrl(IIdType theTargetResourceUrl) { Validate.isTrue(theTargetResourceUrl.hasBaseUrl()); Validate.isTrue(theTargetResourceUrl.hasResourceType()); // if (theTargetResourceUrl.hasIdPart()) { - // do nothing + // do nothing // } else { - // Must have set an url like http://example.org/something - // We treat 'something' as the resource type because of fix for #659. Prior to #659 fix, 'something' was - // treated as the id and 'example.org' was treated as the resource type - // TODO: log a warning? + // Must have set an url like http://example.org/something + // We treat 'something' as the resource type because of fix for #659. Prior to #659 fix, 'something' was + // treated as the id and 'example.org' was treated as the resource type + // TODO: log a warning? // } myTargetResourceType = theTargetResourceUrl.getResourceType(); myTargetResourceUrl = theTargetResourceUrl.getValue(); } + public void setTargetResourceUrlCanonical(String theTargetResourceUrl) { + Validate.notBlank(theTargetResourceUrl); + + myTargetResourceType = "(unknown)"; + myTargetResourceUrl = theTargetResourceUrl; + } + public Date getUpdated() { return myUpdated; } @@ -206,8 +197,9 @@ public class ResourceLink extends BaseResourceIndex { HashCodeBuilder b = new HashCodeBuilder(); b.append(mySourcePath); b.append(mySourceResource); - b.append(myTargetResourcePid); b.append(myTargetResourceUrl); + b.append(getTargetResourceType()); + b.append(getTargetResourceId()); return b.toHashCode(); } @@ -224,4 +216,38 @@ public class ResourceLink extends BaseResourceIndex { return b.toString(); } + public ResourceTable getTargetResource() { + return myTargetResource; + } + + public static ResourceLink forAbsoluteReference(String theSourcePath, ResourceTable theSourceResource, IIdType theTargetResourceUrl, Date theUpdated) { + ResourceLink retVal = new ResourceLink(); + retVal.setSourcePath(theSourcePath); + retVal.setSourceResource(theSourceResource); + retVal.setTargetResourceUrl(theTargetResourceUrl); + retVal.setUpdated(theUpdated); + return retVal; + } + + /** + * Factory for canonical URL + */ + public static ResourceLink forLogicalReference(String theSourcePath, ResourceTable theSourceResource, String theTargetResourceUrl, Date theUpdated) { + ResourceLink retVal = new ResourceLink(); + retVal.setSourcePath(theSourcePath); + retVal.setSourceResource(theSourceResource); + retVal.setTargetResourceUrlCanonical(theTargetResourceUrl); + retVal.setUpdated(theUpdated); + return retVal; + } + + public static ResourceLink forLocalReference(String theSourcePath, ResourceTable theSourceResource, String theTargetResourceType, Long theTargetResourcePid, String theTargetResourceId, Date theUpdated) { + ResourceLink retVal = new ResourceLink(); + retVal.setSourcePath(theSourcePath); + retVal.setSourceResource(theSourceResource); + retVal.setTargetResource(theTargetResourceType, theTargetResourcePid, theTargetResourceId); + retVal.setUpdated(theUpdated); + return retVal; + } + } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java index 70c3e26833b..e7e6a574bd3 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,18 +21,29 @@ package ca.uhn.fhir.jpa.model.entity; */ import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.jpa.model.cross.ResourcePersistentId; import ca.uhn.fhir.jpa.model.search.IndexNonDeletedInterceptor; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.hibernate.annotations.OptimisticLock; -import org.hibernate.search.annotations.*; +import org.hibernate.search.annotations.Analyze; +import org.hibernate.search.annotations.Analyzer; +import org.hibernate.search.annotations.Field; +import org.hibernate.search.annotations.Fields; +import org.hibernate.search.annotations.Indexed; +import org.hibernate.search.annotations.Store; -import javax.persistence.Index; import javax.persistence.*; import java.io.Serializable; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.defaultString; @@ -46,18 +57,12 @@ import static org.apache.commons.lang3.StringUtils.defaultString; @Index(name = "IDX_RES_TYPE", columnList = "RES_TYPE"), @Index(name = "IDX_INDEXSTATUS", columnList = "SP_INDEX_STATUS") }) -public class ResourceTable extends BaseHasResource implements Serializable, IBasePersistedResource { +public class ResourceTable extends BaseHasResource implements Serializable, IBasePersistedResource, IResourceLookup { public static final int RESTYPE_LEN = 40; private static final int MAX_LANGUAGE_LENGTH = 20; private static final int MAX_PROFILE_LENGTH = 200; private static final long serialVersionUID = 1L; -// @Transient -// private transient byte[] myResource; -// -// @Transient -// private transient ResourceEncodingEnum myEncoding; - /** * Holds the narrative text only - Used for Fulltext searching but not directly stored in the DB */ @@ -199,26 +204,36 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas @OneToMany(mappedBy = "myTargetResource", cascade = {}, fetch = FetchType.LAZY, orphanRemoval = false) @OptimisticLock(excluded = true) private Collection myResourceLinksAsTarget; + @Column(name = "RES_TYPE", length = RESTYPE_LEN, nullable = false) @Field @OptimisticLock(excluded = true) private String myResourceType; + @OneToMany(mappedBy = "myResource", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true) @OptimisticLock(excluded = true) private Collection mySearchParamPresents; + @OneToMany(mappedBy = "myResource", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true) @OptimisticLock(excluded = true) private Set myTags; + @Transient private transient boolean myUnchangedInCurrentOperation; + @Version @Column(name = "RES_VER") private long myVersion; + @OneToMany(mappedBy = "myResourceTable", fetch = FetchType.LAZY) private Collection myProvenance; + @Transient private transient ResourceHistoryTable myCurrentVersionEntity; + @OneToOne(optional = true, fetch = FetchType.EAGER, cascade = {}, orphanRemoval = false, mappedBy = "myResource") + private ForcedId myForcedId; + @Override public ResourceTag addTag(TagDefinition theTag) { for (ResourceTag next : getTags()) { @@ -549,7 +564,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas retVal.setUpdated(getUpdated()); retVal.setFhirVersion(getFhirVersion()); retVal.setDeleted(getDeleted()); - retVal.setForcedId(getForcedId()); + retVal.setResourceTable(this); retVal.getTags().clear(); @@ -606,4 +621,28 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas public ResourcePersistentId getPersistentId() { return new ResourcePersistentId(getId()); } + + @Override + public ForcedId getForcedId() { + return myForcedId; + } + + @Override + public void setForcedId(ForcedId theForcedId) { + myForcedId = theForcedId; + } + + @Override + public IdDt getIdDt() { + if (getForcedId() == null) { + Long id = this.getResourceId(); + return new IdDt(getResourceType() + '/' + id + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); + } else { + // Avoid a join query if possible + String forcedId = getTransientForcedId() != null ? getTransientForcedId() : getForcedId().getForcedId(); + return new IdDt(getResourceType() + '/' + forcedId + '/' + Constants.PARAM_HISTORY + '/' + getVersion()); + } + } + + } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTag.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTag.java index 5f34c06c948..9fcb5200ce4 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTag.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTag.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/SearchParamPresent.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/SearchParamPresent.java index e3a707f7b15..fea07faaf2c 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/SearchParamPresent.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/SearchParamPresent.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagDefinition.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagDefinition.java index 41f958146ac..77b7252db95 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagDefinition.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagTypeEnum.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagTypeEnum.java index c7301b16f60..a9027818148 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagTypeEnum.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/TagTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.entity; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/HapiJob.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/HapiJob.java index a901b648eb3..97e5b7d4c0f 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/HapiJob.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/HapiJob.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.sched; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/IHapiScheduler.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/IHapiScheduler.java index 09848fd447b..73a8ca4c92e 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/IHapiScheduler.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/IHapiScheduler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.sched; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISchedulerService.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISchedulerService.java index 656305483f3..f3a9bfa5816 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISchedulerService.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISchedulerService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.sched; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java index 5840e9e0b61..00a675ba9b5 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.sched; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ScheduledJobDefinition.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ScheduledJobDefinition.java index 245dec8721b..deb4a35fbfd 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ScheduledJobDefinition.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/sched/ScheduledJobDefinition.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.sched; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/IndexNonDeletedInterceptor.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/IndexNonDeletedInterceptor.java index 4f3f23d522a..0eaaabd2fac 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/IndexNonDeletedInterceptor.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/IndexNonDeletedInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.search; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchRuntimeDetails.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchRuntimeDetails.java index ebf2e7d1def..858dcc0c7ec 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchRuntimeDetails.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchRuntimeDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.search; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchStatusEnum.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchStatusEnum.java index ebe1cfcb423..c42bcbe26a4 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchStatusEnum.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/SearchStatusEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.search; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/StorageProcessingMessage.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/StorageProcessingMessage.java index 72aeae8414e..66e26d808d3 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/StorageProcessingMessage.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/StorageProcessingMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.search; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/BigDecimalNumericFieldBridge.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/BigDecimalNumericFieldBridge.java index dc5dc5aed67..f87c234e962 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/BigDecimalNumericFieldBridge.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/BigDecimalNumericFieldBridge.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.util; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/JpaConstants.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/JpaConstants.java index 73a08451e68..66f2c5b17ed 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/JpaConstants.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/JpaConstants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.util; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/StringNormalizer.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/StringNormalizer.java index f53821a749d..1ab703d0eaf 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/StringNormalizer.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/StringNormalizer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.model.util; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/util/JpaInterceptorBroadcaster.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/util/JpaInterceptorBroadcaster.java index ec9729740ac..7043deb7375 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/util/JpaInterceptorBroadcaster.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/util/JpaInterceptorBroadcaster.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.util; * #%L * HAPI FHIR Model * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-model/src/test/java/ca/uhn/fhir/jpa/model/any/AnyListResourceTest.java b/hapi-fhir-jpaserver-model/src/test/java/ca/uhn/fhir/jpa/model/any/AnyListResourceTest.java deleted file mode 100644 index 46b71084710..00000000000 --- a/hapi-fhir-jpaserver-model/src/test/java/ca/uhn/fhir/jpa/model/any/AnyListResourceTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package ca.uhn.fhir.jpa.model.any; - -import org.hl7.fhir.r5.model.ListResource; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class AnyListResourceTest { - @Test - public void getCodeFirstRep() { - AnyListResource listResource = AnyListResource.fromResource(new ListResource()); - listResource.addCode("foo", "bar"); - assertEquals("foo", listResource.getCodeFirstRep().getSystem()); - assertEquals("bar", listResource.getCodeFirstRep().getValue()); - } - - @Test - public void getIdentifierFirstRep() { - AnyListResource listResource = AnyListResource.fromResource(new ListResource()); - listResource.addIdentifier("foo", "bar"); - assertEquals("foo", listResource.getIdentifierirstRep().getSystem()); - assertEquals("bar", listResource.getIdentifierirstRep().getValue()); - } -} diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 06f462936c4..4fbfa852fae 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/JpaRuntimeSearchParam.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/JpaRuntimeSearchParam.java index 30dcdb63dd8..d9744999897 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/JpaRuntimeSearchParam.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/JpaRuntimeSearchParam.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/MatchUrlService.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/MatchUrlService.java index dc7914deadb..fb77ea8af24 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/MatchUrlService.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/MatchUrlService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java index 09a14facce1..415afbaf7fe 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/ResourceMetaParams.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParamConstants.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParamConstants.java index 5a956e82b9e..9922aaedd3c 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParamConstants.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParamConstants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java index 4070f58af70..1cdb6f4ca37 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java @@ -18,6 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; import java.io.Serializable; import java.util.*; +import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -26,7 +27,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,6 +60,7 @@ public class SearchParameterMap implements Serializable { private SortSpec mySort; private SummaryEnum mySummaryMode; private SearchTotalModeEnum mySearchTotalMode; + private QuantityParam myNearDistanceParam; /** * Constructor @@ -454,45 +456,41 @@ public class SearchParameterMap implements Serializable { return b.toString(); } + public void clean() { for (Map.Entry>> nextParamEntry : this.entrySet()) { String nextParamName = nextParamEntry.getKey(); List> andOrParams = nextParamEntry.getValue(); - clean(nextParamName, andOrParams); + cleanParameter(nextParamName, andOrParams); } } /* - * Filter out + * Given a particular named parameter, e.g. `name`, iterate over AndOrParams and remove any which are empty. */ - private void clean(String theParamName, List> theAndOrParams) { - for (int andListIdx = 0; andListIdx < theAndOrParams.size(); andListIdx++) { - List nextOrList = theAndOrParams.get(andListIdx); + private void cleanParameter(String theParamName, List> theAndOrParams) { + theAndOrParams + .forEach( + orList -> { + List emptyParameters = orList.stream() + .filter(nextOr -> nextOr.getMissing() == null) + .filter(nextOr -> nextOr instanceof QuantityParam) + .filter(nextOr -> isBlank(((QuantityParam) nextOr).getValueAsString())) + .collect(Collectors.toList()); - for (int orListIdx = 0; orListIdx < nextOrList.size(); orListIdx++) { - IQueryParameterType nextOr = nextOrList.get(orListIdx); - boolean hasNoValue = false; - if (nextOr.getMissing() != null) { - continue; - } - if (nextOr instanceof QuantityParam) { - if (isBlank(((QuantityParam) nextOr).getValueAsString())) { - hasNoValue = true; - } - } - - if (hasNoValue) { ourLog.debug("Ignoring empty parameter: {}", theParamName); - nextOrList.remove(orListIdx); - orListIdx--; + orList.removeAll(emptyParameters); } - } + ); + theAndOrParams.removeIf(List::isEmpty); + } - if (nextOrList.isEmpty()) { - theAndOrParams.remove(andListIdx); - andListIdx--; - } - } + public void setNearDistanceParam(QuantityParam theQuantityParam) { + myNearDistanceParam = theQuantityParam; + } + + public QuantityParam getNearDistanceParam() { + return myNearDistanceParam; } public enum EverythingModeEnum { @@ -637,4 +635,8 @@ public class SearchParameterMap implements Serializable { public List> remove(String theName) { return mySearchParameterMap.remove(theName); } + + public int size() { + return mySearchParameterMap.size(); + } } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/BaseSearchParamConfig.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/BaseSearchParamConfig.java index f03d494e7cf..ecc3d1be305 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/BaseSearchParamConfig.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/BaseSearchParamConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.config; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu2Config.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu2Config.java index d9b2dd9fcdc..a01b4b814b4 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu2Config.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu2Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.config; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,9 @@ package ca.uhn.fhir.jpa.searchparam.config; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.ParserOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorDstu2; -import org.hl7.fhir.instance.hapi.validation.DefaultProfileValidationSupport; -import org.hl7.fhir.instance.hapi.validation.IValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; @@ -48,8 +48,8 @@ public class SearchParamDstu2Config extends BaseSearchParamConfig { } @Primary - @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChainDstu2") + @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChain") public IValidationSupport validationSupportChainDstu2() { - return new DefaultProfileValidationSupport(); + return new DefaultProfileValidationSupport(fhirContextDstu2()); } } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu3Config.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu3Config.java index 14a5a82f8a7..38b2eed2bb8 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu3Config.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamDstu3Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.config; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamR4Config.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamR4Config.java index 15017429447..cf7e19f4973 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamR4Config.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/config/SearchParamR4Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.config; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java index 1985fc5c006..9ccff73e0a9 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,22 +20,8 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #L% */ -import ca.uhn.fhir.context.BaseRuntimeChildDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementDefinition; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.RuntimeSearchParam; -import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; -import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamCoords; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamNumber; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken; -import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri; +import ca.uhn.fhir.context.*; +import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.jpa.model.util.StringNormalizer; import ca.uhn.fhir.jpa.searchparam.SearchParamConstants; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; @@ -43,15 +29,9 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import org.apache.commons.lang3.ObjectUtils; +import org.hibernate.search.spatial.impl.Point; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseEnumeration; -import org.hl7.fhir.instance.model.api.IBaseExtension; -import org.hl7.fhir.instance.model.api.IBaseReference; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.instance.model.api.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; @@ -60,21 +40,11 @@ import javax.measure.quantity.Quantity; import javax.measure.unit.NonSI; import javax.measure.unit.Unit; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; import java.util.regex.Pattern; import java.util.stream.Collectors; -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; -import static org.apache.commons.lang3.StringUtils.trim; +import static org.apache.commons.lang3.StringUtils.*; public abstract class BaseSearchParamExtractor implements ISearchParamExtractor { private static final Pattern SPLIT = Pattern.compile("\\||( or )"); @@ -155,23 +125,29 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor case "uri": case "canonical": String typeName = toTypeName(value); + IPrimitiveType valuePrimitive = (IPrimitiveType) value; + IBaseReference fakeReference = (IBaseReference) myContext.getElementDefinition("Reference").newInstance(); + fakeReference.setReference(valuePrimitive.getValueAsString()); // Canonical has a root type of "uri" if ("canonical".equals(typeName)) { - IPrimitiveType valuePrimitive = (IPrimitiveType) value; - IBaseReference fakeReference = (IBaseReference) myContext.getElementDefinition("Reference").newInstance(); - fakeReference.setReference(valuePrimitive.getValueAsString()); /* * See #1583 * Technically canonical fields should not allow local references (e.g. * Questionnaire/123) but it seems reasonable for us to interpret a canonical - * containing a local reference for what it is, and allow people to seaerch + * containing a local reference for what it is, and allow people to search * based on that. */ IIdType parsed = fakeReference.getReferenceElement(); if (parsed.hasIdPart() && parsed.hasResourceType() && !parsed.isAbsolute()) { - PathAndRef ref = new PathAndRef(searchParam.getName(), path, fakeReference); + PathAndRef ref = new PathAndRef(searchParam.getName(), path, fakeReference, false); + params.add(ref); + break; + } + + if (parsed.isAbsolute()) { + PathAndRef ref = new PathAndRef(searchParam.getName(), path, fakeReference, true); params.add(ref); break; } @@ -195,7 +171,7 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor return; } - PathAndRef ref = new PathAndRef(searchParam.getName(), path, valueRef); + PathAndRef ref = new PathAndRef(searchParam.getName(), path, valueRef, false); params.add(ref); break; default: @@ -210,7 +186,19 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor @Override public SearchParamSet extractSearchParamTokens(IBaseResource theResource) { + IExtractor extractor = createTokenExtractor(theResource); + return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.TOKEN); + } + @Override + public SearchParamSet extractSearchParamTokens(IBaseResource theResource, RuntimeSearchParam theSearchParam) { + IExtractor extractor = createTokenExtractor(theResource); + SearchParamSet setToPopulate = new SearchParamSet<>(); + extractSearchParam(theSearchParam, theResource, extractor, setToPopulate); + return setToPopulate; + } + + private IExtractor createTokenExtractor(IBaseResource theResource) { String resourceTypeName = toRootTypeName(theResource); String useSystem; if (getContext().getVersion().getVersion().equals(FhirVersionEnum.DSTU2)) { @@ -228,87 +216,24 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor } } + return new TokenExtractor(resourceTypeName, useSystem); + } + + @Override + public SearchParamSet extractSearchParamSpecial(IBaseResource theResource) { + + String resourceTypeName = toRootTypeName(theResource); + IExtractor extractor = (params, searchParam, value, path) -> { - - // DSTU3+ - if (value instanceof IBaseEnumeration) { - IBaseEnumeration obj = (IBaseEnumeration) value; - String system = extractSystem(obj); - String code = obj.getValueAsString(); - createTokenIndexIfNotBlank(resourceTypeName, params, searchParam, system, code); - return; - } - - // DSTU2 only - if (value instanceof BoundCodeDt) { - BoundCodeDt boundCode = (BoundCodeDt) value; - Enum valueAsEnum = boundCode.getValueAsEnum(); - String system = null; - if (valueAsEnum != null) { - //noinspection unchecked - system = boundCode.getBinder().toSystemString(valueAsEnum); - } - String code = boundCode.getValueAsString(); - createTokenIndexIfNotBlank(resourceTypeName, params, searchParam, system, code); - return; - } - - if (value instanceof IPrimitiveType) { - IPrimitiveType nextValue = (IPrimitiveType) value; - String systemAsString = null; - String valueAsString = nextValue.getValueAsString(); - if ("CodeSystem.concept.code".equals(path)) { - systemAsString = useSystem; - } else if ("ValueSet.codeSystem.concept.code".equals(path)) { - systemAsString = useSystem; - } - - createTokenIndexIfNotBlank(resourceTypeName, params, searchParam, systemAsString, valueAsString); - return; - } - - switch (path) { - case "Patient.communication": - addToken_PatientCommunication(resourceTypeName, params, searchParam, value); - return; - case "Consent.source": - // Consent#source-identifier has a path that isn't typed - This is a one-off to deal with that - return; - case "Location.position": - ourLog.warn("Position search not currently supported, not indexing location"); - return; - case "StructureDefinition.context": - // TODO: implement this - ourLog.warn("StructureDefinition context indexing not currently supported"); - return; - case "CapabilityStatement.rest.security": - addToken_CapabilityStatementRestSecurity(resourceTypeName, params, searchParam, value); - return; - } - - String nextType = toRootTypeName(value); - switch (nextType) { - case "Identifier": - addToken_Identifier(resourceTypeName, params, searchParam, value); - break; - case "CodeableConcept": - addToken_CodeableConcept(resourceTypeName, params, searchParam, value); - break; - case "Coding": - addToken_Coding(resourceTypeName, params, searchParam, value); - break; - case "ContactPoint": - addToken_ContactPoint(resourceTypeName, params, searchParam, value); - break; - default: - addUnexpectedDatatypeWarning(params, searchParam, value); - break; + if ("Location.position".equals(path)) { + addCoords_Position(resourceTypeName, params, searchParam, value); } }; - return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.TOKEN); + return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.SPECIAL); } + private void addUnexpectedDatatypeWarning(SearchParamSet theParams, RuntimeSearchParam theSearchParam, IBase theValue) { theParams.addWarning("Search param " + theSearchParam.getName() + " is of unexpected datatype: " + theValue.getClass()); } @@ -335,11 +260,6 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.URI); } - @Override - public SearchParamSet extractSearchParamCoords(IBaseResource theResource) { - return new SearchParamSet<>(); - } - @Override public SearchParamSet extractSearchParamDates(IBaseResource theResource) { IExtractor extractor = (params, searchParam, value, path) -> { @@ -404,7 +324,6 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor IExtractor extractor = (params, searchParam, value, path) -> { if (value.getClass().equals(myLocationPositionDefinition.getImplementingClass())) { - ourLog.warn("Position search not currently supported, not indexing location"); return; } @@ -711,6 +630,32 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor } + private void addCoords_Position(String theResourceType, SearchParamSet theParams, RuntimeSearchParam theSearchParam, IBase theValue) { + BigDecimal latitude = null; + BigDecimal longitude = null; + + if (theValue instanceof org.hl7.fhir.dstu3.model.Location.LocationPositionComponent) { + org.hl7.fhir.dstu3.model.Location.LocationPositionComponent value = (org.hl7.fhir.dstu3.model.Location.LocationPositionComponent) theValue; + latitude = value.getLatitude(); + longitude = value.getLongitude(); + } else if (theValue instanceof org.hl7.fhir.r4.model.Location.LocationPositionComponent) { + org.hl7.fhir.r4.model.Location.LocationPositionComponent value = (org.hl7.fhir.r4.model.Location.LocationPositionComponent) theValue; + latitude = value.getLatitude(); + longitude = value.getLongitude(); + } else if (theValue instanceof org.hl7.fhir.r5.model.Location.LocationPositionComponent) { + org.hl7.fhir.r5.model.Location.LocationPositionComponent value = (org.hl7.fhir.r5.model.Location.LocationPositionComponent) theValue; + latitude = value.getLatitude(); + longitude = value.getLongitude(); + } + // We only accept coordinates when both are present + if (latitude != null && longitude != null) { + double normalizedLatitude = Point.normalizeLatitude(latitude.doubleValue()); + double normalizedLongitude = Point.normalizeLongitude(longitude.doubleValue()); + ResourceIndexedSearchParamCoords nextEntity = new ResourceIndexedSearchParamCoords(theResourceType, theSearchParam.getName(), normalizedLatitude, normalizedLongitude); + theParams.add(nextEntity); + } + } + private void addString_HumanName(String theResourceType, Set theParams, RuntimeSearchParam theSearchParam, IBase theValue) { List families = extractValuesAsStrings(myHumanNameFamilyValueChild, theValue); for (String next : families) { @@ -787,25 +732,29 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor continue; } - String nextPathUnsplit = nextSpDef.getPath(); - if (isBlank(nextPathUnsplit)) { - continue; - } + extractSearchParam(nextSpDef, theResource, theExtractor, retVal); + } + return retVal; + } - String[] splitPaths = split(nextPathUnsplit); - for (String nextPath : splitPaths) { - nextPath = trim(nextPath); - for (IBase nextObject : extractValues(nextPath, theResource)) { - if (nextObject != null) { - String typeName = toRootTypeName(nextObject); - if (!myIgnoredForSearchDatatypes.contains(typeName)) { - theExtractor.extract(retVal, nextSpDef, nextObject, nextPath); - } + private void extractSearchParam(RuntimeSearchParam theSearchParameterDef, IBaseResource theResource, IExtractor theExtractor, SearchParamSet theSetToPopulate) { + String nextPathUnsplit = theSearchParameterDef.getPath(); + if (isBlank(nextPathUnsplit)) { + return; + } + + String[] splitPaths = split(nextPathUnsplit); + for (String nextPath : splitPaths) { + nextPath = trim(nextPath); + for (IBase nextObject : extractValues(nextPath, theResource)) { + if (nextObject != null) { + String typeName = toRootTypeName(nextObject); + if (!myIgnoredForSearchDatatypes.contains(typeName)) { + theExtractor.extract(theSetToPopulate, theSearchParameterDef, nextObject, nextPath); } } } } - return retVal; } private String toRootTypeName(IBase nextObject) { @@ -1021,6 +970,95 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor } + private class TokenExtractor implements IExtractor { + private final String myResourceTypeName; + private final String myUseSystem; + + public TokenExtractor(String theResourceTypeName, String theUseSystem) { + myResourceTypeName = theResourceTypeName; + myUseSystem = theUseSystem; + } + + @Override + public void extract(SearchParamSet params, RuntimeSearchParam searchParam, IBase value, String path) { + + // DSTU3+ + if (value instanceof IBaseEnumeration) { + IBaseEnumeration obj = (IBaseEnumeration) value; + String system = extractSystem(obj); + String code = obj.getValueAsString(); + BaseSearchParamExtractor.this.createTokenIndexIfNotBlank(myResourceTypeName, params, searchParam, system, code); + return; + } + + // DSTU2 only + if (value instanceof BoundCodeDt) { + BoundCodeDt boundCode = (BoundCodeDt) value; + Enum valueAsEnum = boundCode.getValueAsEnum(); + String system = null; + if (valueAsEnum != null) { + //noinspection unchecked + system = boundCode.getBinder().toSystemString(valueAsEnum); + } + String code = boundCode.getValueAsString(); + BaseSearchParamExtractor.this.createTokenIndexIfNotBlank(myResourceTypeName, params, searchParam, system, code); + return; + } + + if (value instanceof IPrimitiveType) { + IPrimitiveType nextValue = (IPrimitiveType) value; + String systemAsString = null; + String valueAsString = nextValue.getValueAsString(); + if ("CodeSystem.concept.code".equals(path)) { + systemAsString = myUseSystem; + } else if ("ValueSet.codeSystem.concept.code".equals(path)) { + systemAsString = myUseSystem; + } + + BaseSearchParamExtractor.this.createTokenIndexIfNotBlank(myResourceTypeName, params, searchParam, systemAsString, valueAsString); + return; + } + + switch (path) { + case "Patient.communication": + BaseSearchParamExtractor.this.addToken_PatientCommunication(myResourceTypeName, params, searchParam, value); + return; + case "Consent.source": + // Consent#source-identifier has a path that isn't typed - This is a one-off to deal with that + return; + case "Location.position": + BaseSearchParamExtractor.this.addCoords_Position(myResourceTypeName, params, searchParam, value); + return; + case "StructureDefinition.context": + // TODO: implement this + ourLog.warn("StructureDefinition context indexing not currently supported"); + return; + case "CapabilityStatement.rest.security": + BaseSearchParamExtractor.this.addToken_CapabilityStatementRestSecurity(myResourceTypeName, params, searchParam, value); + return; + } + + String nextType = BaseSearchParamExtractor.this.toRootTypeName(value); + switch (nextType) { + case "Identifier": + BaseSearchParamExtractor.this.addToken_Identifier(myResourceTypeName, params, searchParam, value); + break; + case "CodeableConcept": + BaseSearchParamExtractor.this.addToken_CodeableConcept(myResourceTypeName, params, searchParam, value); + break; + case "Coding": + BaseSearchParamExtractor.this.addToken_Coding(myResourceTypeName, params, searchParam, value); + break; + case "ContactPoint": + BaseSearchParamExtractor.this.addToken_ContactPoint(myResourceTypeName, params, searchParam, value); + break; + default: + BaseSearchParamExtractor.this.addUnexpectedDatatypeWarning(params, searchParam, value); + break; + } + } + } + private static void addIgnoredType(FhirContext theCtx, String theType, Set theIgnoredTypes) { BaseRuntimeElementDefinition elementDefinition = theCtx.getElementDefinition(theType); if (elementDefinition != null) { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/IResourceLinkResolver.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/IResourceLinkResolver.java index e2388adcfe1..24d7f4184f9 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/IResourceLinkResolver.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/IResourceLinkResolver.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,31 @@ package ca.uhn.fhir.jpa.searchparam.extractor; */ import ca.uhn.fhir.context.RuntimeSearchParam; -import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; public interface IResourceLinkResolver { - ResourceTable findTargetResource(RuntimeSearchParam theNextSpDef, String theNextPathsUnsplit, IIdType theNextId, String theTypeString, Class theType, String theId, RequestDetails theRequest); + + /** + * This method resolves the target of a reference found within a resource that is being created/updated. We do this + * so that we can create indexed links between resources, and so that we can validate that the target actually + * exists in cases where we need to check that. + *

    + * This method returns an {@link IResourceLookup} so as to avoid needing to resolve the entire resource. + * + * @param theSearchParam The param that is being indexed + * @param theSourcePath The path within the resource where this reference was found + * @param theSourceResourceId The ID of the resource containing the reference to the target being resolved + * @param theTypeString The type of the resource being resolved + * @param theType The resource type of the target + * @param theReference The reference being resolved + * @param theRequest The incoming request, if any + */ + IResourceLookup findTargetResource(RuntimeSearchParam theSearchParam, String theSourcePath, IIdType theSourceResourceId, String theTypeString, Class theType, IBaseReference theReference, RequestDetails theRequest); void validateTypeOrThrowException(Class theType); + } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ISearchParamExtractor.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ISearchParamExtractor.java index 15796017006..15e4479ab8c 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ISearchParamExtractor.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ISearchParamExtractor.java @@ -4,13 +4,16 @@ import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.model.entity.*; import org.hl7.fhir.instance.model.api.IBaseResource; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; /* * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +31,7 @@ import java.util.*; public interface ISearchParamExtractor { - SearchParamSet extractSearchParamCoords(IBaseResource theResource); +// SearchParamSet extractSearchParamCoords(IBaseResource theResource); SearchParamSet extractSearchParamDates(IBaseResource theResource); @@ -40,6 +43,10 @@ public interface ISearchParamExtractor { SearchParamSet extractSearchParamTokens(IBaseResource theResource); + SearchParamSet extractSearchParamTokens(IBaseResource theResource, RuntimeSearchParam theSearchParam); + + SearchParamSet extractSearchParamSpecial(IBaseResource theResource); + SearchParamSet extractSearchParamUri(IBaseResource theResource); SearchParamSet extractResourceLinks(IBaseResource theResource); diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/LogicalReferenceHelper.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/LogicalReferenceHelper.java index a381ff1957a..adab66b4a8c 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/LogicalReferenceHelper.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/LogicalReferenceHelper.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/PathAndRef.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/PathAndRef.java index 69909e52bac..22bc6d65b3d 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/PathAndRef.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/PathAndRef.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,15 +27,21 @@ public class PathAndRef { private final String myPath; private final IBaseReference myRef; private final String mySearchParamName; + private final boolean myCanonical; /** * Constructor */ - public PathAndRef(String theSearchParamName, String thePath, IBaseReference theRef) { + public PathAndRef(String theSearchParamName, String thePath, IBaseReference theRef, boolean theCanonical) { super(); mySearchParamName = theSearchParamName; myPath = thePath; myRef = theRef; + myCanonical = theCanonical; + } + + public boolean isCanonical() { + return myCanonical; } public String getSearchParamName() { diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java index a2a3bac6fcd..176496b4aa1 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,16 +23,17 @@ package ca.uhn.fhir.jpa.searchparam.extractor; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.model.api.IQueryParameterType; -import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.param.ReferenceParam; import org.apache.commons.lang3.StringUtils; +import org.springframework.context.annotation.DependsOn; import java.util.*; import java.util.Map.Entry; import java.util.function.Predicate; import static org.apache.commons.lang3.StringUtils.compare; +import static org.apache.commons.lang3.StringUtils.isNotBlank; public final class ResourceIndexedSearchParams { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceIndexedSearchParams.class); @@ -217,7 +218,7 @@ public final class ResourceIndexedSearchParams { return myPopulatedResourceLinkParameters; } - public boolean matchParam(String theResourceName, String theParamName, RuntimeSearchParam theParamDef, IQueryParameterType theParam) { + public boolean matchParam(ModelConfig theModelConfig, String theResourceName, String theParamName, RuntimeSearchParam theParamDef, IQueryParameterType theParam) { if (theParamDef == null) { return false; } @@ -242,7 +243,7 @@ public final class ResourceIndexedSearchParams { resourceParams = myDateParams; break; case REFERENCE: - return matchResourceLinks(theResourceName, theParamName, theParam, theParamDef.getPath()); + return matchResourceLinks(theModelConfig, theResourceName, theParamName, theParam, theParamDef.getPath()); case COMPOSITE: case HAS: case SPECIAL: @@ -259,39 +260,56 @@ public final class ResourceIndexedSearchParams { return resourceParams.stream().anyMatch(namedParamPredicate); } + /** + * @deprecated Replace with the method below + */ // KHS This needs to be public as libraries outside of hapi call it directly + @Deprecated public boolean matchResourceLinks(String theResourceName, String theParamName, IQueryParameterType theParam, String theParamPath) { + return matchResourceLinks(new ModelConfig(), theResourceName, theParamName, theParam, theParamPath); + } + + // KHS This needs to be public as libraries outside of hapi call it directly + public boolean matchResourceLinks(ModelConfig theModelConfig, String theResourceName, String theParamName, IQueryParameterType theParam, String theParamPath) { ReferenceParam reference = (ReferenceParam)theParam; Predicate namedParamPredicate = resourceLink -> - resourceLinkMatches(theResourceName, resourceLink, theParamName, theParamPath) - && resourceIdMatches(resourceLink, reference); + searchParameterPathMatches(theResourceName, resourceLink, theParamName, theParamPath) + && resourceIdMatches(theModelConfig, resourceLink, reference); return myLinks.stream().anyMatch(namedParamPredicate); } - private boolean resourceIdMatches(ResourceLink theResourceLink, ReferenceParam theReference) { - ResourceTable target = theResourceLink.getTargetResource(); - IdDt idDt = target.getIdDt(); - if (idDt.isIdPartValidLong()) { - if (theReference.isIdPartValidLong()) { - return theReference.getIdPartAsLong().equals(idDt.getIdPartAsLong()); - } else { - return false; - } - } else { - ForcedId forcedId = target.getForcedId(); - if (forcedId != null) { - return forcedId.getForcedId().equals(theReference.getValue()); - } else { + private boolean resourceIdMatches(ModelConfig theModelConfig, ResourceLink theResourceLink, ReferenceParam theReference) { + String baseUrl = theReference.getBaseUrl(); + if (isNotBlank(baseUrl)) { + if (!theModelConfig.getTreatBaseUrlsAsLocal().contains(baseUrl)) { return false; } } + + String targetType = theResourceLink.getTargetResourceType(); + String targetId = theResourceLink.getTargetResourceId(); + + assert isNotBlank(targetType); + assert isNotBlank(targetId); + + if (theReference.hasResourceType()) { + if (!theReference.getResourceType().equals(targetType)) { + return false; + } + } + + if (!targetId.equals(theReference.getIdPart())) { + return false; + } + + return true; } - private boolean resourceLinkMatches(String theResourceName, ResourceLink theResourceLink, String theParamName, String theParamPath) { - return theResourceLink.getTargetResource().getResourceType().equalsIgnoreCase(theParamName) || - theResourceLink.getSourcePath().equalsIgnoreCase(theParamPath); + private boolean searchParameterPathMatches(String theResourceName, ResourceLink theResourceLink, String theParamName, String theParamPath) { + String sourcePath = theResourceLink.getSourcePath(); + return sourcePath.equalsIgnoreCase(theParamPath); } @Override diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceLinkExtractor.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceLinkExtractor.java index 5a63817030f..89e4e2d5d46 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceLinkExtractor.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceLinkExtractor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; @@ -39,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; +import java.util.HashMap; import java.util.Map; import static org.apache.commons.lang3.StringUtils.isBlank; @@ -64,17 +66,19 @@ public class ResourceLinkExtractor { ISearchParamExtractor.SearchParamSet refs = mySearchParamExtractor.extractResourceLinks(theResource); SearchParamExtractorService.handleWarnings(theRequest, myInterceptorBroadcaster, refs); + + Map resourceIdToResolvedTarget = new HashMap<>(); for (PathAndRef nextPathAndRef : refs) { RuntimeSearchParam searchParam = mySearchParamRegistry.getActiveSearchParam(resourceName, nextPathAndRef.getSearchParamName()); - extractResourceLinks(theParams, theEntity, theUpdateTime, theResourceLinkResolver, searchParam, nextPathAndRef, theFailOnInvalidReference, theRequest); + extractResourceLinks(theParams, theEntity, theUpdateTime, theResourceLinkResolver, searchParam, nextPathAndRef, theFailOnInvalidReference, theRequest, resourceIdToResolvedTarget); } theEntity.setHasLinks(theParams.myLinks.size() > 0); } - private void extractResourceLinks(ResourceIndexedSearchParams theParams, ResourceTable theEntity, Date theUpdateTime, IResourceLinkResolver theResourceLinkResolver, RuntimeSearchParam theRuntimeSearchParam, PathAndRef thePathAndRef, boolean theFailOnInvalidReference, RequestDetails theRequest) { - IBaseReference nextObject = thePathAndRef.getRef(); - IIdType nextId = nextObject.getReferenceElement(); + private void extractResourceLinks(ResourceIndexedSearchParams theParams, ResourceTable theEntity, Date theUpdateTime, IResourceLinkResolver theResourceLinkResolver, RuntimeSearchParam theRuntimeSearchParam, PathAndRef thePathAndRef, boolean theFailOnInvalidReference, RequestDetails theRequest, Map theResourceIdToResolvedTarget) { + IBaseReference nextReference = thePathAndRef.getRef(); + IIdType nextId = nextReference.getReferenceElement(); String path = thePathAndRef.getPath(); /* @@ -82,14 +86,16 @@ public class ResourceLinkExtractor { * programmatically with a Bundle (not through the FHIR REST API) * but Smile does this */ - if (nextId.isEmpty() && nextObject.getResource() != null) { - nextId = nextObject.getResource().getIdElement(); + if (nextId.isEmpty() && nextReference.getResource() != null) { + nextId = nextReference.getResource().getIdElement(); } theParams.myPopulatedResourceLinkParameters.add(thePathAndRef.getSearchParamName()); - if (LogicalReferenceHelper.isLogicalReference(myModelConfig, nextId)) { - ResourceLink resourceLink = new ResourceLink(thePathAndRef.getPath(), theEntity, nextId, theUpdateTime); + boolean canonical = thePathAndRef.isCanonical(); + if (LogicalReferenceHelper.isLogicalReference(myModelConfig, nextId) || canonical) { + String value = nextId.getValue(); + ResourceLink resourceLink = ResourceLink.forLogicalReference(thePathAndRef.getPath(), theEntity, value, theUpdateTime); if (theParams.myLinks.add(resourceLink)) { ourLog.debug("Indexing remote resource reference URL: {}", nextId); } @@ -131,7 +137,7 @@ public class ResourceLinkExtractor { String msg = myContext.getLocalizer().getMessage(BaseSearchParamExtractor.class, "externalReferenceNotAllowed", nextId.getValue()); throw new InvalidRequestException(msg); } else { - ResourceLink resourceLink = new ResourceLink(thePathAndRef.getPath(), theEntity, nextId, theUpdateTime); + ResourceLink resourceLink = ResourceLink.forAbsoluteReference(thePathAndRef.getPath(), theEntity, nextId, theUpdateTime); if (theParams.myLinks.add(resourceLink)) { ourLog.debug("Indexing remote resource reference URL: {}", nextId); } @@ -152,24 +158,36 @@ public class ResourceLinkExtractor { } theResourceLinkResolver.validateTypeOrThrowException(type); - ResourceLink resourceLink = createResourceLink(theEntity, theUpdateTime, theResourceLinkResolver, theRuntimeSearchParam, path, thePathAndRef, nextId, typeString, type, id, theRequest); + ResourceLink resourceLink = createResourceLink(theEntity, theUpdateTime, theResourceLinkResolver, theRuntimeSearchParam, path, thePathAndRef, nextId, typeString, type, nextReference, theRequest, theResourceIdToResolvedTarget); if (resourceLink == null) { return; } theParams.myLinks.add(resourceLink); } - private ResourceLink createResourceLink(ResourceTable theEntity, Date theUpdateTime, IResourceLinkResolver theResourceLinkResolver, RuntimeSearchParam nextSpDef, String theNextPathsUnsplit, PathAndRef nextPathAndRef, IIdType theNextId, String theTypeString, Class theType, String theId, RequestDetails theRequest) { - ResourceTable targetResource = theResourceLinkResolver.findTargetResource(nextSpDef, theNextPathsUnsplit, theNextId, theTypeString, theType, theId, theRequest); + private ResourceLink createResourceLink(ResourceTable theEntity, Date theUpdateTime, IResourceLinkResolver theResourceLinkResolver, RuntimeSearchParam nextSpDef, String theNextPathsUnsplit, PathAndRef nextPathAndRef, IIdType theNextId, String theTypeString, Class theType, IBaseReference theReference, RequestDetails theRequest, Map theResourceIdToResolvedTarget) { + /* + * We keep a cache of resolved target resources. This is good since for some resource types, there + * are multiple search parameters that map to the same element path within a resource (e.g. + * Observation:patient and Observation.subject and we don't want to force a resolution of the + * target any more times than we have to. + */ + + IResourceLookup targetResource = theResourceIdToResolvedTarget.get(theNextId.getValue()); + if (targetResource == null) { + targetResource = theResourceLinkResolver.findTargetResource(nextSpDef, theNextPathsUnsplit, theNextId, theTypeString, theType, theReference, theRequest); + } if (targetResource == null) { return null; } - return new ResourceLink(nextPathAndRef.getPath(), theEntity, targetResource, theUpdateTime); + theResourceIdToResolvedTarget.put(theNextId.getValue(), targetResource); + + String targetResourceType = targetResource.getResourceType(); + Long targetResourcePid = targetResource.getResourceId(); + String targetResourceIdPart = theNextId.getIdPart(); + return ResourceLink.forLocalReference(nextPathAndRef.getPath(), theEntity, targetResourceType, targetResourcePid, targetResourceIdPart, theUpdateTime); } - private String toResourceName(Class theResourceType) { - return myContext.getResourceDefinition(theResourceType).getName(); - } } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu2.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu2.java index f14f5994763..8c2b46f837e 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu2.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3.java index 170c9522e6a..79a7de05c92 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ package ca.uhn.fhir.jpa.searchparam.extractor; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import com.google.common.annotations.VisibleForTesting; import org.hl7.fhir.dstu3.context.IWorkerContext; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.Base; import org.hl7.fhir.dstu3.utils.FHIRPathEngine; import org.hl7.fhir.instance.model.api.IBase; diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR4.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR4.java index 38ac5a0da1f..f7d216ee66a 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR4.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR4.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import com.google.common.annotations.VisibleForTesting; @@ -30,12 +31,20 @@ import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.context.IWorkerContext; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.model.ResourceType; +import org.hl7.fhir.r4.model.TypeDetails; +import org.hl7.fhir.r4.model.ValueSet; import org.hl7.fhir.r4.utils.FHIRPathEngine; import javax.annotation.PostConstruct; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.apache.commons.lang3.StringUtils.isNotBlank; diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java index 8412ae6dbca..b882db0f4a5 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,17 +21,21 @@ package ca.uhn.fhir.jpa.searchparam.extractor; */ import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.PathEngineException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r5.context.IWorkerContext; import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.*; +import org.hl7.fhir.r5.model.Base; +import org.hl7.fhir.r5.model.IdType; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.ResourceType; +import org.hl7.fhir.r5.model.TypeDetails; +import org.hl7.fhir.r5.model.ValueSet; import org.hl7.fhir.r5.utils.FHIRPathEngine; -import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.PostConstruct; import java.util.Collections; @@ -115,7 +119,7 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements } @Override - public Base resolveReference(Object theAppContext, String theUrl) throws FHIRException { + public Base resolveReference(Object appContext, String theUrl, Base refContext) throws FHIRException { /* * When we're doing resolution within the SearchParamExtractor, if we want diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorService.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorService.java index b0fc5901d98..95ce06c08de 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorService.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,20 +67,24 @@ public class SearchParamExtractorService { handleWarnings(theRequestDetails, myInterceptorBroadcaster, uris); theParams.myUriParams.addAll(uris); - ISearchParamExtractor.SearchParamSet coords = extractSearchParamCoords(theResource); - handleWarnings(theRequestDetails, myInterceptorBroadcaster, coords); - theParams.myCoordsParams.addAll(coords); - ourLog.trace("Storing date indexes: {}", theParams.myDateParams); for (BaseResourceIndexedSearchParam next : extractSearchParamTokens(theResource)) { if (next instanceof ResourceIndexedSearchParamToken) { theParams.myTokenParams.add((ResourceIndexedSearchParamToken) next); + } else if (next instanceof ResourceIndexedSearchParamCoords) { + theParams.myCoordsParams.add((ResourceIndexedSearchParamCoords) next); } else { theParams.myStringParams.add((ResourceIndexedSearchParamString) next); } } + for (BaseResourceIndexedSearchParam next : extractSearchParamSpecial(theResource)) { + if (next instanceof ResourceIndexedSearchParamCoords) { + theParams.myCoordsParams.add((ResourceIndexedSearchParamCoords) next); + } + } + populateResourceTable(theParams.myStringParams, theEntity); populateResourceTable(theParams.myNumberParams, theEntity); populateResourceTable(theParams.myQuantityParams, theEntity); @@ -113,10 +117,6 @@ public class SearchParamExtractorService { } } - private ISearchParamExtractor.SearchParamSet extractSearchParamCoords(IBaseResource theResource) { - return mySearchParamExtractor.extractSearchParamCoords(theResource); - } - private ISearchParamExtractor.SearchParamSet extractSearchParamDates(IBaseResource theResource) { return mySearchParamExtractor.extractSearchParamDates(theResource); } @@ -137,6 +137,10 @@ public class SearchParamExtractorService { return mySearchParamExtractor.extractSearchParamTokens(theResource); } + private ISearchParamExtractor.SearchParamSet extractSearchParamSpecial(IBaseResource theResource) { + return mySearchParamExtractor.extractSearchParamSpecial(theResource); + } + private ISearchParamExtractor.SearchParamSet extractSearchParamUri(IBaseResource theResource) { return mySearchParamExtractor.extractSearchParamUri(theResource); } diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryMatchResult.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryMatchResult.java index 30b43f5cd7f..737b46b859e 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryMatchResult.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryMatchResult.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.matcher; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,9 @@ public class InMemoryMatchResult { public static final String CHAIN = "Chained parameters are not supported"; public static final String PARAM = "Parameter not supported"; public static final String QUALIFIER = "Qualified parameter not supported"; + public static final String LOCATION_NEAR = "Location.position near not supported"; - private final boolean myMatch; + private final boolean myMatch; private final boolean mySupported; private final String myUnsupportedParameter; private final String myUnsupportedReason; diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java index 6ec9d7ec244..85d2281c30f 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InMemoryResourceMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.matcher; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,6 @@ import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import ca.uhn.fhir.jpa.searchparam.util.SourceParam; import ca.uhn.fhir.model.api.IQueryParameterType; -import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.param.BaseParamWithPrefix; @@ -40,6 +39,7 @@ import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.MetaUtil; import ca.uhn.fhir.util.UrlUtil; +import org.hl7.fhir.dstu3.model.Location; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -88,6 +88,9 @@ public class InMemoryResourceMatcher { if (searchParameterMap.getLastUpdated() != null) { return InMemoryMatchResult.unsupportedFromParameterAndReason(Constants.PARAM_LASTUPDATED, InMemoryMatchResult.STANDARD_PARAMETER); } + if (searchParameterMap.containsKey(Location.SP_NEAR)) { + return InMemoryMatchResult.unsupportedFromReason(InMemoryMatchResult.LOCATION_NEAR); + } for (Map.Entry>> entry : searchParameterMap.entrySet()) { String theParamName = entry.getKey(); @@ -142,7 +145,7 @@ public class InMemoryResourceMatcher { case Constants.PARAM_SOURCE: return InMemoryMatchResult.fromBoolean(matchSourcesAndOr(theAndOrParams, theResource)); default: - return matchResourceParam(theParamName, theAndOrParams, theSearchParams, resourceName, paramDef); + return matchResourceParam(myModelConfig, theParamName, theAndOrParams, theSearchParams, resourceName, paramDef); } } @@ -185,7 +188,7 @@ public class InMemoryResourceMatcher { return theValue.equals(theId.getValue()) || theValue.equals(theId.getIdPart()); } - private InMemoryMatchResult matchResourceParam(String theParamName, List> theAndOrParams, ResourceIndexedSearchParams theSearchParams, String theResourceName, RuntimeSearchParam theParamDef) { + private InMemoryMatchResult matchResourceParam(ModelConfig theModelConfig, String theParamName, List> theAndOrParams, ResourceIndexedSearchParams theSearchParams, String theResourceName, RuntimeSearchParam theParamDef) { if (theParamDef != null) { switch (theParamDef.getParamType()) { case QUANTITY: @@ -198,7 +201,7 @@ public class InMemoryResourceMatcher { if (theSearchParams == null) { return InMemoryMatchResult.successfulMatch(); } else { - return InMemoryMatchResult.fromBoolean(theAndOrParams.stream().anyMatch(nextAnd -> matchParams(theResourceName, theParamName, theParamDef, nextAnd, theSearchParams))); + return InMemoryMatchResult.fromBoolean(theAndOrParams.stream().anyMatch(nextAnd -> matchParams(theModelConfig, theResourceName, theParamName, theParamDef, nextAnd, theSearchParams))); } case COMPOSITE: case HAS: @@ -215,28 +218,8 @@ public class InMemoryResourceMatcher { } } - private boolean matchParams(String theResourceName, String theParamName, RuntimeSearchParam paramDef, List theNextAnd, ResourceIndexedSearchParams theSearchParams) { - if (paramDef.getParamType() == RestSearchParameterTypeEnum.REFERENCE) { - stripBaseUrlsFromReferenceParams(theNextAnd); - } - return theNextAnd.stream().anyMatch(token -> theSearchParams.matchParam(theResourceName, theParamName, paramDef, token)); - } - - private void stripBaseUrlsFromReferenceParams(List theNextAnd) { - if (myModelConfig.getTreatBaseUrlsAsLocal().isEmpty()) { - return; - } - - for (IQueryParameterType param : theNextAnd) { - ReferenceParam ref = (ReferenceParam) param; - IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); - - if (dt.hasBaseUrl()) { - if (myModelConfig.getTreatBaseUrlsAsLocal().contains(dt.getBaseUrl())) { - ref.setValue(dt.toUnqualified().getValue()); - } - } - } + private boolean matchParams(ModelConfig theModelConfig, String theResourceName, String theParamName, RuntimeSearchParam paramDef, List theNextAnd, ResourceIndexedSearchParams theSearchParams) { + return theNextAnd.stream().anyMatch(token -> theSearchParams.matchParam(theModelConfig, theResourceName, theParamName, paramDef, token)); } private boolean hasChain(List> theAndOrParams) { @@ -252,7 +235,7 @@ public class InMemoryResourceMatcher { for (List theAndOrParam : theAndOrParams) { for (IQueryParameterType param : theAndOrParam) { if (param instanceof BaseParamWithPrefix) { - ParamPrefixEnum prefix = ((BaseParamWithPrefix) param).getPrefix(); + ParamPrefixEnum prefix = ((BaseParamWithPrefix) param).getPrefix(); RestSearchParameterTypeEnum paramType = theParamDef.getParamType(); if (!supportedPrefix(prefix, paramType)) { return InMemoryMatchResult.unsupportedFromParameterAndReason(theParamName, String.format("The prefix %s is not supported for param type %s", prefix, paramType)); @@ -264,6 +247,7 @@ public class InMemoryResourceMatcher { return InMemoryMatchResult.successfulMatch(); } + @SuppressWarnings("EnumSwitchStatementWhichMissesCases") private boolean supportedPrefix(ParamPrefixEnum theParam, RestSearchParameterTypeEnum theParamType) { if (theParam == null || theParamType == null) { return true; diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/IndexedSearchParamExtractor.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/IndexedSearchParamExtractor.java index 3ee9a3501e4..cc0fb9da79a 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/IndexedSearchParamExtractor.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/IndexedSearchParamExtractor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.matcher; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InlineResourceLinkResolver.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InlineResourceLinkResolver.java index 828bbc1602e..9c19daa9365 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InlineResourceLinkResolver.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/InlineResourceLinkResolver.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.matcher; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,12 @@ package ca.uhn.fhir.jpa.searchparam.matcher; */ import ca.uhn.fhir.context.RuntimeSearchParam; -import ca.uhn.fhir.jpa.model.entity.ForcedId; +import ca.uhn.fhir.jpa.model.cross.IResourceLookup; +import ca.uhn.fhir.jpa.model.cross.ResourceLookup; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.extractor.IResourceLinkResolver; import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.springframework.stereotype.Service; @@ -33,18 +35,17 @@ import org.springframework.stereotype.Service; public class InlineResourceLinkResolver implements IResourceLinkResolver { @Override - public ResourceTable findTargetResource(RuntimeSearchParam theNextSpDef, String theNextPathsUnsplit, IIdType theNextId, String theTypeString, Class theType, String theId, RequestDetails theRequest) { + public IResourceLookup findTargetResource(RuntimeSearchParam theSearchParam, String theSourcePath, IIdType theSourceResourceId, String theTypeString, Class theType, IBaseReference theReference, RequestDetails theRequest) { + + /* + * TODO: JA - This gets used during runtime in-memory matching for subscription. It's not + * really clear if it's useful or not. + */ + ResourceTable target; target = new ResourceTable(); target.setResourceType(theTypeString); - if (theNextId.isIdPartValidLong()) { - target.setId(theNextId.getIdPartAsLong()); - } else { - ForcedId forcedId = new ForcedId(); - forcedId.setForcedId(theId); - target.setForcedId(forcedId); - } - return target; + return new ResourceLookup(theTypeString, null, null); } @Override diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/SearchParamMatcher.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/SearchParamMatcher.java index a863901cf6e..4266f361cb7 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/SearchParamMatcher.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/matcher/SearchParamMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.matcher; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/provider/SearchableHashMapResourceProvider.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/provider/SearchableHashMapResourceProvider.java index 1f7e4fb2591..951145dfe4a 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/provider/SearchableHashMapResourceProvider.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/provider/SearchableHashMapResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.provider; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamProvider.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamProvider.java index 40d9faae51e..e7fc2f61346 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamProvider.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.registry; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamRegistry.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamRegistry.java index 064bbc4d936..59019b4c798 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamRegistry.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/ISearchParamRegistry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.registry; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java index cf4f358e6c7..945b3d09739 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImpl.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.registry; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/retry/Retrier.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/retry/Retrier.java index 39c80184938..b946f83b2fe 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/retry/Retrier.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/retry/Retrier.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.searchparam.retry; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/Dstu3DistanceHelper.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/Dstu3DistanceHelper.java new file mode 100644 index 00000000000..635586cc8a7 --- /dev/null +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/Dstu3DistanceHelper.java @@ -0,0 +1,105 @@ +package ca.uhn.fhir.jpa.searchparam.util; + +/*- + * #%L + * HAPI FHIR Search Parameters + * %% + * Copyright (C) 2014 - 2020 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.model.api.IQueryParameterType; +import ca.uhn.fhir.rest.param.QuantityParam; +import ca.uhn.fhir.rest.param.ReferenceParam; +import org.hl7.fhir.dstu3.model.Location; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import java.util.Collection; +import java.util.List; + + +/** + * In DSTU3, the near-distance search parameter is separate from near. In this utility method, + * we search for near-distance search parameters and if we find any, remove them from the list + * of search parameters and store it in a dedicated field in {@link SearchParameterMap}. This is so that + * when the "near" search parameter is processed, we have access to this near-distance value. + * This requires at most one near-distance parameter. If more are found, we throw an {@link IllegalArgumentException}. + */ +public class Dstu3DistanceHelper { + public static void setNearDistance(Class theResourceType, SearchParameterMap theParams) { + if (theResourceType == Location.class && theParams.containsKey(Location.SP_NEAR_DISTANCE)) { + List> paramAndList = theParams.get(Location.SP_NEAR_DISTANCE); + QuantityParam quantityParam = getNearDistanceParam(paramAndList); + theParams.setNearDistanceParam(quantityParam); + + // Need to remove near-distance or it we'll get a hashcode predicate for it + theParams.remove(Location.SP_NEAR_DISTANCE); + } else if (theParams.containsKey("location")) { + List> paramAndList = theParams.get("location"); + ReferenceParam referenceParam = getChainedLocationNearDistanceParam(paramAndList); + if (referenceParam != null) { + QuantityParam quantityParam = new QuantityParam(referenceParam.getValue()); + theParams.setNearDistanceParam(quantityParam); + } + } + } + + private static ReferenceParam getChainedLocationNearDistanceParam(List> theParamAndList) { + ReferenceParam retval = null; + List andParamToRemove = null; + for (List paramOrList : theParamAndList) { + IQueryParameterType orParamToRemove = null; + for (IQueryParameterType param : paramOrList) { + if (param instanceof ReferenceParam) { + ReferenceParam referenceParam = (ReferenceParam) param; + if (Location.SP_NEAR_DISTANCE.equals(referenceParam.getChain())) { + if (retval != null) { + throw new IllegalArgumentException("Only one " + Location.SP_NEAR_DISTANCE + " parameter may be present"); + } else { + retval = referenceParam; + orParamToRemove = param; + } + } + } + } + if (orParamToRemove != null) { + paramOrList.remove(orParamToRemove); + if (paramOrList.isEmpty()) { + andParamToRemove = paramOrList; + } + } + } + if (andParamToRemove != null) { + theParamAndList.remove(andParamToRemove); + } + return retval; + } + + private static QuantityParam getNearDistanceParam(List> theParamAndList) { + long sum = theParamAndList.stream().mapToLong(Collection::size).sum(); + + // No near-distance Param + if (sum == 0) { + return null; + // A single near-distance Param + } else if (sum == 1) { + return (QuantityParam) theParamAndList.get(0).get(0); + // Too many near-distance params + } else { + throw new IllegalArgumentException("Only one " + Location.SP_NEAR_DISTANCE + " parameter may be present"); + } + } +} diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/SourceParam.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/SourceParam.java index 069fa005465..938fcf6cb99 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/SourceParam.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/util/SourceParam.java @@ -8,7 +8,7 @@ import static org.apache.commons.lang3.StringUtils.left; * #%L * HAPI FHIR Search Parameters * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/IndexStressTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/IndexStressTest.java index 154b8d8b4dd..ba6bc186d30 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/IndexStressTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/IndexStressTest.java @@ -2,16 +2,15 @@ package ca.uhn.fhir.jpa.searchparam; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeSearchParam; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; -import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorDstu3; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; import ca.uhn.fhir.util.StopWatch; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.dstu3.model.Patient; import org.junit.Test; import org.slf4j.Logger; @@ -23,7 +22,11 @@ import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; public class IndexStressTest { @@ -38,7 +41,7 @@ public class IndexStressTest { FhirContext ctx = FhirContext.forDstu3(); IValidationSupport mockValidationSupport = mock(IValidationSupport.class); - IValidationSupport validationSupport = new CachingValidationSupport(new ValidationSupportChain(new DefaultProfileValidationSupport(), mockValidationSupport)); + IValidationSupport validationSupport = new CachingValidationSupport(new ValidationSupportChain(new DefaultProfileValidationSupport(ctx), mockValidationSupport)); ISearchParamRegistry searchParamRegistry = mock(ISearchParamRegistry.class); SearchParamExtractorDstu3 extractor = new SearchParamExtractorDstu3(new ModelConfig(), ctx, validationSupport, searchParamRegistry); extractor.start(); @@ -61,6 +64,6 @@ public class IndexStressTest { ourLog.info("Indexed {} times in {}ms/time", loops, sw.getMillisPerOperation(loops)); assertEquals(9, params.size()); - verify(mockValidationSupport, times(1)).fetchAllStructureDefinitions((any(FhirContext.class))); + verify(mockValidationSupport, times(1)).fetchAllStructureDefinitions(); } } diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParamsTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParamsTest.java index 252834ab82c..9ad2b47360a 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParamsTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParamsTest.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.jpa.searchparam.extractor; -import ca.uhn.fhir.jpa.model.entity.ForcedId; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.rest.param.ReferenceParam; @@ -14,72 +14,70 @@ import java.util.Set; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.empty; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; public class ResourceIndexedSearchParamsTest { public static final String STRING_ID = "StringId"; public static final String LONG_ID = "123"; private ResourceIndexedSearchParams myParams; - private ResourceTable myTarget; + private ResourceTable mySource; + private ModelConfig myModelConfig = new ModelConfig(); @Before public void before() { - ResourceTable source = new ResourceTable(); - source.setResourceType("Patient"); + mySource = new ResourceTable(); + mySource.setResourceType("Patient"); - myTarget = new ResourceTable(); - myTarget.setResourceType("Organization"); - - myParams = new ResourceIndexedSearchParams(source); - ResourceLink link = new ResourceLink("organization", source, myTarget, new Date()); - myParams.getResourceLinks().add(link); + myParams = new ResourceIndexedSearchParams(mySource); } @Test public void matchResourceLinksStringCompareToLong() { - ReferenceParam referenceParam = getReferenceParam(STRING_ID); - myTarget.setId(123L); + ResourceLink link = ResourceLink.forLocalReference("organization", mySource, "Organization", 123L, LONG_ID, new Date()); + myParams.getResourceLinks().add(link); - boolean result = myParams.matchResourceLinks("Patient", "organization", referenceParam, "organization"); + ReferenceParam referenceParam = getReferenceParam(STRING_ID); + boolean result = myParams.matchResourceLinks(myModelConfig, "Patient", "organization", referenceParam, "organization"); assertFalse(result); } @Test public void matchResourceLinksStringCompareToString() { - ReferenceParam referenceParam = getReferenceParam(STRING_ID); - ForcedId forcedid = new ForcedId(); - forcedid.setForcedId(STRING_ID); - myTarget.setForcedId(forcedid); + ResourceLink link = ResourceLink.forLocalReference("organization", mySource, "Organization", 123L, STRING_ID, new Date()); + myParams.getResourceLinks().add(link); - boolean result = myParams.matchResourceLinks("Patient", "organization", referenceParam, "organization"); + ReferenceParam referenceParam = getReferenceParam(STRING_ID); + boolean result = myParams.matchResourceLinks(myModelConfig, "Patient", "organization", referenceParam, "organization"); assertTrue(result); } @Test public void matchResourceLinksLongCompareToString() { - ReferenceParam referenceParam = getReferenceParam(LONG_ID); - ForcedId forcedid = new ForcedId(); - forcedid.setForcedId(STRING_ID); - myTarget.setForcedId(forcedid); + ResourceLink link = ResourceLink.forLocalReference("organization", mySource, "Organization", 123L, STRING_ID, new Date()); + myParams.getResourceLinks().add(link); - boolean result = myParams.matchResourceLinks("Patient", "organization", referenceParam, "organization"); + ReferenceParam referenceParam = getReferenceParam(LONG_ID); + boolean result = myParams.matchResourceLinks(myModelConfig, "Patient", "organization", referenceParam, "organization"); assertFalse(result); } @Test public void matchResourceLinksLongCompareToLong() { - ReferenceParam referenceParam = getReferenceParam(LONG_ID); - myTarget.setId(123L); + ResourceLink link = ResourceLink.forLocalReference("organization", mySource, "Organization", 123L, LONG_ID, new Date()); + myParams.getResourceLinks().add(link); - boolean result = myParams.matchResourceLinks("Patient", "organization", referenceParam, "organization"); + ReferenceParam referenceParam = getReferenceParam(LONG_ID); + boolean result = myParams.matchResourceLinks(myModelConfig, "Patient", "organization", referenceParam, "organization"); assertTrue(result); } private ReferenceParam getReferenceParam(String theId) { - ReferenceParam retval = new ReferenceParam(); - retval.setValue(theId); - return retval; + ReferenceParam retVal = new ReferenceParam(); + retVal.setValue(theId); + return retVal; } @@ -93,14 +91,14 @@ public class ResourceIndexedSearchParamsTest { Lists.newArrayList("name=SMITH", "name=JOHN") ); values = ResourceIndexedSearchParams.extractCompositeStringUniquesValueChains("Patient", partsChoices); - assertThat(values.toString(), values, containsInAnyOrder("Patient?gender=male&name=JOHN","Patient?gender=male&name=SMITH")); + assertThat(values.toString(), values, containsInAnyOrder("Patient?gender=male&name=JOHN", "Patient?gender=male&name=SMITH")); partsChoices = Lists.newArrayList( Lists.newArrayList("gender=male", ""), Lists.newArrayList("name=SMITH", "name=JOHN", "") ); values = ResourceIndexedSearchParams.extractCompositeStringUniquesValueChains("Patient", partsChoices); - assertThat(values.toString(), values, containsInAnyOrder("Patient?gender=male&name=JOHN","Patient?gender=male&name=SMITH")); + assertThat(values.toString(), values, containsInAnyOrder("Patient?gender=male&name=JOHN", "Patient?gender=male&name=SMITH")); partsChoices = Lists.newArrayList( ); diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java index 997af44b554..bf1798aed47 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorDstu3Test.java @@ -1,10 +1,18 @@ package ca.uhn.fhir.jpa.searchparam.extractor; -import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; -import ca.uhn.fhir.jpa.model.entity.*; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamCoords; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamNumber; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamQuantity; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken; +import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri; import ca.uhn.fhir.jpa.model.util.StringNormalizer; import ca.uhn.fhir.jpa.searchparam.JpaRuntimeSearchParam; import ca.uhn.fhir.jpa.searchparam.SearchParamConstants; @@ -13,20 +21,29 @@ import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.util.TestUtil; import com.google.common.collect.Sets; import org.hamcrest.Matchers; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.*; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.dstu3.model.Duration; +import org.hl7.fhir.dstu3.model.Encounter; +import org.hl7.fhir.dstu3.model.Location; +import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Questionnaire; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import java.text.Normalizer; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.junit.Assert.*; -import static org.mockito.ArgumentMatchers.contains; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class SearchParamExtractorDstu3Test { @@ -185,6 +202,24 @@ public class SearchParamExtractorDstu3Test { } } + @Test + public void testParamCoords() { + Location loc = new Location(); + double latitude = 40.0; + double longitude = 80.0; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + + ISearchParamRegistry searchParamRegistry = new MySearchParamRegistry(); + + SearchParamExtractorDstu3 extractor = new SearchParamExtractorDstu3(new ModelConfig(), ourCtx, ourValidationSupport, searchParamRegistry); + extractor.start(); + ISearchParamExtractor.SearchParamSet coords = extractor.extractSearchParamTokens(loc); + assertEquals(1, coords.size()); + ResourceIndexedSearchParamCoords coord = (ResourceIndexedSearchParamCoords) coords.iterator().next(); + assertEquals(latitude, coord.getLatitude(), 0.0); + assertEquals(longitude, coord.getLongitude(), 0.0); + } private static class MySearchParamRegistry implements ISearchParamRegistry { @@ -264,7 +299,7 @@ public class SearchParamExtractorDstu3Test { @BeforeClass public static void beforeClass() { - ourValidationSupport = new DefaultProfileValidationSupport(); + ourValidationSupport = new DefaultProfileValidationSupport(ourCtx); } } diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java index da6dacf4bf4..1e149d6d52e 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java @@ -3,7 +3,7 @@ package ca.uhn.fhir.jpa.searchparam.extractor; import ca.uhn.fhir.context.*; import ca.uhn.fhir.jpa.searchparam.JpaRuntimeSearchParam; import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseEnumeration; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -12,7 +12,12 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import static org.junit.Assert.assertEquals; @@ -37,15 +42,15 @@ public class SearchParamExtractorMegaTest { ctx = FhirContext.forDstu3(); searchParamRegistry = new MySearchParamRegistry(ctx); - process(ctx, new SearchParamExtractorDstu3(null, ctx, new DefaultProfileValidationSupport(), searchParamRegistry)); + process(ctx, new SearchParamExtractorDstu3(null, ctx, new DefaultProfileValidationSupport(ctx), searchParamRegistry)); ctx = FhirContext.forR4(); searchParamRegistry = new MySearchParamRegistry(ctx); - process(ctx, new SearchParamExtractorR4(null, ctx, new org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport(), searchParamRegistry)); + process(ctx, new SearchParamExtractorR4(null, ctx, new DefaultProfileValidationSupport(ctx), searchParamRegistry)); ctx = FhirContext.forR5(); searchParamRegistry = new MySearchParamRegistry(ctx); - process(ctx, new SearchParamExtractorR5(ctx, new org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport(), searchParamRegistry)); + process(ctx, new SearchParamExtractorR5(ctx, new DefaultProfileValidationSupport(ctx), searchParamRegistry)); } private void process(FhirContext theCtx, BaseSearchParamExtractor theExtractor) throws Exception { @@ -163,6 +168,7 @@ public class SearchParamExtractorMegaTest { case "instant": leaf.setValueAsString("2019-10-10T11:11:11Z"); break; + case "integer64": case "integer": case "decimal": leaf.setValueAsString("1"); @@ -177,10 +183,6 @@ public class SearchParamExtractorMegaTest { ISearchParamExtractor.SearchParamSet set; - set = theExtractor.extractSearchParamCoords(resource); - assertEquals(0, set.getWarnings().size()); - theIndexesCounter.addAndGet(set.size()); - set = theExtractor.extractSearchParamDates(resource); assertEquals(0, set.getWarnings().size()); theIndexesCounter.addAndGet(set.size()); @@ -194,7 +196,7 @@ public class SearchParamExtractorMegaTest { theIndexesCounter.addAndGet(set.size()); set = theExtractor.extractSearchParamQuantity(resource); - assertEquals(0, set.getWarnings().size()); + assertEquals(String.join("\n", set.getWarnings()), 0, set.getWarnings().size()); theIndexesCounter.addAndGet(set.size()); set = theExtractor.extractSearchParamTokens(resource); diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 19a6c3caf27..74f140ae27c 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscription.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscription.java index bdc1fa414c1..7ddc2f5f637 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscription.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscription.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,7 @@ package ca.uhn.fhir.jpa.subscription.module; */ import ca.uhn.fhir.context.FhirContext; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; +import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; @@ -39,9 +38,7 @@ import java.util.*; import static org.apache.commons.lang3.StringUtils.isNotBlank; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public class CanonicalSubscription implements Serializable, Cloneable { +public class CanonicalSubscription implements Serializable, Cloneable, IModelJson { private static final long serialVersionUID = 1L; @@ -279,9 +276,7 @@ public class CanonicalSubscription implements Serializable, Cloneable { } } - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) - public static class EmailDetails { + public static class EmailDetails implements IModelJson { @JsonProperty("from") private String myFrom; @@ -334,9 +329,7 @@ public class CanonicalSubscription implements Serializable, Cloneable { } } - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) - public static class RestHookDetails { + public static class RestHookDetails implements IModelJson { @JsonProperty("stripVersionId") private boolean myStripVersionId; @@ -391,9 +384,7 @@ public class CanonicalSubscription implements Serializable, Cloneable { } - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) - public static class CanonicalEventDefinition { + public static class CanonicalEventDefinition implements IModelJson { /** * Constructor diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscriptionChannelType.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscriptionChannelType.java index d64aace86f8..474fd3ac1e3 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscriptionChannelType.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/CanonicalSubscriptionChannelType.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java index 2ab786b26e8..ea53e3fd693 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/ResourceModifiedMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/ResourceModifiedMessage.java index 130b75f5347..2bda901b43b 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/ResourceModifiedMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/ResourceModifiedMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,9 @@ package ca.uhn.fhir.jpa.subscription.module; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.subscription.module.subscriber.BaseResourceMessage; import ca.uhn.fhir.jpa.subscription.module.subscriber.IResourceMessage; +import ca.uhn.fhir.model.api.IModelJson; import ca.uhn.fhir.util.ResourceReferenceInfo; -import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -37,9 +36,7 @@ import java.util.List; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public class ResourceModifiedMessage extends BaseResourceMessage implements IResourceMessage { +public class ResourceModifiedMessage extends BaseResourceMessage implements IResourceMessage, IModelJson { @JsonProperty("resourceId") private String myId; diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscription.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscription.java index 5289910e437..cdacb3401f5 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscription.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscription.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscriptionCache.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscriptionCache.java index e19bd4cb94a..305a1889161 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscriptionCache.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ActiveSubscriptionCache.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ISubscriptionProvider.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ISubscriptionProvider.java index 0bc4a0e67f3..1f254e919b3 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ISubscriptionProvider.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/ISubscriptionProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java index 6f6052dcd64..472a07a0931 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionCanonicalizer.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionCanonicalizer.java index d398e20a4da..a1229b456a5 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionCanonicalizer.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionCanonicalizer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionConstants.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionConstants.java index cb7f1321321..4c3822cd420 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionConstants.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionConstants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionLoader.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionLoader.java index a575df4bb3d..8a7d09abca2 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionLoader.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionLoader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistry.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistry.java index 30d621d6e6e..f507e980034 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistry.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.cache; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java index 7407a42447a..669401726d7 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscriptionDeliveryChannelNamer.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscriptionDeliveryChannelNamer.java index 1aa41b85f4c..bf7700db087 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscriptionDeliveryChannelNamer.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscriptionDeliveryChannelNamer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelCache.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelCache.java index 9c5d226468d..5f8f66983ff 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelCache.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelCache.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java index 88019963d06..c2a2eca6589 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,17 +24,11 @@ import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage; import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.SubscribableChannel; -import org.springframework.stereotype.Component; -@Component public class SubscriptionChannelFactory { - private ISubscribableChannelFactory mySubscribableChannelFactory; - @Autowired - public SubscriptionChannelFactory(ISubscribableChannelFactory theSubscribableChannelFactory) { - mySubscribableChannelFactory = theSubscribableChannelFactory; - } + private ISubscribableChannelFactory mySubscribableChannelFactory; public SubscribableChannel newDeliveryChannel(String theChannelName) { return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceDeliveryMessage.class, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers()); diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java index 299c689b9c7..8dbdfffba09 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelWithHandlers.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelWithHandlers.java index fa83aaa0394..4e6577d4eba 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelWithHandlers.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelWithHandlers.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryChannelNamer.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryChannelNamer.java index 6979f812a41..d3a1caca889 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryChannelNamer.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryChannelNamer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryHandlerFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryHandlerFactory.java index d646786501b..693d1ec994f 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryHandlerFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionDeliveryHandlerFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/BaseSubscriptionConfig.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/BaseSubscriptionConfig.java index b22a7e7267d..2a45b7a99f5 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/BaseSubscriptionConfig.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/BaseSubscriptionConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package ca.uhn.fhir.jpa.subscription.module.config; import ca.uhn.fhir.interceptor.executor.InterceptorService; import ca.uhn.fhir.jpa.subscription.module.cache.LinkedBlockingQueueSubscribableChannelFactory; import ca.uhn.fhir.jpa.subscription.module.channel.ISubscribableChannelFactory; +import ca.uhn.fhir.jpa.subscription.module.channel.SubscriptionChannelFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -33,7 +34,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; @ComponentScan(basePackages = {"ca.uhn.fhir.jpa.subscription.module"}) public abstract class BaseSubscriptionConfig { @Bean - public ISubscribableChannelFactory blockingQueueSubscriptionDeliveryChannelFactory() { + public ISubscribableChannelFactory subscribableChannelFactory() { return new LinkedBlockingQueueSubscribableChannelFactory(); } @@ -41,4 +42,9 @@ public abstract class BaseSubscriptionConfig { public InterceptorService interceptorRegistry() { return new InterceptorService("hapi-fhir-jpa-subscription"); } + + @Bean + public SubscriptionChannelFactory subscriptionChannelFactory() { + return new SubscriptionChannelFactory(); + } } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu2Config.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu2Config.java index 3b077cff040..cad255ac6b5 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu2Config.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu2Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu3Config.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu3Config.java index 893bcac5ab3..80f53b7f0ba 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu3Config.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionDstu3Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,10 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #L% */ +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.searchparam.config.SearchParamDstu3Config; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; @@ -31,8 +32,8 @@ import org.springframework.context.annotation.Primary; @Import({SearchParamDstu3Config.class}) public class SubscriptionDstu3Config extends BaseSubscriptionConfig { @Primary - @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChainDstu3") + @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChain") public IValidationSupport validationSupportChainDstu3() { - return new DefaultProfileValidationSupport(); + return new DefaultProfileValidationSupport(FhirContext.forDstu3()); } } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionR4Config.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionR4Config.java index e6189e6c7d6..47f634781aa 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionR4Config.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/config/SubscriptionR4Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,10 @@ package ca.uhn.fhir.jpa.subscription.module.config; * #L% */ +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.jpa.searchparam.config.SearchParamR4Config; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; @@ -32,8 +33,8 @@ import org.springframework.context.annotation.Primary; public class SubscriptionR4Config extends BaseSubscriptionConfig { @Primary - @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChainR4") + @Bean(autowire = Autowire.BY_NAME, name = "myJpaValidationSupportChain") public IValidationSupport validationSupportChainR4() { - return new DefaultProfileValidationSupport(); + return new DefaultProfileValidationSupport(FhirContext.forR4()); } } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/interceptor/SubscriptionDebugLogInterceptor.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/interceptor/SubscriptionDebugLogInterceptor.java index fa501f475c5..4baef540493 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/interceptor/SubscriptionDebugLogInterceptor.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/interceptor/SubscriptionDebugLogInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.interceptor; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/ISubscriptionMatcher.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/ISubscriptionMatcher.java index b484cfa48ab..15337a26e21 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/ISubscriptionMatcher.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/ISubscriptionMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcher.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcher.java index bb9ea4247e4..ca6d3d8e0dd 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcher.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcher.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionMatchingStrategy.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionMatchingStrategy.java index 019a8c12c09..f49b7996b63 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionMatchingStrategy.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionMatchingStrategy.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionStrategyEvaluator.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionStrategyEvaluator.java index 521c8b1f250..3c805b537b0 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionStrategyEvaluator.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/matcher/SubscriptionStrategyEvaluator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientResourceRetriever.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientResourceRetriever.java index b9262151169..d112209ae2d 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientResourceRetriever.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientResourceRetriever.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.standalone; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,6 @@ public class FhirClientResourceRetriever implements IResourceRetriever { public IBaseResource getResource(IIdType payloadId) throws ResourceGoneException { RuntimeResourceDefinition resourceDef = myFhirContext.getResourceDefinition(payloadId.getResourceType()); - return myClient.search().forResource(resourceDef.getName()).withIdAndCompartment(payloadId.getIdPart(), payloadId.getResourceType()).execute(); + return myClient.read().resource(resourceDef.getName()).withId(payloadId).execute(); } } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSearchParamProvider.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSearchParamProvider.java index 5e8b5a76964..3d9b3aa64ed 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSearchParamProvider.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSearchParamProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.standalone; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSubscriptionProvider.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSubscriptionProvider.java index ae66b1bf2b9..50847f4fe92 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSubscriptionProvider.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/FhirClientSubscriptionProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.standalone; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/StandaloneSubscriptionMessageHandler.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/StandaloneSubscriptionMessageHandler.java index 1d3d05ab409..4a62d37baf1 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/StandaloneSubscriptionMessageHandler.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/standalone/StandaloneSubscriptionMessageHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.standalone; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseJsonMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseJsonMessage.java index af150b64e24..a140978bec3 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseJsonMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseJsonMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +20,12 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #L% */ -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; +import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public abstract class BaseJsonMessage implements Message { +public abstract class BaseJsonMessage implements Message, IModelJson { private static final long serialVersionUID = 1L; @JsonProperty("headers") diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseResourceMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseResourceMessage.java index f4e28ef7dae..fe00948e503 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseResourceMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseResourceMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #L% */ -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; +import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.Validate; @@ -30,9 +29,7 @@ import java.util.Map; import java.util.Optional; @SuppressWarnings("WeakerAccess") -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public abstract class BaseResourceMessage implements IResourceMessage { +public abstract class BaseResourceMessage implements IResourceMessage, IModelJson { @JsonProperty("attributes") private Map myAttributes; diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseSubscriptionDeliverySubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseSubscriptionDeliverySubscriber.java index c80ff17c202..0107adf61ad 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseSubscriptionDeliverySubscriber.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/BaseSubscriptionDeliverySubscriber.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceMessage.java index 0548b46a910..6bc41c53e4d 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceRetriever.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceRetriever.java index f56b61981b4..939fd5f1bfc 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceRetriever.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/IResourceRetriever.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryJsonMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryJsonMessage.java index 16da21fa96e..fdeaef18d67 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryJsonMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryJsonMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,9 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #L% */ -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public class ResourceDeliveryJsonMessage extends BaseJsonMessage { @JsonProperty("payload") diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryMessage.java index ea73581c87f..51e9d752ce8 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceDeliveryMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.subscription.module.CanonicalSubscription; import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage; import ca.uhn.fhir.rest.api.EncodingEnum; -import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -35,8 +33,6 @@ import org.hl7.fhir.instance.model.api.IIdType; import static org.apache.commons.lang3.StringUtils.isNotBlank; @SuppressWarnings("WeakerAccess") -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public class ResourceDeliveryMessage extends BaseResourceMessage implements IResourceMessage { @JsonProperty("canonicalSubscription") diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceModifiedJsonMessage.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceModifiedJsonMessage.java index bbf1f83224a..9a0c2be5c72 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceModifiedJsonMessage.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/ResourceModifiedJsonMessage.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,9 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; */ import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public class ResourceModifiedJsonMessage extends BaseJsonMessage { @JsonProperty("payload") diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java index 52b9d514a3c..b5e3d84170a 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionMatchingSubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionMatchingSubscriber.java index e522120f7ac..0401be75496 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionMatchingSubscriber.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionMatchingSubscriber.java @@ -34,7 +34,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/EmailDetails.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/EmailDetails.java index c77cfb2e23d..4043255b58c 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/EmailDetails.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/EmailDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.email; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/IEmailSender.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/IEmailSender.java index b8c1f965417..ff6d3a9dafb 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/IEmailSender.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/IEmailSender.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.email; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/JavaMailEmailSender.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/JavaMailEmailSender.java index 0e0de1923d6..df826fa80ff 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/JavaMailEmailSender.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/JavaMailEmailSender.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.email; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/SubscriptionDeliveringEmailSubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/SubscriptionDeliveringEmailSubscriber.java index 765e849d814..79175fd38c6 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/SubscriptionDeliveringEmailSubscriber.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/email/SubscriptionDeliveringEmailSubscriber.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.email; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/SubscriptionWebsocketHandler.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/SubscriptionWebsocketHandler.java index d10cacfecea..66900c5c271 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/SubscriptionWebsocketHandler.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/SubscriptionWebsocketHandler.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.websocket; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidator.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidator.java index cd42c75afb8..85ed070204e 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidator.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidator.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.websocket; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketValidationResponse.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketValidationResponse.java index f4b0aabedbe..b0112a83ee5 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketValidationResponse.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketValidationResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.jpa.subscription.module.subscriber.websocket; * #%L * HAPI FHIR Subscription Server * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR3Test.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR3Test.java index e5ded60c29e..82c9384d4de 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR3Test.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/matcher/InMemorySubscriptionMatcherR3Test.java @@ -1,5 +1,6 @@ package ca.uhn.fhir.jpa.subscription.module.matcher; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult; import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher; @@ -28,6 +29,8 @@ public class InMemorySubscriptionMatcherR3Test extends BaseSubscriptionDstu3Test SearchParamMatcher mySearchParamMatcher; @Autowired ModelConfig myModelConfig; + @Autowired + FhirContext myFhirContext; private void assertUnsupported(IBaseResource resource, String criteria) { assertFalse(mySearchParamMatcher.match(criteria, resource, null).supported()); @@ -622,4 +625,21 @@ public class InMemorySubscriptionMatcherR3Test extends BaseSubscriptionDstu3Test assertNotMatched(patient, badCriteria3); assertNotMatched(patient, badCriteria4); } + + @Test + public void testLocationPositionNotSupported() { + Location loc = new Location(); + double latitude = 30.0; + double longitude = 40.0; + Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude); + loc.setPosition(position); + double bigEnoughDistance = 100.0; + String badCriteria = + "Location?" + + Location.SP_NEAR + "=" + latitude + ":" + longitude + + "&" + + Location.SP_NEAR_DISTANCE + "=" + bigEnoughDistance + "|http://unitsofmeasure.org|km"; + + assertUnsupported(loc, badCriteria); + } } diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/standalone/BaseBlockingQueueSubscribableChannelDstu3Test.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/standalone/BaseBlockingQueueSubscribableChannelDstu3Test.java index 02572f42786..75a5c6c0fb1 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/standalone/BaseBlockingQueueSubscribableChannelDstu3Test.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/standalone/BaseBlockingQueueSubscribableChannelDstu3Test.java @@ -165,7 +165,7 @@ public abstract class BaseBlockingQueueSubscribableChannelDstu3Test extends Base ourListenerServerBase = "http://localhost:" + ourListenerPort + "/fhir/context"; FhirContext context = ourListenerRestServer.getFhirContext(); //Preload structure definitions so the load doesn't happen during the test (first load can be a little slow) - context.getValidationSupport().fetchAllStructureDefinitions(context); + context.getValidationSupport().fetchAllStructureDefinitions(); } @AfterClass diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 32f3752d80e..981ea8587b4 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml @@ -157,7 +157,7 @@ ca.uhn.hapi.fhir hapi-fhir-converter - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java index fdb1dccca7d..72d5a121920 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java @@ -41,14 +41,6 @@ public class TestDstu2Config extends BaseJavaConfigDstu2 { @Value(FHIR_LUCENE_LOCATION_DSTU2) private String myFhirLuceneLocation; - /** - * This lets the "@Value" fields reference properties from the properties file - */ - @Bean - public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - @Bean public PublicSecurityInterceptor securityInterceptor() { return new PublicSecurityInterceptor(); @@ -146,12 +138,20 @@ public class TestDstu2Config extends BaseJavaConfigDstu2 { requestValidator.setFailOnSeverity(null); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorDstu2()); + requestValidator.addValidatorModule(instanceValidator()); requestValidator.setIgnoreValidatorExceptions(true); return requestValidator; } + /** + * This lets the "@Value" fields reference properties from the properties file + */ + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + // @Bean(autowire = Autowire.BY_TYPE) // public IServerInterceptor subscriptionSecurityInterceptor() { // return new SubscriptionsRequireManualActivationInterceptorDstu2(); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java index eed61ff64af..d8bd05032bb 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java @@ -146,7 +146,7 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { requestValidator.setFailOnSeverity(null); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorDstu3()); + requestValidator.addValidatorModule(instanceValidator()); requestValidator.setIgnoreValidatorExceptions(true); return requestValidator; diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java index 6b836aab1b4..7ccf19daeac 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java @@ -140,7 +140,7 @@ public class TestR4Config extends BaseJavaConfigR4 { requestValidator.setFailOnSeverity(null); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorR4()); + requestValidator.addValidatorModule(instanceValidator()); requestValidator.setIgnoreValidatorExceptions(true); return requestValidator; diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java index c71bfd1259c..b533739fcad 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java @@ -140,7 +140,7 @@ public class TestR5Config extends BaseJavaConfigR5 { requestValidator.setFailOnSeverity(null); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorR5()); + requestValidator.addValidatorModule(instanceValidator()); requestValidator.setIgnoreValidatorExceptions(true); return requestValidator; diff --git a/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/TemplateNarrativeGenerator.java b/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/TemplateNarrativeGenerator.java index a1d6a35da3e..fcb7fea9c61 100644 --- a/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/TemplateNarrativeGenerator.java +++ b/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/TemplateNarrativeGenerator.java @@ -28,7 +28,7 @@ public class TemplateNarrativeGenerator implements INarrativeGenerator { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TemplateNarrativeGenerator.class); private FhirContext myFhirContext = FhirContext.forDstu3(); - private IValidationSupport myValidationSupport = new DefaultProfileValidationSupport(); + private IContextValidationSupport myValidationSupport = new DefaultProfileValidationSupport(); @Override public void generateNarrative(FhirContext theContext, IBaseResource theResource, INarrative theNarrative) { diff --git a/hapi-fhir-osgi-core/pom.xml b/hapi-fhir-osgi-core/pom.xml deleted file mode 100644 index 35d30c0c7df..00000000000 --- a/hapi-fhir-osgi-core/pom.xml +++ /dev/null @@ -1,299 +0,0 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-deployable-pom - 3.0.0-SNAPSHOT - ../hapi-deployable-pom/pom.xml - - - hapi-fhir-osgi-core - bundle - - http://jamesagnew.github.io/hapi-fhir/ - - HAPI FHIR - OSGi Bundle - - - - ca.uhn.hapi.fhir - hapi-fhir-base - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-utilities - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-client - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-server - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-hl7org-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-r4 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu3 - ${project.version} - - - - org.thymeleaf - thymeleaf - - - com.helger - ph-schematron - - - Saxon-HE - net.sf.saxon - - - - - com.helger - ph-commons - - - - javax.servlet - javax.servlet-api - provided - - - - - org.slf4j - slf4j-api - ${slf4j_target_version} - - - - - es.nitaur.markdown - txtmark - true - - - org.antlr - ST4 - true - - - xpp3 - xpp3 - true - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - **/ca/uhn/fhir/rest/server/interceptor/CorsInterceptor.java - - - - - - - maven-antrun-plugin - - - copySources - generate-sources - - run - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - target/sources - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - ${project.artifactId} - - <_nouses>true - <_removeheaders>Built-By, Include-Resource, Private-Package, Require-Capability - - - - !ca.uhn.*, - !org.hl7.*, - com.ctc.wstx.api;version="4.4";resolution:=optional, - com.ctc.wstx.*;version="4.4";resolution:=optional, - com.google.*;resolution:=optional;-remove-attribute:=version, - com.helger.commons;resolution:=optional;-remove-attribute:=version, - com.helger.*;resolution:=optional;-remove-attribute:=version, - javassist;-remove-attribute:=version, - javax.*;-remove-attribute:=version, - net.sf.saxon;resolution:=optional, - org.apache.commons.*;-remove-attribute:=version, - org.apache.http.client.protocol;version="4.0", - org.apache.http.*;version="4.0", - org.codehaus.stax2;resolution:=optional;-remove-attribute:=version, - org.codehaus.stax2.*;resolution:=optional;-remove-attribute:=version, - org.oclc.purl.*;-remove-attribute:=version, - org.slf4j.*;-remove-attribute:=version, - org.xmlpull.v1;resolution:=optional, - * - - - - - - - bundle - - package - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - true - - - - - integration-test - verify - - integration-test - - - - - - - - src/main/resources - true - - - ../hapi-fhir-base/src/main/resources - true - - - ../hapi-fhir-structures-dstu/src/main/resources - false - - - ../hapi-fhir-structures-dstu/target/generated-resources/tinder - false - - - ../hapi-fhir-structures-dstu2/src/main/resources - false - - - ../hapi-fhir-structures-dstu2/target/generated-resources/tinder - false - - - ../hapi-fhir-structures-hl7org-dstu2/src/main/resources - false - - - ../hapi-fhir-structures-dstu3/src/main/resources - false - - - - ../hapi-fhir-validation-resources-dstu2/src/main/resources - false - - - ../hapi-fhir-validation-resources-dstu3/src/main/resources - false - - - - - - - - - diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirConfigurationException.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirConfigurationException.java deleted file mode 100644 index 5336f50f85e..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirConfigurationException.java +++ /dev/null @@ -1,50 +0,0 @@ -package ca.uhn.fhir.osgi; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -/** - * Exception thrown from the Spring-DM/OSGi wiring. These - * exceptions are thrown when an error was encountered - * that was caused by incorrect wiring. - * - * @author Akana, Inc. Professional Services - * - */ -public class FhirConfigurationException extends Exception { - - public FhirConfigurationException() { - super(); - } - - public FhirConfigurationException(String message) { - super(message); - } - - public FhirConfigurationException(Throwable cause) { - super(cause); - } - - public FhirConfigurationException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirProviderBundle.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirProviderBundle.java deleted file mode 100644 index dbd5d28eed8..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirProviderBundle.java +++ /dev/null @@ -1,56 +0,0 @@ -package ca.uhn.fhir.osgi; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.util.Collection; - -/** - * This is an abstraction for adding one or more Providers - * ("plain" providers as well as Resource Providers) - * to the configuration of a Fhir Server. This approach - * is needed versus direct publication of providers as - * OSGi services because references to OSGi services are - * really proxies that only implement the methods of the - * service's interfaces. This means that the introspection - * and annotation processing needed for HAPI FHIR provider - * processing is not possible on those proxy references.. - * - * To get around this restriction, instances of this interface - * will be published as OSGi services and the real providers - * will typically be Spring wired into the underlying bean. - * - * Beans that are decorated with this interface can be - * published as OSGi services and will be registered in - * the specified FHIR Server. The OSGi service definition - * should have the following entry: - * - * - * - * where the value matches the same - * assigned to a FhirServer OSGi service. -* - * @author Akana, Inc. Professional Services - * - */ -public interface FhirProviderBundle { - public Collection getProviders(); -} diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServer.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServer.java deleted file mode 100644 index 1561fe992b3..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServer.java +++ /dev/null @@ -1,87 +0,0 @@ -package ca.uhn.fhir.osgi; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.util.Collection; - - -/** - * Instances of the FHIR Server must implement this interface - * in order to be registered as OSGi services capable of dynamic - * provider registration. It expected that implementations of this - * interface will also extend RestfulService. - * - * The OSGi service definition for instances of the FHIR SERver - * should have the following entry: - * - * - * - * where the value matches the same specified - * on the published "provider" OSGi services that are to be - * dynamically registered in the FHIR Server instance. - * - * @author Akana, Inc. Professional Services - * - */ -public interface FhirServer { - public static final String SVCPROP_SERVICE_NAME = "fhir.server.name"; - - /** - * Dynamically registers a single provider with the RestfulServer - * - * @param provider the provider to be registered - * @throws FhirConfigurationException - */ - public void registerOsgiProvider(Object provider) throws FhirConfigurationException; - - /** - * Dynamically unregisters a single provider with the RestfulServer - * - * @param provider the provider to be unregistered - * @throws FhirConfigurationException - */ - public void unregisterOsgiProvider(Object provider) throws FhirConfigurationException; - - /** - * Dynamically registers a list of providers with the RestfulServer - * - * @param provider the providers to be registered - * @throws FhirConfigurationException - */ - public void registerOsgiProviders(Collection provider) throws FhirConfigurationException; - - /** - * Dynamically unregisters a list of providers with the RestfulServer - * - * @param provider the providers to be unregistered - * @throws FhirConfigurationException - */ - public void unregisterOsgiProviders(Collection provider) throws FhirConfigurationException; - - /** - * Dynamically unregisters all of providers currently registered - * - * @throws FhirConfigurationException - */ - public void unregisterOsgiProviders() throws FhirConfigurationException; - -} diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java deleted file mode 100644 index 2d10cb29d22..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -package ca.uhn.fhir.osgi; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.server.RestfulServer; - -/** - * - * @author Akana, Inc. Professional Services - * - */ -public class FhirServerImpl extends RestfulServer implements FhirServer { - private static Logger log = LoggerFactory.getLogger(FhirServerImpl.class); - - private Collection serverProviders = Collections.synchronizedCollection(new ArrayList()); - - public FhirServerImpl() { - super(); - } - - public FhirServerImpl(FhirContext theCtx) { - super(theCtx); - } - - /** - * Dynamically registers a single provider with the RestfulServer - * - * @param provider the provider to be registered - * @throws FhirConfigurationException - */ - @Override - public void registerOsgiProvider (Object provider) throws FhirConfigurationException { - if (null == provider) { - throw new NullPointerException("FHIR Provider cannot be null"); - } - try { - super.registerProvider(provider); - log.trace("registered provider. class ["+provider.getClass().getName()+"]"); - this.serverProviders.add(provider); - } catch (Exception e) { - log.error("Error registering FHIR Provider", e); - throw new FhirConfigurationException("Error registering FHIR Provider", e); - } - } - - /** - * Dynamically unregisters a single provider with the RestfulServer - * - * @param provider the provider to be unregistered - * @throws FhirConfigurationException - */ - @Override - public void unregisterOsgiProvider (Object provider) throws FhirConfigurationException { - if (null == provider) { - throw new NullPointerException("FHIR Provider cannot be null"); - } - try { - this.serverProviders.remove(provider); - log.trace("unregistered provider. class ["+provider.getClass().getName()+"]"); - super.unregisterProvider(provider); - } catch (Exception e) { - log.error("Error unregistering FHIR Provider", e); - throw new FhirConfigurationException("Error unregistering FHIR Provider", e); - } - } - - /** - * Dynamically registers a list of providers with the RestfulServer - * - * @param provider the providers to be registered - * @throws FhirConfigurationException - */ - @Override - public void registerOsgiProviders (Collection providers) throws FhirConfigurationException { - if (null == providers) { - throw new NullPointerException("FHIR Provider list cannot be null"); - } - try { - super.registerProviders(providers); - for (Object provider : providers) { - log.trace("registered provider. class ["+provider.getClass().getName()+"]"); - this.serverProviders.add(provider); - } - } catch (Exception e) { - log.error("Error registering FHIR Providers", e); - throw new FhirConfigurationException("Error registering FHIR Providers", e); - } - } - - /** - * Dynamically unregisters a list of providers with the RestfulServer - * - * @param provider the providers to be unregistered - * @throws FhirConfigurationException - */ - @Override - public void unregisterOsgiProviders (Collection providers) throws FhirConfigurationException { - if (null == providers) { - throw new NullPointerException("FHIR Provider list cannot be null"); - } - try { - for (Object provider : providers) { - log.trace("unregistered provider. class ["+provider.getClass().getName()+"]"); - this.serverProviders.remove(provider); - } - super.unregisterProvider(providers); - } catch (Exception e) { - log.error("Error unregistering FHIR Providers", e); - throw new FhirConfigurationException("Error unregistering FHIR Providers", e); - } - } - - /** - * Dynamically unregisters all of providers currently registered - * - * @throws FhirConfigurationException - */ - @Override - public void unregisterOsgiProviders () throws FhirConfigurationException { - // need to make a copy to be able to remove items - Collection providers = new ArrayList(); - providers.addAll(this.serverProviders); - this.unregisterOsgiProviders(providers); - } - -} diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/SimpleFhirProviderBundle.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/SimpleFhirProviderBundle.java deleted file mode 100644 index 1a2ac16af95..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/SimpleFhirProviderBundle.java +++ /dev/null @@ -1,56 +0,0 @@ -package ca.uhn.fhir.osgi; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.util.Collection; - -/** - * - * @author Akana, Inc. Professional Services - * - */ -public class SimpleFhirProviderBundle implements FhirProviderBundle { - - // ///////////////////////////////////// - // //////// Spring Wiring //////// - // ///////////////////////////////////// - - private Collection providers; - - public void setProviders (Collection providers) { - this.providers = providers; - } - - // ///////////////////////////////////// - // ///////////////////////////////////// - // ///////////////////////////////////// - - public SimpleFhirProviderBundle () { - super(); - } - - @Override - public Collection getProviders () { - return this.providers; - } - -} diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerManager.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerManager.java deleted file mode 100644 index df63ed4deee..00000000000 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerManager.java +++ /dev/null @@ -1,301 +0,0 @@ -package ca.uhn.fhir.osgi.impl; - -/* - * #%L - * HAPI FHIR - OSGi Bundle - * %% - * Copyright (C) 2014 - 2017 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import ca.uhn.fhir.osgi.FhirConfigurationException; -import ca.uhn.fhir.osgi.FhirProviderBundle; -import ca.uhn.fhir.osgi.FhirServer; - -/** - * Manage the dynamic registration of FHIR Servers and FHIR Providers. - * Methods on this Spring Bean will be invoked from OSGi Reference - * Listeners when OSGi services are published for these interfaces. - * - * @author Akana, Inc. Professional Services - * - */ -public class FhirServerManager { - - private static Logger log = LoggerFactory.getLogger(FhirServerManager.class); - private static final String FIRST_SERVER = "#first"; - - private Map registeredServers = new ConcurrentHashMap(); - private Map>> serverProviders = new ConcurrentHashMap>>(); - private Collection> registeredProviders = Collections.synchronizedList(new ArrayList>()); - private Map>> pendingProviders = new ConcurrentHashMap>>(); - private boolean haveDefaultProviders = false; - - /** - * Register a new FHIR Server OSGi service. - * We need to track these services so we can find the correct - * server to use when registering/unregistering providers. - *

    - * The OSGi service definition of a FHIR Server should look like: - *

    -	 * <osgi:service ref="some.bean" interface="ca.uhn.fhir.osgi.FhirServer">
    -	 *     <osgi:service-properties>
    -	 *         <entry key="name" value="osgi-service-name"/>
    -	 *         <entry key="fhir.server.name" value="fhir-server-name"/>
    -	 *     </osgi:service-properties>	
    -	 * </osgi:service>
    -	 * 
    - * The fhir-server-name parameter is also specified for all - * of the FHIR Providers that are to be dynamically registered with the - * named FHIR Server. - * - * @param server OSGi service implementing the FhirService interface - * @param props the for that service - * - * @throws FhirConfigurationException - */ - public void registerFhirServer (FhirServer server, Map props) throws FhirConfigurationException { - if (server != null) { - String serviceName = (String)props.get("name"); - if (null == serviceName) { - serviceName = ""; - } - String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); - if (serverName != null) { - if (registeredServers.containsKey(serverName)) { - throw new FhirConfigurationException("FHIR Server named ["+serverName+"] is already registered. These names must be unique."); - } - log.trace("Registering FHIR Server ["+serverName+"]. (OSGi service named ["+serviceName+"])"); - registeredServers.put(serverName, server); - if (haveDefaultProviders && registeredServers.size() > 1) { - throw new FhirConfigurationException("FHIR Providers are registered without a server name. Only one FHIR Server is allowed."); - } - Collection> providers = pendingProviders.get(serverName); - if (providers != null) { - log.trace("Registering FHIR providers waiting for this server to be registered."); - pendingProviders.remove(serverName); - for (Collection list : providers) { - this.registerProviders(list, server, serverName); - } - } - if (registeredServers.size() == 1) { - providers = pendingProviders.get(FIRST_SERVER); - if (providers != null) { - log.trace("Registering FHIR providers waiting for the first/only server to be registered."); - pendingProviders.remove(FIRST_SERVER); - for (Collection list : providers) { - this.registerProviders(list, server, serverName); - } - } - } - } else { - throw new FhirConfigurationException("FHIR Server registered in OSGi is missing the required ["+FhirServer.SVCPROP_SERVICE_NAME+"] service-property"); - } - } - } - - /** - * This method will be called when a FHIR Server OSGi service - * is being removed from the container. This normally will only - * occur when its bundle is stopped because it is being removed - * or updated. - * - * @param server OSGi service implementing the FhirService interface - * @param props the for that service - * - * @throws FhirConfigurationException - */ - public void unregisterFhirServer (FhirServer server, Map props) throws FhirConfigurationException { - if (server != null) { - String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); - if (serverName != null) { - FhirServer service = registeredServers.get(serverName); - if (service != null) { - log.trace("Unregistering FHIR Server ["+serverName+"]"); - service.unregisterOsgiProviders(); - registeredServers.remove(serverName); - log.trace("Dequeue any FHIR providers waiting for this server"); - pendingProviders.remove(serverName); - if (registeredServers.size() == 0) { - log.trace("Dequeue any FHIR providers waiting for the first/only server"); - pendingProviders.remove(FIRST_SERVER); - } - Collection> providers = serverProviders.get(serverName); - if (providers != null) { - serverProviders.remove(serverName); - registeredProviders.removeAll(providers); - } - } - } else { - throw new FhirConfigurationException("FHIR Server registered in OSGi is missing the required ["+FhirServer.SVCPROP_SERVICE_NAME+"] service-property"); - } - } - } - - /** - * Register a new FHIR Provider-Bundle OSGi service. - * - * This could be a "plain" provider that is published with the - * FhirProvider interface or it could be a resource provider that - * is published with either that same interface or the IResourceProvider - * interface. - * - * (That check is not made here but is included as usage documentation) - * - *

    - * The OSGi service definition of a FHIR Provider would look like: - *

    -	 * <osgi:service ref="some.bean" interface="ca.uhn.fhir.osgi.IResourceProvider">
    -	 *     <osgi:service-properties>
    -	 *         <entry key="name" value="osgi-service-name"/>
    -	 *         <entry key="fhir.server.name" value="fhir-server-name"/>
    -	 *     </osgi:service-properties>	
    -	 * </osgi:service>
    -	 * 
    - * The fhir-server-name parameter is the value assigned to the - * fhir.server.name service-property of one of the OSGi-published - * FHIR Servers. - * - * @param server OSGi service implementing a FHIR provider interface - * @param props the for that service - * - * @throws FhirConfigurationException - */ - public void registerFhirProviders (FhirProviderBundle bundle, Map props) throws FhirConfigurationException { - if (bundle != null) { - Collection providers = bundle.getProviders(); - if (providers != null && !providers.isEmpty()) { - try { - String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); - String ourServerName = getServerName(serverName); - String bundleName = (String)props.get("name"); - if (null == bundleName) { - bundleName = ""; - } - log.trace("Register FHIR Provider Bundle ["+bundleName+"] on FHIR Server ["+ourServerName+"]"); - FhirServer server = registeredServers.get(ourServerName); - if (server != null) { - registerProviders(providers, server, serverName); - } else { - log.trace("Queue the Provider Bundle waiting for FHIR Server to be registered"); - Collection> pending; - synchronized(pendingProviders) { - pending = pendingProviders.get(serverName); - if (null == pending) { - pending = Collections.synchronizedCollection(new ArrayList>()); - pendingProviders.put(serverName, pending); - } - } - pending.add(providers); - } - - } catch (BadServerException e) { - throw new FhirConfigurationException("Unable to register the OSGi FHIR Provider. Multiple Restful Servers exist. Specify the ["+FhirServer.SVCPROP_SERVICE_NAME+"] service-property"); - } - } - } - } - - protected void registerProviders (Collection providers, FhirServer server, String serverName) throws FhirConfigurationException { - server.registerOsgiProviders(providers); - - Collection> active; - synchronized(serverProviders) { - active = serverProviders.get(serverName); - if (null == active) { - active = Collections.synchronizedCollection(new ArrayList>()); - serverProviders.put(serverName, active); - } - } - active.add(providers); - registeredProviders.add(providers); - } - - /** - * This method will be called when a FHIR Provider OSGi service - * is being removed from the container. This normally will only - * occur when its bundle is stopped because it is being removed - * or updated. - * - * @param server OSGi service implementing one of the provider - * interfaces - * @param props the for that service - * - * @throws FhirConfigurationException - */ - public void unregisterFhirProviders (FhirProviderBundle bundle, Map props) throws FhirConfigurationException { - if (bundle != null) { - Collection providers = bundle.getProviders(); - if (providers != null && !providers.isEmpty()) { - try { - registeredProviders.remove(providers); - String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); - String ourServerName = getServerName(serverName); - FhirServer server = registeredServers.get(ourServerName); - if (server != null) { - - server.unregisterOsgiProviders(providers); - - Collection> active = serverProviders.get(serverName); - if (active != null) { - active.remove(providers); - } - } - } catch (BadServerException e) { - throw new FhirConfigurationException("Unable to register the OSGi FHIR Provider. Multiple Restful Servers exist. Specify the ["+FhirServer.SVCPROP_SERVICE_NAME+"] service-property"); - } - } - } - } - - /* - * Adjust the FHIR Server name allowing for null which would - * indicate that the Provider should be registered with the - * only FHIR Server defined. - */ - private String getServerName (String osgiName) throws BadServerException { - String result = osgiName; - if (null == result) { - if (registeredServers.isEmpty()) { // wait for the first one - haveDefaultProviders = true; // only allow one server - result = FIRST_SERVER; - } else - if (registeredServers.size() == 1) { // use the only one - haveDefaultProviders = true; // only allow one server - result = registeredServers.keySet().iterator().next(); - } else { - throw new BadServerException(); - } - } - return result; - } - - class BadServerException extends Exception { - BadServerException() { - super(); - } - } - -} diff --git a/hapi-fhir-osgi-core/src/main/resources/META-INF/spring/hapi-fhir-osgi.xml b/hapi-fhir-osgi-core/src/main/resources/META-INF/spring/hapi-fhir-osgi.xml deleted file mode 100644 index cdb1329067c..00000000000 --- a/hapi-fhir-osgi-core/src/main/resources/META-INF/spring/hapi-fhir-osgi.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hapi-fhir-osgi-core/src/test/java/ca/uhn/fhir/osgi/ManifestIT.java b/hapi-fhir-osgi-core/src/test/java/ca/uhn/fhir/osgi/ManifestIT.java deleted file mode 100644 index 4c45a21e8dc..00000000000 --- a/hapi-fhir-osgi-core/src/test/java/ca/uhn/fhir/osgi/ManifestIT.java +++ /dev/null @@ -1,26 +0,0 @@ -package ca.uhn.fhir.osgi; - -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; - -import java.io.FileReader; - -import org.apache.commons.io.IOUtils; -import org.junit.Test; - -public class ManifestIT { - - /** - * See #234 - */ - @Test - public void testValidateManifest() throws Exception { - - FileReader r = new FileReader("./target/classes/META-INF/MANIFEST.MF"); - String file = IOUtils.toString(r); - - assertThat(file, not(containsString(".jar=/"))); - } - -} diff --git a/hapi-fhir-osgi-core/src/test/resources/.keep b/hapi-fhir-osgi-core/src/test/resources/.keep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 56d24a8322d..2234e21fd10 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IBundleProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IBundleProvider.java index 024b9092442..26e54eae2c6 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IBundleProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IBundleProvider.java @@ -12,7 +12,7 @@ import java.util.List; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IFhirVersionServer.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IFhirVersionServer.java index 3756a4c570f..611e2c70213 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IFhirVersionServer.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IFhirVersionServer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceAccessDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceAccessDetails.java index d02c1445afe..ca59e2a6d6f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceAccessDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceAccessDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceShowDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceShowDetails.java index 6567d27c8f7..d659dd559b4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceShowDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IPreResourceShowDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulResponse.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulResponse.java index 7f6013d73f3..857666e2375 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulResponse.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,17 +19,21 @@ package ca.uhn.fhir.rest.api.server; * limitations under the License. * #L% */ -import java.io.*; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.SummaryEnum; +import org.hl7.fhir.instance.model.api.IBaseBinary; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; + +import java.io.IOException; +import java.io.Writer; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; -import org.hl7.fhir.instance.model.api.*; - -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.SummaryEnum; - public interface IRestfulResponse { Object streamResponseAsResource(IBaseResource theActualResourceToReturn, boolean thePrettyPrint, Set theSummaryMode, int theStatusCode, String theStatusMessage, boolean theRespondGzip, boolean theAddContentLocation) throws IOException; @@ -40,7 +44,7 @@ public interface IRestfulResponse { */ Object returnResponse(ParseAction outcome, int operationStatus, boolean allowPrefer, MethodOutcome response, String resourceName) throws IOException; - Writer getResponseWriter(int theStatusCode, String theStatusMessage, String theContentType, String theCharset, boolean theRespondGzip) throws UnsupportedEncodingException, IOException; + Writer getResponseWriter(int theStatusCode, String theStatusMessage, String theContentType, String theCharset, boolean theRespondGzip) throws IOException; Object sendWriterResponse(int status, String contentType, String charset, Writer writer) throws IOException; diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulServer.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulServer.java index 8c076e5842c..0c8be6db72b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulServer.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IRestfulServer.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.rest.server.IRestfulServerDefaults; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IServerMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IServerMethodBinding.java index 384afe93713..5a2ac35d3f7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IServerMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/IServerMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ParseAction.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ParseAction.java index 2fccbdd2723..e7fe6629c13 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ParseAction.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ParseAction.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/RequestDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/RequestDetails.java index f974423e357..10c982a0439 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/RequestDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/RequestDetails.java @@ -32,7 +32,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ResponseDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ResponseDetails.java index 010e55c3ec2..f957775f7a7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ResponseDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/ResponseDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceAccessDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceAccessDetails.java index b0a5ef15126..1dbfef188cb 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceAccessDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceAccessDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceShowDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceShowDetails.java index b454c51513f..ed7b8b79a32 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceShowDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/SimplePreResourceShowDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.api.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ApacheProxyAddressStrategy.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ApacheProxyAddressStrategy.java index fd865fc6f8d..eb574295f62 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ApacheProxyAddressStrategy.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ApacheProxyAddressStrategy.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BasePagingProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BasePagingProvider.java index 592503acffa..626b123699a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BasePagingProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BasePagingProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/Bindings.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/Bindings.java index 829fe6edb5f..35cd6ebef99 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/Bindings.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/Bindings.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviderWithNamedPages.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviderWithNamedPages.java index 69fcc4b2846..2da08dee204 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviderWithNamedPages.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviderWithNamedPages.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviders.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviders.java index 404d26b265f..5b950e8fb9d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviders.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/BundleProviders.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/CommonResourceSupertypeScanner.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/CommonResourceSupertypeScanner.java index 8de957659b3..a4bdd6c574a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/CommonResourceSupertypeScanner.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/CommonResourceSupertypeScanner.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ETagSupportEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ETagSupportEnum.java index 3d391851ccb..7402340f6f2 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ETagSupportEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ETagSupportEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ElementsSupportEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ElementsSupportEnum.java index a66d4c486b7..85c9bb9d997 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ElementsSupportEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ElementsSupportEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/FifoMemoryPagingProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/FifoMemoryPagingProvider.java index 2bffa4360c0..f598b93505f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/FifoMemoryPagingProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/FifoMemoryPagingProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/HardcodedServerAddressStrategy.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/HardcodedServerAddressStrategy.java index 2088ea0e78b..3d0a4699e85 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/HardcodedServerAddressStrategy.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/HardcodedServerAddressStrategy.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IDynamicSearchResourceProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IDynamicSearchResourceProvider.java index 43d778e3f9e..26ee6e56147 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IDynamicSearchResourceProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IDynamicSearchResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IPagingProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IPagingProvider.java index a02d28f7734..07cc12107d7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IPagingProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IPagingProvider.java @@ -10,7 +10,7 @@ import javax.annotation.Nullable; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IResourceProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IResourceProvider.java index 5266f146a97..62ae2e70e01 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IResourceProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerDefaults.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerDefaults.java index 10eca954d39..7ab2330d080 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerDefaults.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerDefaults.java @@ -12,7 +12,7 @@ import java.util.List; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerUtil.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerUtil.java index 825b1464d9c..2445ec07dd2 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerUtil.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IRestfulServerUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerAddressStrategy.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerAddressStrategy.java index 8a487518b04..e94e4af8a99 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerAddressStrategy.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerAddressStrategy.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerConformanceProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerConformanceProvider.java index f6e4a273abe..9b3a7b03e87 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerConformanceProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IServerConformanceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java index 53000458caf..5f6d27c1344 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/PageProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/PageProvider.java index 383ba7bddd1..4652c0778a8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/PageProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/PageProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ResourceBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ResourceBinding.java index a12e08effda..0d264258bfe 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ResourceBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/ResourceBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulResponse.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulResponse.java index 5469b4d1b51..c5b92f0fee5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulResponse.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java index 7940576b71b..3c32507105a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -360,11 +360,13 @@ public class RestfulServer extends HttpServlet implements IRestfulServer supertype = clazz.getSuperclass(); while (!Object.class.equals(supertype)) { count += findResourceMethods(theProvider, supertype); + count += findResourceMethodsOnInterfaces(theProvider, supertype.getInterfaces()); supertype = supertype.getSuperclass(); } try { count += findResourceMethods(theProvider, clazz); + count += findResourceMethodsOnInterfaces(theProvider, clazz.getInterfaces()); } catch (ConfigurationException e) { throw new ConfigurationException("Failure scanning class " + clazz.getSimpleName() + ": " + e.getMessage(), e); } @@ -373,6 +375,15 @@ public class RestfulServer extends HttpServlet implements IRestfulServer[] interfaces) { + int count = 0; + for (Class anInterface : interfaces) { + count += findResourceMethods(theProvider, anInterface); + count += findResourceMethodsOnInterfaces(theProvider, anInterface.getInterfaces()); + } + return count; + } + private int findResourceMethods(Object theProvider, Class clazz) throws ConfigurationException { int count = 0; @@ -1604,14 +1615,23 @@ public class RestfulServer extends HttpServlet implements IRestfulServer resourceNames = new ArrayList<>(); while (!Object.class.equals(supertype)) { removeResourceMethods(theProvider, supertype, resourceNames); + removeResourceMethodsOnInterfaces(theProvider, supertype.getInterfaces(), resourceNames); supertype = supertype.getSuperclass(); } removeResourceMethods(theProvider, clazz, resourceNames); + removeResourceMethodsOnInterfaces(theProvider, clazz.getInterfaces(), resourceNames); for (String resourceName : resourceNames) { myResourceNameToBinding.remove(resourceName); } } + private void removeResourceMethodsOnInterfaces(Object theProvider, Class[] interfaces, Collection resourceNames) { + for (Class anInterface : interfaces) { + removeResourceMethods(theProvider, anInterface, resourceNames); + removeResourceMethodsOnInterfaces(theProvider, anInterface.getInterfaces(), resourceNames); + } + } + /* * Collect the set of RESTful methods for a single class when it is being unregistered */ diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerConfiguration.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerConfiguration.java index c22c9f7d14d..8a09ff6cfa9 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerConfiguration.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerConfiguration.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java index 5246f524173..0ef51233a04 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,13 @@ import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.valueset.BundleTypeEnum; import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.api.*; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.api.PreferHeader; +import ca.uhn.fhir.rest.api.PreferReturnEnum; +import ca.uhn.fhir.rest.api.RequestTypeEnum; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.SummaryEnum; import ca.uhn.fhir.rest.api.server.IRestfulResponse; import ca.uhn.fhir.rest.api.server.IRestfulServer; import ca.uhn.fhir.rest.api.server.RequestDetails; @@ -39,7 +45,13 @@ import ca.uhn.fhir.rest.server.method.SummaryEnumParameter; import ca.uhn.fhir.util.BinaryUtil; import ca.uhn.fhir.util.DateUtils; import ca.uhn.fhir.util.UrlUtil; -import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseBinary; +import org.hl7.fhir.instance.model.api.IBaseReference; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; import javax.annotation.Nonnull; import javax.servlet.http.HttpServletRequest; @@ -50,7 +62,10 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.replace; +import static org.apache.commons.lang3.StringUtils.trim; public class RestfulServerUtils { static final Pattern ACCEPT_HEADER_PATTERN = Pattern.compile("\\s*([a-zA-Z0-9+.*/-]+)\\s*(;\\s*([a-zA-Z]+)\\s*=\\s*([a-zA-Z0-9.]+)\\s*)?(,?)"); @@ -129,7 +144,7 @@ public class RestfulServerUtils { // _elements Set elements = ElementsParameter.getElementsValueOrNull(theRequestDetails, false); - if (elements != null && summaryMode != null && !summaryMode.equals(Collections.singleton(SummaryEnum.FALSE))) { + if (elements != null && !summaryMode.equals(Collections.singleton(SummaryEnum.FALSE))) { throw new InvalidRequestException("Cannot combine the " + Constants.PARAM_SUMMARY + " and " + Constants.PARAM_ELEMENTS + " parameters"); } @@ -139,17 +154,24 @@ public class RestfulServerUtils { parser.setDontEncodeElements(elementsExclude); } - if (summaryMode != null) { - if (summaryMode.contains(SummaryEnum.COUNT) && summaryMode.size() == 1) { - parser.setEncodeElements(Collections.singleton("Bundle.total")); - } else if (summaryMode.contains(SummaryEnum.TEXT) && summaryMode.size() == 1) { - parser.setEncodeElements(TEXT_ENCODE_ELEMENTS); - parser.setEncodeElementsAppliesToChildResourcesOnly(true); - } else { - parser.setSuppressNarratives(summaryMode.contains(SummaryEnum.DATA)); - parser.setSummaryMode(summaryMode.contains(SummaryEnum.TRUE)); + boolean summaryModeCount = summaryMode.contains(SummaryEnum.COUNT) && summaryMode.size() == 1; + if (!summaryModeCount) { + String[] countParam = theRequestDetails.getParameters().get(Constants.PARAM_COUNT); + if (countParam != null && countParam.length > 0) { + summaryModeCount = "0".equalsIgnoreCase(countParam[0]); } } + + if (summaryModeCount) { + parser.setEncodeElements(Collections.singleton("Bundle.total")); + } else if (summaryMode.contains(SummaryEnum.TEXT) && summaryMode.size() == 1) { + parser.setEncodeElements(TEXT_ENCODE_ELEMENTS); + parser.setEncodeElementsAppliesToChildResourcesOnly(true); + } else { + parser.setSuppressNarratives(summaryMode.contains(SummaryEnum.DATA)); + parser.setSummaryMode(summaryMode.contains(SummaryEnum.TRUE)); + } + if (elements != null && elements.size() > 0) { String elementsAppliesTo = "*"; if (isNotBlank(theRequestDetails.getResourceName())) { @@ -502,6 +524,7 @@ public class RestfulServerUtils { return retVal; } + @Nonnull public static Set determineSummaryMode(RequestDetails theRequest) { Map requestParams = theRequest.getParameters(); @@ -745,12 +768,12 @@ public class RestfulServerUtils { } public static Object streamResponseAsResource(IRestfulServerDefaults theServer, IBaseResource theResource, Set theSummaryMode, int stausCode, boolean theAddContentLocationHeader, - boolean respondGzip, RequestDetails theRequestDetails) throws IOException { + boolean respondGzip, RequestDetails theRequestDetails) throws IOException { return streamResponseAsResource(theServer, theResource, theSummaryMode, stausCode, null, theAddContentLocationHeader, respondGzip, theRequestDetails, null, null); } public static Object streamResponseAsResource(IRestfulServerDefaults theServer, IBaseResource theResource, Set theSummaryMode, int theStatusCode, String theStatusMessage, - boolean theAddContentLocationHeader, boolean respondGzip, RequestDetails theRequestDetails, IIdType theOperationResourceId, IPrimitiveType theOperationResourceLastUpdated) + boolean theAddContentLocationHeader, boolean respondGzip, RequestDetails theRequestDetails, IIdType theOperationResourceId, IPrimitiveType theOperationResourceLastUpdated) throws IOException { IRestfulResponse response = theRequestDetails.getResponse(); @@ -886,23 +909,10 @@ public class RestfulServerUtils { IParser parser = getNewParser(theServer.getFhirContext(), forVersion, theRequestDetails); parser.encodeResourceToWriter(theResource, writer); } - //FIXME resource leak + return response.sendWriterResponse(theStatusCode, contentType, charset, writer); } - // static Integer tryToExtractNamedParameter(HttpServletRequest theRequest, String name) { - // String countString = theRequest.getParameter(name); - // Integer count = null; - // if (isNotBlank(countString)) { - // try { - // count = Integer.parseInt(countString); - // } catch (NumberFormatException e) { - // ourLog.debug("Failed to parse _count value '{}': {}", countString, e); - // } - // } - // return count; - // } - public static String createEtag(String theVersionId) { return "W/\"" + theVersionId + '"'; } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/SimpleBundleProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/SimpleBundleProvider.java index 813d05ad5cb..a514de7f4c9 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/SimpleBundleProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/SimpleBundleProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BanUnsupportedHttpMethodsInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BanUnsupportedHttpMethodsInterceptor.java index 55d45533640..5045bb207ef 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BanUnsupportedHttpMethodsInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BanUnsupportedHttpMethodsInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BaseValidatingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BaseValidatingInterceptor.java index 659c0ca137b..4fee6163834 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BaseValidatingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BaseValidatingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CaptureResourceSourceFromHeaderInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CaptureResourceSourceFromHeaderInterceptor.java index e90f5a5de7e..b93f5d3c07f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CaptureResourceSourceFromHeaderInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CaptureResourceSourceFromHeaderInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CorsInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CorsInterceptor.java index 70285ed879f..42e7f5d5ab4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CorsInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/CorsInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java index d25adc54fd2..274b6ee8ef8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java index b2df30e1eba..c1b9055897f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerOperationInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerOperationInterceptor.java index 27f4d7f00eb..4e256cce1e9 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerOperationInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerOperationInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorAdapter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorAdapter.java index 05fc69f1194..1f35d4a8c7d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorAdapter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorAdapter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorOrders.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorOrders.java index 3fa7611a440..a3995b7d5b6 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorOrders.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/InterceptorOrders.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.java index 4d5d0c80069..45d07525d2b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.java @@ -32,7 +32,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/RequestValidatingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/RequestValidatingInterceptor.java index a602c642da9..a210b0ff19d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/RequestValidatingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/RequestValidatingInterceptor.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java index 62a94fa6ca3..b5599f45e87 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java @@ -40,7 +40,7 @@ import static org.apache.commons.lang3.StringUtils.*; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseValidatingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseValidatingInterceptor.java index 91de844a4dc..d678958211a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseValidatingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseValidatingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServeMediaResourceRawInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServeMediaResourceRawInterceptor.java index 6bd8419b3b6..7b0d3cb95a7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServeMediaResourceRawInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServeMediaResourceRawInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServerOperationInterceptorAdapter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServerOperationInterceptorAdapter.java index 6b9ed0a58fe..07e4ff6536a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServerOperationInterceptorAdapter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ServerOperationInterceptorAdapter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/VerboseLoggingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/VerboseLoggingInterceptor.java index 8d85a4eb6e7..b28493f057b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/VerboseLoggingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/VerboseLoggingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AppliesTypeEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AppliesTypeEnum.java index ba8c0860be9..eeeedc8f9a6 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AppliesTypeEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AppliesTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationFlagsEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationFlagsEnum.java index 6c0e377a7e3..c4ef5d9ed42 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationFlagsEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationFlagsEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationInterceptor.java index a74dbe83a96..6301bc9eaea 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizationInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizedList.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizedList.java index 4965efeca3d..a77c2a5a3f3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizedList.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/AuthorizedList.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/BaseRule.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/BaseRule.java index b50bc804b2b..0f748fb6cb5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/BaseRule.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/BaseRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/ClassifierTypeEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/ClassifierTypeEnum.java index 936e01208a2..f36fee1bf4e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/ClassifierTypeEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/ClassifierTypeEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRule.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRule.java index bf5d790f4a7..fcc7b3fe3c4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRule.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java index 54c35e1c5c3..edb3b250f5b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilder.java @@ -6,7 +6,7 @@ import java.util.List; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderAppliesTo.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderAppliesTo.java index 6c05f87ac3d..d6f5dd4717f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderAppliesTo.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderAppliesTo.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderGraphQL.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderGraphQL.java index 3c0af6e5852..8f72347a237 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderGraphQL.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderGraphQL.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperation.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperation.java index 75ca45c9b83..2725cd93216 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperation.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperation.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamed.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamed.java index a3c38be6f14..c452be0352f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamed.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamed.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamedAndScoped.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamedAndScoped.java index 97a94615c35..b82fe5b0f70 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamedAndScoped.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderOperationNamedAndScoped.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderPatch.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderPatch.java index 555f17f8061..ad2ad503ffd 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderPatch.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderPatch.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRule.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRule.java index a7a28fb26c6..0c2b02e5107 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRule.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditional.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditional.java index 0911575f093..0e990869293 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditional.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditional.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditionalClassifier.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditionalClassifier.java index 40bba4ec8ff..eda91d4a5e1 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditionalClassifier.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleConditionalClassifier.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java index 0de42433483..522410b1a4e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOp.java @@ -8,7 +8,7 @@ import java.util.Collection; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifier.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifier.java index 08aeb9f86fd..0f705636bba 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifier.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifier.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinished.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinished.java index cc15d81eaf7..0d96332642f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinished.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinished.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinishedWithTenantId.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinishedWithTenantId.java index 38932978b94..f585b4041a5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinishedWithTenantId.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpClassifierFinishedWithTenantId.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpDelete.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpDelete.java index 1f04ed9989b..35d8f086937 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpDelete.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleOpDelete.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransaction.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransaction.java index 4b00f77dfdf..c4e0823bf65 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransaction.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransaction.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransactionOp.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransactionOp.java index baab976f21e..5ed2798389a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransactionOp.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleBuilderRuleTransactionOp.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleFinished.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleFinished.java index 9fdf831bfee..50941d103d9 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleFinished.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleFinished.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleTester.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleTester.java index a6dc4a68428..0ccb37fd85b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleTester.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IAuthRuleTester.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IRuleApplier.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IRuleApplier.java index c4043dc88eb..e101efd29e7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IRuleApplier.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/IRuleApplier.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/OperationRule.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/OperationRule.java index 09682f3874c..0eaea1e5798 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/OperationRule.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/OperationRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/PolicyEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/PolicyEnum.java index aa0d54198aa..ad0be8c8744 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/PolicyEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/PolicyEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleBuilder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleBuilder.java index 163839b6106..51849c8f7e4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleBuilder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleBuilder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java index 75aca6c0076..7e0a1bced08 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java index 07912c0ae09..c3ce77a2967 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java @@ -34,7 +34,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplPatch.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplPatch.java index 829737b0cc5..580ca677c54 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplPatch.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplPatch.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleOpEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleOpEnum.java index 9ef29f0cc5c..2101435778e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleOpEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleOpEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java index f579c213f49..3ede68f6b6a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/TransactionAppliesToEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/TransactionAppliesToEnum.java index 3dd7cd1cad2..6f5b814f3d8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/TransactionAppliesToEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/TransactionAppliesToEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.auth; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentInterceptor.java index 65dcbf4af0d..73b6f99e776 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOperationStatusEnum.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOperationStatusEnum.java index 6329c1950f3..7d2d50d2b0e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOperationStatusEnum.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOperationStatusEnum.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOutcome.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOutcome.java index 25d8001d771..99eeb955c4c 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOutcome.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/ConsentOutcome.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/DelegatingConsentService.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/DelegatingConsentService.java index c052e1a199b..6be21c88d11 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/DelegatingConsentService.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/DelegatingConsentService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentContextServices.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentContextServices.java index 14499397b63..2cfe52d496e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentContextServices.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentContextServices.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentService.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentService.java index fc3e955ba9f..a650eb400d7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentService.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/IConsentService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/NullConsentContextServices.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/NullConsentContextServices.java index ad53a5f69f7..b9f21cceca5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/NullConsentContextServices.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/consent/NullConsentContextServices.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.interceptor.consent; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/AtParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/AtParameter.java index 7bc9b1ffb58..ae4a5ea9c18 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/AtParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/AtParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseMethodBinding.java index c66da76d646..19ec2bcced3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBinding.java index 9277c8ff603..ba9fe65d7c4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java index dba129d87c2..bb62e3ce239 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceParam.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceParam.java index dd3471cf61f..cec16b60d8c 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceParam.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseOutcomeReturningMethodBindingWithResourceParam.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.defaultIfBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseQueryParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseQueryParameter.java index bf89f1008aa..b90140ef1e8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseQueryParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseQueryParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java index 3976e8fadf8..042040eb7e5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java @@ -24,6 +24,7 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.util.ReflectionUtil; import ca.uhn.fhir.util.UrlUtil; +import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; @@ -42,7 +43,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +82,8 @@ public abstract class BaseResourceReturningMethodBinding extends BaseMethodBindi } } else if (IBaseResource.class.isAssignableFrom(methodReturnType)) { - if (Modifier.isAbstract(methodReturnType.getModifiers()) == false && theContext.getResourceDefinition((Class) methodReturnType).isBundle()) { + + if ( IBaseBundle.class.isAssignableFrom(methodReturnType)) { myMethodReturnType = MethodReturnTypeEnum.BUNDLE_RESOURCE; } else { myMethodReturnType = MethodReturnTypeEnum.RESOURCE; diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConditionalParamBinder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConditionalParamBinder.java index 6ac600e5323..7c2e67f6da5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConditionalParamBinder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConditionalParamBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConformanceMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConformanceMethodBinding.java index 9a445aaaab4..aad22e7461a 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConformanceMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ConformanceMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CountParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CountParameter.java index 85db440f4e2..8793e1f3a92 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CountParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CountParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,21 +20,19 @@ package ca.uhn.fhir.rest.server.method; * #L% */ -import java.lang.reflect.Method; -import java.util.Collection; - -import org.apache.commons.lang3.StringUtils; - import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.rest.annotation.Count; -import ca.uhn.fhir.rest.annotation.Since; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import org.apache.commons.lang3.StringUtils; + +import java.lang.reflect.Method; +import java.util.Collection; public class CountParameter implements IParameter { @@ -42,20 +40,20 @@ public class CountParameter implements IParameter { @Override public Object translateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding theMethodBinding) throws InternalErrorException, InvalidRequestException { - String[] sinceParams = theRequest.getParameters().get(Constants.PARAM_COUNT); - if (sinceParams != null) { - if (sinceParams.length > 0) { - if (StringUtils.isNotBlank(sinceParams[0])) { + String[] countParam = theRequest.getParameters().get(Constants.PARAM_COUNT); + if (countParam != null) { + if (countParam.length > 0) { + if (StringUtils.isNotBlank(countParam[0])) { try { - IntegerDt since = new IntegerDt(sinceParams[0]); - return ParameterUtil.fromInteger(myType, since); + IntegerDt count = new IntegerDt(countParam[0]); + return ParameterUtil.fromInteger(myType, count); } catch (DataFormatException e) { - throw new InvalidRequestException("Invalid " + Constants.PARAM_COUNT + " value: " + sinceParams[0]); + throw new InvalidRequestException("Invalid " + Constants.PARAM_COUNT + " value: " + countParam[0]); } } } } - return ParameterUtil.fromInteger(myType, null); + return null; } @Override diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CreateMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CreateMethodBinding.java index a99bda1beac..5c0cad0605e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CreateMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/CreateMethodBinding.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/DeleteMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/DeleteMethodBinding.java index efec55aff05..656ea2326e4 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/DeleteMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/DeleteMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ElementsParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ElementsParameter.java index 576118396d5..f08916cda8f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ElementsParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ElementsParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLMethodBinding.java index 172e88d72ae..ad5049af383 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLQueryParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLQueryParameter.java index 3e21729566b..f652ec563d3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLQueryParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/GraphQLQueryParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java index a69938de708..f378ec57128 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IParameter.java index 6e330014e27..815e8ce15b3 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IRestfulHeader.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IRestfulHeader.java index d7c62be7c83..aa0b3a8a77e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IRestfulHeader.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IRestfulHeader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IncludeParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IncludeParameter.java index e7dea5bc20d..6e3cb7fa1fe 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IncludeParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/IncludeParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -154,7 +154,7 @@ class IncludeParameter extends BaseQueryParameter { } return new Include(value, recurse); } - //FIXME null access + retValCollection.add(new Include(value, recurse)); } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/InterceptorBroadcasterParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/InterceptorBroadcasterParameter.java index d81e17a4b30..8ba4ee31e55 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/InterceptorBroadcasterParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/InterceptorBroadcasterParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/MethodUtil.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/MethodUtil.java index 668e3e378bc..87b648840bf 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/MethodUtil.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/MethodUtil.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -192,7 +192,7 @@ public class MethodUtil { b.append(theMethod.getName()); b.append("' is annotated with @"); b.append(ResourceParam.class.getSimpleName()); - b.append(" but has a type that is not an implemtation of "); + b.append(" but has a type that is not an implementation of "); b.append(IBaseResource.class.getCanonicalName()); b.append(" or String or byte[]"); throw new ConfigurationException(b.toString()); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/NullParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/NullParameter.java index 50b0aedbb44..f0586bec569 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/NullParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/NullParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationMethodBinding.java index 879aa945f99..aa4b536bd1f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationParameter.java index 9c07f46fe71..caf39d8352f 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/OperationParameter.java @@ -35,7 +35,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PageMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PageMethodBinding.java index e7db11ca1c9..5b0bd9355af 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PageMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PageMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchMethodBinding.java index d51ea5c6fbf..e68351bd167 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchTypeParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchTypeParameter.java index 6308c8c1da5..45e087b7582 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchTypeParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/PatchTypeParameter.java @@ -6,7 +6,7 @@ import static org.apache.commons.lang3.StringUtils.defaultString; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RawParamsParmeter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RawParamsParmeter.java index 8644410883f..1d8e992cad7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RawParamsParmeter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RawParamsParmeter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ReadMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ReadMethodBinding.java index b384ced6587..facae61707d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ReadMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ReadMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -160,7 +160,7 @@ public class ReadMethodBinding extends BaseResourceReturningMethodBinding { IBundleProvider retVal = toResourceList(response); - if (retVal.size() == 1) { + if (Integer.valueOf(1).equals(retVal.size())) { List responseResources = retVal.getResources(0, 1); IBaseResource responseResource = responseResources.get(0); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RequestDetailsParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RequestDetailsParameter.java index 0ddd132649f..7bd96bb8970 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RequestDetailsParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/RequestDetailsParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ResourceParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ResourceParameter.java index ec964a4cc0c..7301f88f23d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ResourceParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ResourceParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java index 5406b006297..b5692b75463 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchParameter.java index fcf2b41e9c9..550fd5f15de 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchTotalModeParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchTotalModeParameter.java index 4b2f88c82fb..cbe843c9d7d 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchTotalModeParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SearchTotalModeParameter.java @@ -13,7 +13,7 @@ import java.util.Collection; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServerBaseParamBinder.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServerBaseParamBinder.java index 0dd21d3d807..c13698adb64 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServerBaseParamBinder.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServerBaseParamBinder.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletRequestParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletRequestParameter.java index f4570c5d530..6b0ea249eaf 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletRequestParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletRequestParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletResponseParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletResponseParameter.java index dc3a2af0ace..f11230aabc7 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletResponseParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ServletResponseParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceOrAtParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceOrAtParameter.java index 1c03a27430f..eee4c54d8fe 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceOrAtParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceOrAtParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceParameter.java index 343db89da0a..687b972337b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SinceParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SortParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SortParameter.java index e43477a6041..34ff26994bb 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SortParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SortParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SummaryEnumParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SummaryEnumParameter.java index 1e6241014fc..6f122c24a31 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SummaryEnumParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/SummaryEnumParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionMethodBinding.java index cdf53000b2b..238ba0af398 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionMethodBinding.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionParameter.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionParameter.java index ea974b47196..d191ce5f8a1 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionParameter.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/TransactionParameter.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/UpdateMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/UpdateMethodBinding.java index 9c29a187141..08a174d80a8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/UpdateMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/UpdateMethodBinding.java @@ -5,7 +5,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ValidateMethodBindingDstu2Plus.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ValidateMethodBindingDstu2Plus.java index dde4cf854c7..e187c45f1a8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ValidateMethodBindingDstu2Plus.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/ValidateMethodBindingDstu2Plus.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.method; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseLastNProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseLastNProvider.java index fca6f754613..e201c7af2ac 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseLastNProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/BaseLastNProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.provider; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/HashMapResourceProvider.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/HashMapResourceProvider.java index 11ff3d42b1b..2780e3c2da5 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/HashMapResourceProvider.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/HashMapResourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.provider; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java index 84abf2a036f..978ae4a1ea8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.servlet; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRestfulResponse.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRestfulResponse.java index 2b2ba30dea0..ee71f6e210b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRestfulResponse.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRestfulResponse.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.servlet; * #%L * HAPI FHIR - Server Framework * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,23 +20,22 @@ package ca.uhn.fhir.rest.server.servlet; * #L% */ -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.util.List; -import java.util.Map.Entry; -import java.util.zip.GZIPOutputStream; - -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; - -import org.hl7.fhir.instance.model.api.IBaseBinary; - import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.server.ParseAction; import ca.uhn.fhir.rest.server.RestfulResponse; +import org.hl7.fhir.instance.model.api.IBaseBinary; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map.Entry; +import java.util.zip.GZIPOutputStream; public class ServletRestfulResponse extends RestfulResponse { @@ -48,23 +47,23 @@ public class ServletRestfulResponse extends RestfulResponse createServerConformanceProvider(RestfulServer theRestfulServer) { + return new IServerConformanceProvider() { + + @Override + @Metadata + public IBaseConformance getServerConformance(HttpServletRequest theRequest, RequestDetails theRequestDetails) { + return mock(IBaseConformance.class); + } + + @Override + public void setRestfulServer(RestfulServer theRestfulServer) { + } + }; + } + + @Override + public IResourceProvider createServerProfilesProvider(RestfulServer theRestfulServer) { + return new MyResourceProvider(); + } + } + + @SuppressWarnings("unused") + private static class MyResourceProvider implements IResourceProvider { + @Create + public MethodOutcome create(@ResourceParam IBaseResource theResource) { + return mock(MethodOutcome.class); + } + + @Override + public Class getResourceType() { + return IBaseResource.class; + } + } + +} diff --git a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/method/ReadMethodBindingTest.java b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/method/ReadMethodBindingTest.java index 598dddf84aa..ba4ee6476ce 100644 --- a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/method/ReadMethodBindingTest.java +++ b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/method/ReadMethodBindingTest.java @@ -59,6 +59,11 @@ public class ReadMethodBindingTest { assertTrue(binding.incomingServerRequestMatchesMethod(myRequestDetails)); // VRead + when(myRequestDetails.getId()).thenReturn(new IdDt("Patient/123/_history/123")); + assertFalse(binding.incomingServerRequestMatchesMethod(myRequestDetails)); + + // Type history + when(myRequestDetails.getId()).thenReturn(new IdDt("Patient/123")); when(myRequestDetails.getResourceName()).thenReturn("Patient"); when(myRequestDetails.getOperation()).thenReturn("_history"); assertFalse(binding.incomingServerRequestMatchesMethod(myRequestDetails)); diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 80929160c5e..8646bb73cfc 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../hapi-deployable-pom/pom.xml @@ -18,6 +18,7 @@ org.springframework.boot spring-boot-autoconfigure + ${spring_boot_version} @@ -68,6 +69,7 @@ org.springframework.boot spring-boot-configuration-processor true + ${spring_boot_version} @@ -95,6 +97,7 @@ org.slf4j log4j-over-slf4j test + 1.7.30 ca.uhn.hapi.fhir @@ -118,6 +121,7 @@ ${spring_boot_version} pom import + true diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirAutoConfiguration.java b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirAutoConfiguration.java index 9659534d8e8..82c286be823 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirAutoConfiguration.java +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirAutoConfiguration.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.spring.boot.autoconfigure; * #%L * hapi-fhir-spring-boot-autoconfigure * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirProperties.java b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirProperties.java index 26761a5ba69..b53ad0e7a95 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirProperties.java +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirProperties.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.spring.boot.autoconfigure; * #%L * hapi-fhir-spring-boot-autoconfigure * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirRestfulServerCustomizer.java b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirRestfulServerCustomizer.java index 0c73777050c..f72bd83c7ad 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirRestfulServerCustomizer.java +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/src/main/java/ca/uhn/fhir/spring/boot/autoconfigure/FhirRestfulServerCustomizer.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.spring.boot.autoconfigure; * #%L * hapi-fhir-spring-boot-autoconfigure * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 245c7bea938..1c199d2506e 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -1,64 +1,64 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-fhir-spring-boot-samples - 4.2.0-SNAPSHOT - - - hapi-fhir-spring-boot-sample-client-apache - - jar - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-actuator - - - ca.uhn.hapi.fhir - hapi-fhir-spring-boot-starter - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-client - ${project.version} - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - \ No newline at end of file + + 4.0.0 + + + ca.uhn.hapi.fhir + hapi-fhir-spring-boot-samples + 5.0.0-SNAPSHOT + + + hapi-fhir-spring-boot-sample-client-apache + + jar + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + + ca.uhn.hapi.fhir + hapi-fhir-spring-boot-starter + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-client + ${project.version} + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 7607abdfa03..50966b5c47a 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -1,64 +1,64 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-fhir-spring-boot-samples - 4.2.0-SNAPSHOT - - - hapi-fhir-spring-boot-sample-client-okhttp - - jar - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-actuator - - - ca.uhn.hapi.fhir - hapi-fhir-spring-boot-starter - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-client-okhttp - ${project.version} - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - \ No newline at end of file + + 4.0.0 + + + ca.uhn.hapi.fhir + hapi-fhir-spring-boot-samples + 5.0.0-SNAPSHOT + + + hapi-fhir-spring-boot-sample-client-okhttp + + jar + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + + ca.uhn.hapi.fhir + hapi-fhir-spring-boot-starter + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-client-okhttp + ${project.version} + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 45d11f2b0a0..b3304dd7fdc 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jpa/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jpa/pom.xml index 2f99de20e6b..4add751540a 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jpa/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jpa/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT hapi-fhir-spring-boot-sample-server-jpa diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index bdeeb2a13a3..0170fa2b470 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index 95bbb629d7f..8e61124271e 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index 83dcdd267d7..0a8e4593d00 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index c12b498af04..f7c4258f74e 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/ctx/FhirDstu2_1.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/ctx/FhirDstu2_1.java index 1fe015b61a6..250d7170d10 100644 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/ctx/FhirDstu2_1.java +++ b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/ctx/FhirDstu2_1.java @@ -30,7 +30,6 @@ import org.hl7.fhir.dstu2016may.model.*; import org.hl7.fhir.instance.model.api.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.primitive.IdDt; @@ -46,11 +45,6 @@ public class FhirDstu2_1 implements IFhirVersion { throw new UnsupportedOperationException("FluentPath is not supported in DSTU2 contexts"); } - @Override - public IContextValidationSupport createValidationSupport() { - throw new UnsupportedOperationException("Validation is not supported in DSTU2.1 contexts"); - } - @Override public IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/DefaultProfileValidationSupport.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/DefaultProfileValidationSupport.java deleted file mode 100644 index 9b33aa2f769..00000000000 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/DefaultProfileValidationSupport.java +++ /dev/null @@ -1,315 +0,0 @@ -package org.hl7.fhir.dstu2016may.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu2016may.model.*; -import org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpander; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpanderSimple; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class DefaultProfileValidationSupport implements IValidationSupport { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class); - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSetExpansionComponent retVal = new ValueSetExpansionComponent(); - - Set wantCodes = new HashSet<>(); - for (ConceptReferenceComponent next : theInclude.getConcept()) { - wantCodes.add(next.getCode()); - } - - CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem()); - for (ConceptDefinitionComponent next : system.getConcept()) { - if (wantCodes.isEmpty() || wantCodes.contains(next.getCode())) { - retVal.addContains().setSystem(theInclude.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay()); - } - } - - return retVal; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList<>(provideStructureDefinitionMap(theContext).values()); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true); - } - - private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) { - Map codeSystems = myCodeSystems; - Map valueSets = myValueSets; - if (codeSystems == null) { - codeSystems = new HashMap<>(); - valueSets = new HashMap<>(); - - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu2016may/model/valueset/valuesets.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu2016may/model/valueset/v2-tables.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu2016may/model/valueset/v3-codesystems.xml"); - - myCodeSystems = codeSystems; - myValueSets = valueSets; - } - - if (codeSystem) { - return codeSystems.get(theSystem); - } else { - return valueSets.get(theSystem); - } - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - Validate.notBlank(theUri, "theUri must not be null or blank"); - - if (theUri.startsWith("http://hl7.org/fhir/StructureDefinition/")) { - return (T) fetchStructureDefinition(theContext, theUri); - } - if (theUri.startsWith("http://hl7.org/fhir/ValueSet/")) { - return (T) fetchValueSet(theContext, theUri); - } - // if (theUri.startsWith("http://hl7.org/fhir/ValueSet/")) { - // Map defaultValueSets = myDefaultValueSets; - // if (defaultValueSets == null) { - // String path = theContext.getVersion().getPathToSchemaDefinitions().replace("/schema", "/valueset") + "/valuesets.xml"; - // InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(path); - // if (valuesetText == null) { - // return null; - // } - // InputStreamReader reader; - // try { - // reader = new InputStreamReader(valuesetText, "UTF-8"); - // } catch (UnsupportedEncodingException e) { - // // Shouldn't happen! - // throw new InternalErrorException("UTF-8 encoding not supported on this platform", e); - // } - // - // defaultValueSets = new HashMap(); - // - // Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - // for (BundleEntryComponent next : bundle.getEntry()) { - // IdType nextId = new IdType(next.getFullUrl()); - // if (nextId.isEmpty() || !nextId.getValue().startsWith("http://hl7.org/fhir/ValueSet/")) { - // continue; - // } - // defaultValueSets.put(nextId.toVersionless().getValue(), (ValueSet) next.getResource()); - // } - // - // myDefaultValueSets = defaultValueSets; - // } - // - // return (T) defaultValueSets.get(theUri); - // } - - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) { - return provideStructureDefinitionMap(theContext).get(theUrl); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return (ValueSet) fetchCodeSystemOrValueSet(theContext, uri, false); - } - - public void flush() { - myCodeSystems = null; - myStructureDefinitions = null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - CodeSystem cs = fetchCodeSystem(theContext, theSystem); - return cs != null; - } - - private void loadCodeSystems(FhirContext theContext, Map theCodeSystems, Map theValueSets, String theClasspath) { - ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath); - InputStream inputStream = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - InputStreamReader reader = null; - if (inputStream != null) { - try { - reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof CodeSystem) { - CodeSystem nextValueSet = (CodeSystem) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextValueSet); - } - } else if (next.getResource() instanceof ValueSet) { - ValueSet nextValueSet = (ValueSet) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theValueSets.put(system, nextValueSet); - } - } - } - } finally { - IOUtils.closeQuietly(reader); - IOUtils.closeQuietly(inputStream); - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private void loadStructureDefinitions(FhirContext theContext, Map theCodeSystems, String theClasspath) { - ourLog.info("Loading structure definitions from classpath: {}", theClasspath); - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - if (valuesetText != null) { - InputStreamReader reader = new InputStreamReader(valuesetText, StandardCharsets.UTF_8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof StructureDefinition) { - StructureDefinition nextSd = (StructureDefinition) next.getResource(); - nextSd.getText().setDivAsString(""); - String system = nextSd.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextSd); - } - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private Map provideStructureDefinitionMap(FhirContext theContext) { - Map structureDefinitions = myStructureDefinitions; - if (structureDefinitions == null) { - structureDefinitions = new HashMap<>(); - - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu2016may/model/profile/profiles-resources.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu2016may/model/profile/profiles-types.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu2016may/model/profile/profiles-others.xml"); - - myStructureDefinitions = structureDefinitions; - } - return structureDefinitions; - } - - private CodeValidationResult testIfConceptIsInList(String theCode, List conceptList, boolean theCaseSensitive) { - String code = theCode; - if (theCaseSensitive == false) { - code = code.toUpperCase(); - } - - return testIfConceptIsInListInner(conceptList, theCaseSensitive, code); - } - - private CodeValidationResult testIfConceptIsInListInner(List conceptList, boolean theCaseSensitive, String code) { - CodeValidationResult retVal = null; - for (ConceptDefinitionComponent next : conceptList) { - String nextCandidate = next.getCode(); - if (theCaseSensitive == false) { - nextCandidate = nextCandidate.toUpperCase(); - } - if (nextCandidate.equals(code)) { - retVal = new CodeValidationResult(null, null, next, next.getDisplay()); - break; - } - - // recurse - retVal = testIfConceptIsInList(code, next.getConcept(), theCaseSensitive); - if (retVal != null) { - break; - } - } - - return retVal; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - if (isNotBlank(theValueSetUrl)) { - HapiWorkerContext workerContext = new HapiWorkerContext(theContext, this); - ValueSetExpander expander = new ValueSetExpanderSimple(workerContext, workerContext); - try { - ValueSet valueSet = fetchValueSet(theContext, theValueSetUrl); - if (valueSet != null) { - ValueSetExpander.ValueSetExpansionOutcome expanded = expander.expand(valueSet); - Optional haveMatch = expanded - .getValueset() - .getExpansion() - .getContains() - .stream() - .filter(t -> (Constants.codeSystemNotNeeded(theCodeSystem) || t.getSystem().equals(theCodeSystem)) && t.getCode().equals(theCode)) - .findFirst(); - if (haveMatch.isPresent()) { - return new CodeValidationResult(new ConceptDefinitionComponent(new CodeType(theCode))); - } - } - } catch (Exception e) { - return new CodeValidationResult(OperationOutcome.IssueSeverity.WARNING, e.getMessage()); - } - - return null; - } - - if (theCodeSystem != null) { - CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); - if (cs != null) { - boolean caseSensitive = true; - if (cs.hasCaseSensitive()) { - caseSensitive = cs.getCaseSensitive(); - } - - CodeValidationResult retVal = testIfConceptIsInList(theCode, cs.getConcept(), caseSensitive); - - if (retVal != null) { - return retVal; - } - } - } - - return new CodeValidationResult(OperationOutcome.IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return validateCode(theContext, theSystem, theCode, null, (String)null).asLookupCodeResult(theSystem, theCode); - } - -} diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/HapiWorkerContext.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/HapiWorkerContext.java index a69117d8d7b..b2935da5371 100644 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/HapiWorkerContext.java +++ b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/HapiWorkerContext.java @@ -1,10 +1,9 @@ package org.hl7.fhir.dstu2016may.hapi.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.apache.commons.lang3.Validate; import org.hl7.fhir.dstu2016may.formats.IParser; import org.hl7.fhir.dstu2016may.formats.ParserType; @@ -14,19 +13,25 @@ import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent; import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpander; import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpander.ValueSetExpansionOutcome; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpanderFactory; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpanderSimple; import org.hl7.fhir.dstu2016may.utils.INarrativeGenerator; import org.hl7.fhir.dstu2016may.utils.IWorkerContext; +import org.hl7.fhir.utilities.i18n.I18nBase; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public final class HapiWorkerContext implements IWorkerContext, ValueSetExpanderFactory { +public final class HapiWorkerContext extends I18nBase implements IWorkerContext { private final FhirContext myCtx; private Map myFetchedResourceCache = new HashMap<>(); private IValidationSupport myValidationSupport; @@ -36,11 +41,13 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander Validate.notNull(theValidationSupport, "theValidationSupport must not be null"); myCtx = theCtx; myValidationSupport = theValidationSupport; + + setValidationMessageLanguage(getLocale()); } @Override public List allStructures() { - return myValidationSupport.fetchAllStructureDefinitions(myCtx); + return myValidationSupport.fetchAllStructureDefinitions(); } @Override @@ -48,7 +55,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return null; } else { - return myValidationSupport.fetchCodeSystem(myCtx, theSystem); + return (CodeSystem) myValidationSupport.fetchCodeSystem(theSystem); } } @@ -60,7 +67,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @SuppressWarnings("unchecked") T retVal = (T) myFetchedResourceCache.get(theUri); if (retVal == null) { - retVal = myValidationSupport.fetchResource(myCtx, theClass, theUri); + retVal = myValidationSupport.fetchResource(theClass, theUri); if (retVal != null) { myFetchedResourceCache.put(theUri, retVal); } @@ -135,7 +142,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return false; } else { - return myValidationSupport.isCodeSystemSupported(myCtx, theSystem); + return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem); } } @@ -168,14 +175,16 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @Override public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) { - IContextValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, (String)null); + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, new ConceptValidationOptions(), theSystem, theCode, theDisplay, null); if (result == null) { return null; } - ConceptDefinitionComponent definition = (ConceptDefinitionComponent) result.asConceptDefinition(); - String message = result.getMessage(); - OperationOutcome.IssueSeverity severity = (OperationOutcome.IssueSeverity) result.getSeverity(); - return new ValidationResult(severity, message, definition); + OperationOutcome.IssueSeverity severity = null; + if (result.getSeverity() != null) { + severity = OperationOutcome.IssueSeverity.fromCode(result.getSeverityCode()); + } + ConceptDefinitionComponent definition = result.getCode() != null ? new ConceptDefinitionComponent().setCode(result.getCode()) : null; + return new ValidationResult(severity, result.getMessage(), definition); } @Override @@ -255,26 +264,9 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander return new ValidationResult(OperationOutcome.IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" + Constants.codeSystemWithDefaultDescription(theSystem) + "]"); } - @Override - public ValueSetExpander getExpander() { - return new ValueSetExpanderSimple(this, this); - } - @Override public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk) { - ValueSetExpansionOutcome vso; - try { - vso = getExpander().expand(theSource); - } catch (InvalidRequestException e) { - throw e; - } catch (Exception e) { - throw new InternalErrorException(e); - } - if (vso.getError() != null) { - throw new InvalidRequestException(vso.getError()); - } else { - return vso; - } + throw new UnsupportedOperationException(); } @Override diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/IValidationSupport.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/IValidationSupport.java deleted file mode 100644 index eee5b5cf2d8..00000000000 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/IValidationSupport.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.hl7.fhir.dstu2016may.hapi.validation; - -import java.util.List; - -import org.hl7.fhir.dstu2016may.model.CodeSystem; -import org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.dstu2016may.model.OperationOutcome; -import org.hl7.fhir.dstu2016may.model.ValueSet; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; -import org.hl7.fhir.dstu2016may.model.StructureDefinition; -import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; - -public interface IValidationSupport - extends ca.uhn.fhir.context.support.IContextValidationSupport { - - /** - * Expands the given portion of a ValueSet - * - * @param theInclude - * The portion to include - * @return The expansion - */ - @Override - ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude); - - /** - * Load and return all possible structure definitions - */ - @Override - List fetchAllStructureDefinitions(FhirContext theContext); - - /** - * Fetch a code system by Uri - * - * @param uri - * Canonical Uri of the code system - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - CodeSystem fetchCodeSystem(FhirContext theContext, String uri); - - /** - * Fetch a valueset by Uri - * - * @param uri - * Canonical Uri of the ValueSet - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - ValueSet fetchValueSet(FhirContext theContext, String uri); - - /** - * Loads a resource needed by the validation (a StructureDefinition, or a - * ValueSet) - * - * @param theContext - * The HAPI FHIR Context object current in use by the validator - * @param theClass - * The type of the resource to load - * @param theUri - * The resource URI - * @return Returns the resource, or null if no resource with the - * given URI can be found - */ - @Override - T fetchResource(FhirContext theContext, Class theClass, String theUri); - - @Override - StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl); - - /** - * Returns true if codes in the given code system can be expanded - * or validated - * - * @param theSystem - * The URI for the code system, e.g. "http://loinc.org" - * @return Returns true if codes in the given code system can be - * validated - */ - @Override - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); - -} diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/PrePopulatedValidationSupport.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/PrePopulatedValidationSupport.java deleted file mode 100644 index 67318ca44e4..00000000000 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/PrePopulatedValidationSupport.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.hl7.fhir.dstu2016may.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu2016may.model.CodeSystem; -import org.hl7.fhir.dstu2016may.model.StructureDefinition; -import org.hl7.fhir.dstu2016may.model.ValueSet; -import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * This class is an implementation of {@link IValidationSupport} which may be pre-populated - * with a collection of validation resources to be used by the validator. - */ -public class PrePopulatedValidationSupport implements IValidationSupport { - - private Map myStructureDefinitions; - private Map myValueSets; - private Map myCodeSystems; - - /** - * Constructor - */ - public PrePopulatedValidationSupport() { - myStructureDefinitions = new HashMap<>(); - myValueSets = new HashMap<>(); - myCodeSystems = new HashMap<>(); - } - - /** - * Constructor - * - * @param theStructureDefinitions The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and - * values are the resource itself. - * @param theValueSets The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - * @param theCodeSystems The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - */ - public PrePopulatedValidationSupport(Map theStructureDefinitions, Map theValueSets, Map theCodeSystems) { - myStructureDefinitions = theStructureDefinitions; - myValueSets = theValueSets; - myCodeSystems = theCodeSystems; - } - - /** - * Add a new CodeSystem resource which will be available to the validator. Note that - * {@link CodeSystem#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - */ - public void addCodeSystem(CodeSystem theCodeSystem) { - Validate.notBlank(theCodeSystem.getUrl(), "theCodeSystem.getUrl() must not return a value"); - myCodeSystems.put(theCodeSystem.getUrl(), theCodeSystem); - } - - /** - * Add a new StructureDefinition resource which will be available to the validator. Note that - * {@link StructureDefinition#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - */ - public void addStructureDefinition(StructureDefinition theStructureDefinition) { - Validate.notBlank(theStructureDefinition.getUrl(), "theStructureDefinition.getUrl() must not return a value"); - myStructureDefinitions.put(theStructureDefinition.getUrl(), theStructureDefinition); - } - - /** - * Add a new ValueSet resource which will be available to the validator. Note that - * {@link ValueSet#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - */ - public void addValueSet(ValueSet theValueSet) { - Validate.notBlank(theValueSet.getUrl(), "theValueSet.getUrl() must not return a value"); - myValueSets.put(theValueSet.getUrl(), theValueSet); - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList(myStructureDefinitions.values()); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myCodeSystems.get(uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myValueSets.get(uri); - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) myStructureDefinitions.get(theUri); - } - if (theClass.equals(ValueSet.class)) { - return (T) myValueSets.get(theUri); - } - if (theClass.equals(CodeSystem.class)) { - return (T) myCodeSystems.get(theUri); - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myStructureDefinitions.get(theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - -} diff --git a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/ValidationSupportChain.java b/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/ValidationSupportChain.java deleted file mode 100644 index 46ce3fb72d7..00000000000 --- a/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/ValidationSupportChain.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.hl7.fhir.dstu2016may.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu2016may.model.CodeSystem; -import org.hl7.fhir.dstu2016may.model.StructureDefinition; -import org.hl7.fhir.dstu2016may.model.ValueSet; -import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.isBlank; - -public class ValidationSupportChain implements IValidationSupport { - - private List myChain; - - /** - * Constructor - */ - public ValidationSupportChain() { - myChain = new ArrayList(); - } - - /** - * Constructor - */ - public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { - this(); - for (IValidationSupport next : theValidationSupportModules) { - if (next != null) { - myChain.add(next); - } - } - } - - public void addValidationSupport(IValidationSupport theValidationSupport) { - myChain.add(theValidationSupport); - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) { - return next.expandValueSet(theCtx, theInclude); - } - } - return myChain.get(0).expandValueSet(theCtx, theInclude); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - List retVal = new ArrayList<>(); - for (IValidationSupport next : myChain) { - List candidates = next.fetchAllConformanceResources(theContext); - if (candidates != null) { - retVal.addAll(candidates); - } - } - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - ArrayList retVal = new ArrayList(); - Set urls = new HashSet(); - for (IValidationSupport nextSupport : myChain) { - for (StructureDefinition next : nextSupport.fetchAllStructureDefinitions(theContext)) { - if (isBlank(next.getUrl()) || urls.add(next.getUrl())) { - retVal.add(next); - } - } - } - return retVal; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String uri) { - for (IValidationSupport next : myChain) { - CodeSystem retVal = next.fetchCodeSystem(theCtx, uri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String uri) { - for (IValidationSupport next : myChain) { - ValueSet retVal = next.fetchValueSet(theCtx, uri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - for (IValidationSupport next : myChain) { - T retVal = next.fetchResource(theContext, theClass, theUri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - for (IValidationSupport next : myChain) { - StructureDefinition retVal = next.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theSystem)) { - return true; - } - } - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - for (IValidationSupport next : myChain) { - if (theCodeSystem != null && next.isCodeSystemSupported(theCtx, theCodeSystem)) { - return next.validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - } - } - return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theContext, theSystem)) { - return next.lookupCode(theContext, theSystem, theCode); - } - } - return null; - } - - -} diff --git a/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2_1Test.java b/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2_1Test.java index e31cf6be5bb..f8a232a60a4 100644 --- a/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2_1Test.java +++ b/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2_1Test.java @@ -1170,44 +1170,6 @@ public class JsonParserDstu2_1Test { assertEquals("", out); } - // FIXME: this should pass - @Test - @Ignore - public void testNamespacePreservationEncode() throws Exception { - //@formatter:off - String input = "" + - "" + - "" + - "" + - "@fhirabend" + - "" + - "" + - ""; - //@formatter:on - Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, input); - - String expected = "@fhirabend"; - assertEquals(expected, parsed.getText().getDiv().getValueAsString()); - - String encoded = ourCtx.newJsonParser().encodeResourceToString(parsed); - ourLog.info(encoded); - assertThat(encoded, containsString("\"div\":\"" + expected.replace("\"", "\\\"") + "\"")); - } - - // TODO: this should pass - @Test - @Ignore - public void testNamespacePreservationParse() throws Exception { - String input = "{\"resourceType\":\"Patient\",\"text\":{\"div\":\"@fhirabend\"}}"; - Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, input); - XhtmlNode div = parsed.getText().getDiv(); - - assertEquals("@fhirabend", div.getValueAsString()); - - String encoded = ourCtx.newXmlParser().encodeResourceToString(parsed); - assertEquals("@fhirabend", encoded); - } - @Test public void testOmitResourceId() { Patient p = new Patient(); @@ -1556,13 +1518,13 @@ public class JsonParserDstu2_1Test { ourCtx.newJsonParser().parseResource("FOO"); fail(); } catch (DataFormatException e) { - assertEquals("Failed to parse JSON content, error was: Content does not appear to be FHIR JSON, first non-whitespace character was: 'F' (must be '{')", e.getMessage()); + assertEquals("Failed to parse JSON encoded FHIR content: Content does not appear to be FHIR JSON, first non-whitespace character was: 'F' (must be '{')", e.getMessage()); } try { ourCtx.newJsonParser().parseResource("[\"aaa\"]"); fail(); } catch (DataFormatException e) { - assertEquals("Failed to parse JSON content, error was: Content does not appear to be FHIR JSON, first non-whitespace character was: '[' (must be '{')", e.getMessage()); + assertEquals("Failed to parse JSON encoded FHIR content: Content does not appear to be FHIR JSON, first non-whitespace character was: '[' (must be '{')", e.getMessage()); } assertEquals(Bundle.class, ourCtx.newJsonParser().parseResource(" {\"resourceType\" : \"Bundle\"}").getClass()); @@ -1693,25 +1655,6 @@ public class JsonParserDstu2_1Test { } - /** - * See #484 - */ - @Test - public void testParseNarrativeWithEmptyDiv() { - String input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; - Basic basic = ourCtx.newJsonParser().parseResource(Basic.class, input); - assertEquals(null, basic.getText().getDivAsString()); - - input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; - basic = ourCtx.newJsonParser().parseResource(Basic.class, input); - assertEquals(null, basic.getText().getDivAsString()); - - input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; - basic = ourCtx.newJsonParser().parseResource(Basic.class, input); - assertEquals("
    ", basic.getText().getDivAsString()); - - } - /** * See #163 */ diff --git a/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2_1Test.java b/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2_1Test.java index be084ff6cf4..2e810637a11 100644 --- a/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2_1Test.java +++ b/hapi-fhir-structures-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2_1Test.java @@ -1996,41 +1996,27 @@ public class XmlParserDstu2_1Test { assertThat(output, stringContainsInOrder( "{", - " \"resourceType\": \"Patient\",", - " \"id\": \"someid\",", - " \"_id\": {", - " \"fhir_comments\": [", - " \" comment 1 \"", - " ]", - " },", - " \"extension\": [", - " {", - " \"fhir_comments\": [", - " \" comment 2 \",", - " \" comment 7 \"", - " ],", - " \"url\": \"urn:patientext:att\",", - " \"valueAttachment\": {", - " \"fhir_comments\": [", - " \" comment 3 \",", - " \" comment 6 \"", - " ],", - " \"contentType\": \"aaaa\",", - " \"_contentType\": {", - " \"fhir_comments\": [", - " \" comment 4 \"", - " ]", - " },", - " \"data\": \"AAAA\",", - " \"_data\": {", - " \"fhir_comments\": [", - " \" comment 5 \"", - " ]", - " }", - " }", - " }", - " ]", - "}" + " \"resourceType\": \"Patient\",", + " \"id\": \"someid\",", + " \"_id\": {", + " \"fhir_comments\": [ \" comment 1 \" ]", + " },", + " \"extension\": [ {", + " \"fhir_comments\": [ \" comment 2 \", \" comment 7 \" ],", + " \"url\": \"urn:patientext:att\",", + " \"valueAttachment\": {", + " \"fhir_comments\": [ \" comment 3 \", \" comment 6 \" ],", + " \"contentType\": \"aaaa\",", + " \"_contentType\": {", + " \"fhir_comments\": [ \" comment 4 \" ]", + " },", + " \"data\": \"AAAA\",", + " \"_data\": {", + " \"fhir_comments\": [ \" comment 5 \" ]", + " }", + " }", + " } ]", + "}" )); //@formatter:on diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index cb64e29ef8d..0be1f2cfaad 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 5978253c356..ea7ad545b30 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.dstu2; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.*; import ca.uhn.fhir.model.base.composite.*; @@ -48,11 +47,6 @@ public class FhirDstu2 implements IFhirVersion { } - @Override - public IContextValidationSupport createValidationSupport() { - throw new UnsupportedOperationException("Validation support is not supported in DSTU2 contexts"); - } - @Override public IResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirServerDstu2.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirServerDstu2.java index 8bc48aaad80..594dd58f153 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirServerDstu2.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirServerDstu2.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.dstu2; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/AgeDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/AgeDt.java index 588c425f1f9..ad45c13cbd5 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/AgeDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/AgeDt.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.model.primitive.IntegerDt; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/BoundCodeableConceptDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/BoundCodeableConceptDt.java index 4def78eee8d..1d1aa2dc079 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/BoundCodeableConceptDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/BoundCodeableConceptDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.dstu2.composite; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java index 987d1676252..9d36114e8a0 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.model.dstu2.composite; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/CountDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/CountDt.java index b5405fddc4a..e0217b48a26 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/CountDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/CountDt.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.model.dstu2.composite.QuantityDt; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DistanceDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DistanceDt.java index 1f9df01c946..11686df8aee 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DistanceDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DistanceDt.java @@ -8,7 +8,7 @@ import ca.uhn.fhir.model.primitive.IntegerDt; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DurationDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DurationDt.java index 5359a14a338..f5ea65c779b 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DurationDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/DurationDt.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.model.dstu2.composite.QuantityDt; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/MoneyDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/MoneyDt.java index 583515543e9..433e86eb1b7 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/MoneyDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/MoneyDt.java @@ -7,7 +7,7 @@ import ca.uhn.fhir.model.api.annotation.SimpleSetter; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java index ce404c61268..7bf23822d3d 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.model.dstu2.composite; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java index 58aa4b93a99..87b5d1f5267 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.model.dstu2.composite; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/SimpleQuantityDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/SimpleQuantityDt.java index a045d2a00b5..d9fd9ae9d20 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/SimpleQuantityDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/SimpleQuantityDt.java @@ -9,7 +9,7 @@ import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java index 8c03b43d360..51784d838e3 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java @@ -9,7 +9,7 @@ import java.util.List; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/Dstu2BundleFactory.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/Dstu2BundleFactory.java index c1ee0eec930..bec60461303 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/Dstu2BundleFactory.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/Dstu2BundleFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.provider.dstu2; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerConformanceProvider.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerConformanceProvider.java index e21f9db071b..b0d3ac4b796 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerConformanceProvider.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerConformanceProvider.java @@ -41,7 +41,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerProfileProvider.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerProfileProvider.java index c47556a685b..09ae243b7d6 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerProfileProvider.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/rest/server/provider/dstu2/ServerProfileProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.rest.server.provider.dstu2; * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java index e5f04c63226..bef8cddd281 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java @@ -3,15 +3,14 @@ package ca.uhn.fhir.parser; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.*; import ca.uhn.fhir.model.base.composite.BaseCodingDt; -import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu2.composite.CodingDt; -import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; -import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu2.composite.*; import ca.uhn.fhir.model.dstu2.resource.*; import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; import ca.uhn.fhir.model.dstu2.valueset.*; import ca.uhn.fhir.model.primitive.*; import ca.uhn.fhir.parser.IParserErrorHandler.IParseLocation; +import ca.uhn.fhir.parser.testprofile.CommunicationProfile; +import ca.uhn.fhir.parser.testprofile.PatientProfile; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.util.TestUtil; import ch.qos.logback.classic.Level; @@ -499,37 +498,28 @@ public class JsonParserDstu2Test { String enc = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); ourLog.info(enc); - //@formatter:off String actual = enc.trim(); ourLog.info("Actual:\n{}", actual); - assertEquals("{\n" + - " \"resourceType\": \"Patient\",\n" + - " \"meta\": {\n" + - " \"security\": [\n" + - " {\n" + - " \"system\": \"SYSTEM1\",\n" + - " \"version\": \"VERSION1\",\n" + - " \"code\": \"CODE1\",\n" + - " \"display\": \"DISPLAY1\"\n" + - " },\n" + - " {\n" + - " \"system\": \"SYSTEM2\",\n" + - " \"version\": \"VERSION2\",\n" + - " \"code\": \"CODE2\",\n" + - " \"display\": \"DISPLAY2\"\n" + - " }\n" + - " ]\n" + - " },\n" + - " \"name\": [\n" + - " {\n" + - " \"family\": [\n" + - " \"FAMILY\"\n" + - " ]\n" + - " }\n" + - " ]\n" + - "}", actual); - //@formatter:on + assertThat(actual, stringContainsInOrder("{", + " \"resourceType\": \"Patient\",", + " \"meta\": {", + " \"security\": [ {", + " \"system\": \"SYSTEM1\",", + " \"version\": \"VERSION1\",", + " \"code\": \"CODE1\",", + " \"display\": \"DISPLAY1\"", + " }, {", + " \"system\": \"SYSTEM2\",", + " \"version\": \"VERSION2\",", + " \"code\": \"CODE2\",", + " \"display\": \"DISPLAY2\"", + " } ]", + " },", + " \"name\": [ {", + " \"family\": [ \"FAMILY\" ]", + " } ]", + "}")); Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); List gotLabels = ResourceMetadataKeyEnum.SECURITY_LABELS.get(parsed); @@ -1081,6 +1071,52 @@ public class JsonParserDstu2Test { } } + /** + * When max cardinality in profile is changed to 1 output JSON should still contain an array. + * http://hl7.org/fhir/profiling.html#cardinality + */ + @Test + public void testEncodePatientProfileWithChangedCardinalityFromManyToOne() { + PatientProfile patient = new PatientProfile(); + patient.myIdentifier = Collections.singletonList(new IdentifierDt("http://test-system", "test-code")); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("\"identifier\":[{\"system\":\"http://test-system\",\"value\":\"test-code\"}]")); + } + + /** + * When max cardinality in profile is changed to 1 output JSON should still contain an array. + * http://hl7.org/fhir/profiling.html#cardinality + */ + @Test + public void testEncodePatientProfileWithChangedCardinalityFromManyToOneAsList() { + PatientProfile patient = new PatientProfile(); + patient.myName = new HumanNameDt().setText("Testname"); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("\"name\":[{\"text\":\"Testname\"}]")); + } + + /** + * When max cardinality in profile is changed to 1 output JSON should still contain an array. + * http://hl7.org/fhir/profiling.html#cardinality + */ + @Test + public void testEncodeCommunicationProfileWithChangedCardinalityFromManyToOneAsList() { + CommunicationProfile communication = new CommunicationProfile(); + communication.myPayload = new CommunicationProfile._Payload(); + communication.myPayload.myContent = new StringDt("testContent"); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(communication); + ourLog.info(encoded); + + assertThat(encoded, containsString("\"payload\":[{\"contentString\":\"testContent\"}]")); + } + @Test public void testEncodingNullExtension() { Patient p = new Patient(); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu2Test.java index 3f800d809ce..f577cc8502b 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu2Test.java @@ -1,16 +1,15 @@ package ca.uhn.fhir.parser.jsonlike; -import java.io.StringReader; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IJsonLikeParser; +import ca.uhn.fhir.parser.json.JsonLikeStructure; +import ca.uhn.fhir.parser.json.jackson.JacksonStructure; +import ca.uhn.fhir.util.TestUtil; import org.apache.commons.io.IOUtils; import org.junit.AfterClass; import org.junit.Test; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IJsonLikeParser; -import ca.uhn.fhir.parser.json.GsonStructure; -import ca.uhn.fhir.parser.json.JsonLikeStructure; -import ca.uhn.fhir.util.TestUtil; +import java.io.StringReader; public class JsonLikeParserDstu2Test { private static FhirContext ourCtx = FhirContext.forDstu2(); @@ -28,7 +27,7 @@ public class JsonLikeParserDstu2Test { String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); ourLog.info(encoded); - JsonLikeStructure jsonLikeStructure = new GsonStructure(); + JsonLikeStructure jsonLikeStructure = new JacksonStructure(); jsonLikeStructure.load(new StringReader(encoded)); IJsonLikeParser jsonLikeparser = (IJsonLikeParser)ourCtx.newJsonParser(); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/CommunicationProfile.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/CommunicationProfile.java new file mode 100644 index 00000000000..977d119a7bb --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/CommunicationProfile.java @@ -0,0 +1,32 @@ +package ca.uhn.fhir.parser.testprofile; + +import ca.uhn.fhir.model.api.annotation.Block; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu2.resource.Communication; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.util.ElementUtil; + +@ResourceDef(name = "Communication", profile = "http://hl7.org/fhir/profiles/CommunicationProfile", id = "communicationProfile") +public class CommunicationProfile extends Communication { + + @Child(name = "payload", min = 1, max = 1, order = Child.REPLACE_PARENT, type = {_Payload.class}) + @Description(shortDefinition = "", formalDefinition = "Text, attachment(s), or resource(s) that was communicated to the recipient.") + public _Payload myPayload; + + @Block + public static class _Payload extends Payload { + + @Child(name = "content", min = 0, max = 1, order = Child.REPLACE_PARENT, type = {StringDt.class}) + @Description(shortDefinition = "", formalDefinition = "A communicated content") + public StringDt myContent; + + @Override + public boolean isEmpty() { + return super.isEmpty() && ElementUtil.isEmpty(myContent); + } + + } + +} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/PatientProfile.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/PatientProfile.java new file mode 100644 index 00000000000..ae3b9b1979b --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/testprofile/PatientProfile.java @@ -0,0 +1,26 @@ +package ca.uhn.fhir.parser.testprofile; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu2.resource.Patient; + +import java.util.List; + +@ResourceDef(name="Patient", profile="http://hl7.org/fhir/profiles/PatientProfile", id="patientProfile") +public class PatientProfile extends Patient { + /** + * identifier + */ + @Child(name = "identifier", min = 1, max = 1, order = Child.REPLACE_PARENT, summary = true, type = {IdentifierDt.class}) + @Description(shortDefinition = "id", formalDefinition = "An identifier for this patient.") + public List myIdentifier; + + + @Child(name = "name", min = 1, max = 1, order = Child.REPLACE_PARENT, summary = true, type = {HumanNameDt.class}) + @Description(shortDefinition = "", formalDefinition = "Name.") + public HumanNameDt myName; + +} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientServerValidationDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientServerValidationDstu2Test.java index 6400f939e23..4028e8c3c1a 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientServerValidationDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientServerValidationDstu2Test.java @@ -265,7 +265,7 @@ public class ClientServerValidationDstu2Test { @Test public void testServerReturnsWrongVersionForDstu2() throws Exception { - String wrongFhirVersion = "3.0.1"; + String wrongFhirVersion = FhirVersionEnum.DSTU3.getFhirVersionString(); assertThat(wrongFhirVersion, is(FhirVersionEnum.DSTU3.getFhirVersionString())); // asserting that what we assume to be the DSTU3 FHIR version is still correct Conformance conf = new Conformance(); conf.setFhirVersion(wrongFhirVersion); @@ -285,7 +285,7 @@ public class ClientServerValidationDstu2Test { fail(); } catch (FhirClientInappropriateForServerException e) { String out = e.toString(); - String want = "The server at base URL \"http://foo/metadata\" returned a conformance statement indicating that it supports FHIR version \"3.0.1\" which corresponds to DSTU3, but this client is configured to use DSTU2 (via the FhirContext)"; + String want = "The server at base URL \"http://foo/metadata\" returned a conformance statement indicating that it supports FHIR version \"" + wrongFhirVersion + "\" which corresponds to DSTU3, but this client is configured to use DSTU2 (via the FhirContext)"; ourLog.info(out); ourLog.info(want); assertThat(out, containsString(want)); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu2Test.java index 56b6d378d2f..0622c981494 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu2Test.java @@ -14,6 +14,8 @@ import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; import ca.uhn.fhir.model.dstu2.resource.Bundle.Link; import ca.uhn.fhir.model.dstu2.resource.Conformance.Rest; import ca.uhn.fhir.model.dstu2.resource.Conformance.RestSecurity; +import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum; +import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; import ca.uhn.fhir.model.primitive.*; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.IParser; @@ -22,6 +24,7 @@ import ca.uhn.fhir.rest.api.*; import ca.uhn.fhir.rest.client.apache.ApacheRestfulClientFactory; import ca.uhn.fhir.rest.client.api.*; import ca.uhn.fhir.rest.client.exceptions.InvalidResponseException; +import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException; import ca.uhn.fhir.rest.client.impl.BaseClient; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.param.DateParam; @@ -2360,6 +2363,33 @@ public class GenericClientDstu2Test { assertEquals("Patient/2/_history/2", response.getEntry().get(1).getResponse().getLocation()); } + @Test + public void testTransactionHandle204NoBody() throws Exception { + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + ca.uhn.fhir.model.dstu2.resource.Bundle bundle = new Bundle(); + bundle.setType(BundleTypeEnum.TRANSACTION); + + ca.uhn.fhir.model.dstu2.resource.Bundle.Entry entry = bundle.addEntry(); + entry.setResource(new Patient()); + entry.getRequest().setMethod(HTTPVerbEnum.PUT); + + + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + when(myHttpResponse.getEntity() ).thenReturn(null); + + try { + client.transaction().withBundle(bundle).execute(); + fail("Should throw an exception"); + } catch (NonFhirResponseException e) { + assertEquals("status", Constants.STATUS_HTTP_204_NO_CONTENT, e.getStatusCode()); + } + } + @Test public void testUpdateConditional() throws Exception { ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeDstu2Test.java index 66648cd8afe..d67c4468f42 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeDstu2Test.java @@ -41,9 +41,6 @@ import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; -/** - * Created by dsotnikov on 2/25/2014. - */ public class IncludeDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(IncludeDstu2Test.class); @@ -310,9 +307,6 @@ public class IncludeDstu2Test { } - /** - * Created by dsotnikov on 2/25/2014. - */ public static class DummyPatientResourceProvider implements IResourceProvider { @Search(queryName = "containedInclude") diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/TransactionWithVersionlessBundleResourceParamTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/TransactionWithVersionlessBundleResourceParamTest.java new file mode 100644 index 00000000000..be23b590ac9 --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/TransactionWithVersionlessBundleResourceParamTest.java @@ -0,0 +1,146 @@ +package ca.uhn.fhir.rest.server; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.dstu2.resource.Bundle; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.rest.annotation.Transaction; +import ca.uhn.fhir.rest.annotation.TransactionParam; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.test.utilities.JettyUtil; +import ca.uhn.fhir.util.TestUtil; +import org.apache.commons.io.IOUtils; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.servlet.ServletHolder; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.concurrent.TimeUnit; + +import static org.junit.Assert.assertEquals; + +public class TransactionWithVersionlessBundleResourceParamTest { + + + private static CloseableHttpClient ourClient; + + + private static FhirContext ourCtx = FhirContext.forDstu2(); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TransactionWithVersionlessBundleResourceParamTest.class); + private static int ourPort; + private static boolean ourReturnOperationOutcome; + private static Server ourServer; + + @Before + public void before() { + ourReturnOperationOutcome = false; + } + + @Test + public void testTransactionWithJsonRequest() throws Exception { + Bundle b = new Bundle(); + InstantDt nowInstant = InstantDt.withCurrentTime(); + + Patient p1 = new Patient(); + p1.addName().addFamily("Family1"); + Entry entry = b.addEntry(); + p1.getId().setValue("1"); + entry.setResource(p1); + + String bundleString = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(b); + ourLog.info(bundleString); + + HttpPost httpPost = new HttpPost("http://localhost:" + ourPort + "/"); + httpPost.setEntity(new StringEntity(bundleString, ContentType.create(Constants.CT_FHIR_JSON, "UTF-8"))); + HttpResponse status = ourClient.execute(httpPost); + String responseContent = IOUtils.toString(status.getEntity().getContent()); + IOUtils.closeQuietly(status.getEntity().getContent()); + + assertEquals(200, status.getStatusLine().getStatusCode()); + + ourLog.info(responseContent); + + Bundle bundle = ourCtx.newJsonParser().parseResource(Bundle.class, responseContent); + assertEquals(1, bundle.getEntry().size()); + + Entry entry0 = bundle.getEntry().get(0); + assertEquals("Patient/81/_history/91", entry0.getResponse().getLocation()); + + } + + @AfterClass + public static void afterClassClearContext() throws Exception { + JettyUtil.closeServer(ourServer); + TestUtil.clearAllStaticFieldsForUnitTest(); + } + + @BeforeClass + public static void beforeClass() throws Exception { + ourServer = new Server(0); + + DummyProvider patientProvider = new DummyProvider(); + RestfulServer server = new RestfulServer(ourCtx); + server.setProviders(patientProvider); + + org.eclipse.jetty.servlet.ServletContextHandler proxyHandler = new org.eclipse.jetty.servlet.ServletContextHandler(); + proxyHandler.setContextPath("/"); + + ServletHolder handler = new ServletHolder(); + handler.setServlet(server); + proxyHandler.addServlet(handler, "/*"); + + ourServer.setHandler(proxyHandler); + JettyUtil.startServer(ourServer); + ourPort = JettyUtil.getPortForStartedServer(ourServer); + + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(500000, TimeUnit.MILLISECONDS); + HttpClientBuilder builder = HttpClientBuilder.create(); + builder.setConnectionManager(connectionManager); + ourClient = builder.build(); + + } + + + public static class DummyProvider { + + @Transaction + public IBaseBundle transaction(@TransactionParam Bundle theResources) { + Bundle retVal = new Bundle(); + + if (ourReturnOperationOutcome) { + OperationOutcome oo = new OperationOutcome(); + oo.addIssue().setDetails("AAAAA"); + retVal.addEntry().setResource(oo); + } + + int index = 1; + for (Entry nextEntry : theResources.getEntry()) { + String newId = "8" + Integer.toString(index); + if (nextEntry.getRequest().getMethodElement().getValueAsEnum() == HTTPVerbEnum.DELETE) { + newId = new IdDt(nextEntry.getRequest().getUrlElement()).getIdPart(); + } + IdDt newIdDt = (new IdDt("Patient", newId, "9" + Integer.toString(index))); + retVal.addEntry().getResponse().setLocation(newIdDt.getValue()); + index++; + } + + return retVal; + } + + } + +} diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index e8955655dd3..514655502fe 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/DefaultProfileValidationSupport.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/DefaultProfileValidationSupport.java deleted file mode 100644 index 34c9d0f26c3..00000000000 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/DefaultProfileValidationSupport.java +++ /dev/null @@ -1,342 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.io.Charsets; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.dstu3.terminologies.ValueSetExpander; -import org.hl7.fhir.dstu3.terminologies.ValueSetExpanderSimple; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class DefaultProfileValidationSupport implements IValidationSupport { - - private static final String URL_PREFIX_VALUE_SET = "http://hl7.org/fhir/ValueSet/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION = "http://hl7.org/fhir/StructureDefinition/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION_BASE = "http://hl7.org/fhir/"; - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class); - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSetExpansionComponent retVal = new ValueSetExpansionComponent(); - - Set wantCodes = new HashSet<>(); - for (ConceptReferenceComponent next : theInclude.getConcept()) { - wantCodes.add(next.getCode()); - } - - CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem()); - if (system != null) { - List concepts = system.getConcept(); - addConcepts(theInclude, retVal, wantCodes, concepts); - } - - for (UriType next : theInclude.getValueSet()) { - ValueSet vs = myValueSets.get(defaultString(next.getValueAsString())); - if (vs != null) { - for (ConceptSetComponent nextInclude : vs.getCompose().getInclude()) { - ValueSetExpansionComponent contents = expandValueSet(theContext, nextInclude); - retVal.getContains().addAll(contents.getContains()); - } - } - } - - return retVal; - } - - private void addConcepts(ConceptSetComponent theInclude, ValueSetExpansionComponent theRetVal, Set theWantCodes, List theConcepts) { - for (ConceptDefinitionComponent next : theConcepts) { - if (theWantCodes.isEmpty() || theWantCodes.contains(next.getCode())) { - theRetVal - .addContains() - .setSystem(theInclude.getSystem()) - .setCode(next.getCode()) - .setDisplay(next.getDisplay()); - } - addConcepts(theInclude, theRetVal, theWantCodes, next.getConcept()); - } - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList(provideStructureDefinitionMap(theContext).values()); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true); - } - - private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) { - synchronized (this) { - Map codeSystems = myCodeSystems; - Map valueSets = myValueSets; - if (codeSystems == null || valueSets == null) { - codeSystems = new HashMap(); - valueSets = new HashMap(); - - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu3/model/valueset/valuesets.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu3/model/valueset/v2-tables.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/dstu3/model/valueset/v3-codesystems.xml"); - - myCodeSystems = codeSystems; - myValueSets = valueSets; - } - - if (codeSystem) { - return codeSystems.get(theSystem); - } else { - return valueSets.get(theSystem); - } - } - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - Validate.notBlank(theUri, "theUri must not be null or blank"); - - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - - if (theClass.equals(ValueSet.class) || theUri.startsWith(URL_PREFIX_VALUE_SET)) { - return (T) fetchValueSet(theContext, theUri); - } - - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) { - String url = theUrl; - if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) { - // no change - } else if (url.indexOf('/') == -1) { - url = URL_PREFIX_STRUCTURE_DEFINITION + url; - } else if (StringUtils.countMatches(url, '/') == 1) { - url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url; - } - Map map = provideStructureDefinitionMap(theContext); - StructureDefinition retVal = map.get(url); - - if (retVal == null && url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) { - String tryUrl = URL_PREFIX_STRUCTURE_DEFINITION + StringUtils.capitalize(url.substring(URL_PREFIX_STRUCTURE_DEFINITION.length())); - retVal = map.get(tryUrl); - } - - return retVal; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return (ValueSet) fetchCodeSystemOrValueSet(theContext, uri, false); - } - - public void flush() { - myCodeSystems = null; - myStructureDefinitions = null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - CodeSystem cs = fetchCodeSystem(theContext, theSystem); - return cs != null && cs.getContent() != CodeSystemContentMode.NOTPRESENT; - } - - private void loadCodeSystems(FhirContext theContext, Map theCodeSystems, Map theValueSets, String theClasspath) { - ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath); - InputStream inputStream = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - InputStreamReader reader = null; - if (inputStream != null) { - try { - reader = new InputStreamReader(inputStream, Charsets.UTF_8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof CodeSystem) { - CodeSystem nextValueSet = (CodeSystem) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextValueSet); - } - } else if (next.getResource() instanceof ValueSet) { - ValueSet nextValueSet = (ValueSet) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theValueSets.put(system, nextValueSet); - } - } - } - } finally { - IOUtils.closeQuietly(reader); - IOUtils.closeQuietly(inputStream); - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private void loadStructureDefinitions(FhirContext theContext, Map theCodeSystems, String theClasspath) { - ourLog.info("Loading structure definitions from classpath: {}", theClasspath); - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - if (valuesetText != null) { - InputStreamReader reader = new InputStreamReader(valuesetText, Charsets.UTF_8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof StructureDefinition) { - StructureDefinition nextSd = (StructureDefinition) next.getResource(); - nextSd.getText().setDivAsString(""); - String system = nextSd.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextSd); - } - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private Map provideStructureDefinitionMap(FhirContext theContext) { - Map structureDefinitions = myStructureDefinitions; - if (structureDefinitions == null) { - structureDefinitions = new HashMap(); - - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu3/model/profile/profiles-resources.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu3/model/profile/profiles-types.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu3/model/profile/profiles-others.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/dstu3/model/extension/extension-definitions.xml"); - - myStructureDefinitions = structureDefinitions; - } - return structureDefinitions; - } - - private CodeValidationResult testIfConceptIsInList(CodeSystem theCodeSystem, String theCode, List conceptList, boolean theCaseSensitive) { - String code = theCode; - if (theCaseSensitive == false) { - code = code.toUpperCase(); - } - - return testIfConceptIsInListInner(theCodeSystem, conceptList, theCaseSensitive, code); - } - - private CodeValidationResult testIfConceptIsInListInner(CodeSystem theCodeSystem, List conceptList, boolean theCaseSensitive, String code) { - CodeValidationResult retVal = null; - for (ConceptDefinitionComponent next : conceptList) { - String nextCandidate = next.getCode(); - if (theCaseSensitive == false) { - nextCandidate = nextCandidate.toUpperCase(); - } - if (nextCandidate.equals(code)) { - retVal = new CodeValidationResult(null, null, next, next.getDisplay()); - break; - } - - // recurse - retVal = testIfConceptIsInList(theCodeSystem, code, next.getConcept(), theCaseSensitive); - if (retVal != null) { - break; - } - } - - if (retVal != null) { - retVal.setCodeSystemName(theCodeSystem.getName()); - retVal.setCodeSystemVersion(theCodeSystem.getVersion()); - } - - return retVal; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - if (isNotBlank(theValueSetUrl)) { - HapiWorkerContext workerContext = new HapiWorkerContext(theContext, this); - ValueSetExpander expander = new ValueSetExpanderSimple(workerContext, workerContext); - try { - ValueSet valueSet = fetchValueSet(theContext, theValueSetUrl); - if (valueSet != null) { - ValueSetExpander.ValueSetExpansionOutcome expanded = expander.expand(valueSet, null); - Optional haveMatch = expanded - .getValueset() - .getExpansion() - .getContains() - .stream() - .filter(t -> (Constants.codeSystemNotNeeded(theCodeSystem) || t.getSystem().equals(theCodeSystem)) && t.getCode().equals(theCode)) - .findFirst(); - if (haveMatch.isPresent()) { - return new CodeValidationResult(new ConceptDefinitionComponent(new CodeType(theCode))); - } - } - } catch (Exception e) { - return new CodeValidationResult(IssueSeverity.WARNING, e.getMessage()); - } - - return null; - } - - if (theCodeSystem != null) { - CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); - if (cs != null) { - boolean caseSensitive = true; - if (cs.hasCaseSensitive()) { - caseSensitive = cs.getCaseSensitive(); - } - - CodeValidationResult retVal = testIfConceptIsInList(cs, theCode, cs.getConcept(), caseSensitive); - - if (retVal != null) { - return retVal; - } - } - } - - return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return validateCode(theContext, theSystem, theCode, null, (String)null).asLookupCodeResult(theSystem, theCode); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; - } - -} diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/FhirDstu3.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/FhirDstu3.java index 6dc6d3b74df..a2037e1d788 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/FhirDstu3.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/FhirDstu3.java @@ -24,7 +24,6 @@ import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.primitive.IdDt; @@ -49,16 +48,6 @@ public class FhirDstu3 implements IFhirVersion { return new FluentPathDstu3(theFhirContext); } - @Override - public IContextValidationSupport createValidationSupport() { - String className = "org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport"; - try { - return (IContextValidationSupport) Class.forName(className).newInstance(); - } catch (Exception theE) { - throw new ConfigurationException(className + " is not on classpath. Make sure that hapi-fhir-validation-VERSION.jar is available."); - } - } - @Override public IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/HapiWorkerContext.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/HapiWorkerContext.java index cf67693767e..d87d808f894 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/HapiWorkerContext.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/HapiWorkerContext.java @@ -1,9 +1,9 @@ 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.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.CoverageIgnore; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; @@ -17,23 +17,30 @@ import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.dstu3.terminologies.ValueSetExpander; -import org.hl7.fhir.dstu3.terminologies.ValueSetExpanderFactory; -import org.hl7.fhir.dstu3.terminologies.ValueSetExpanderSimple; import org.hl7.fhir.dstu3.utils.INarrativeGenerator; import org.hl7.fhir.dstu3.utils.IResourceValidator; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.exceptions.TerminologyServiceException; +import org.hl7.fhir.utilities.i18n.I18nBase; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationOptions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.ArrayList; +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; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory { +public final class HapiWorkerContext extends I18nBase implements IWorkerContext { + private static final Logger ourLog = LoggerFactory.getLogger(HapiWorkerContext.class); private final FhirContext myCtx; private final Cache myFetchedResourceCache; - private IValidationSupport myValidationSupport; private ExpansionProfile myExpansionProfile; @@ -48,6 +55,9 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); } myFetchedResourceCache = Caffeine.newBuilder().expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS).build(); + + // Set a default locale + setValidationMessageLanguage(getLocale()); } @Override @@ -58,38 +68,22 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @Override public List allStructures() { - return myValidationSupport.fetchAllStructureDefinitions(myCtx); + return myValidationSupport.fetchAllStructureDefinitions(); } @Override - public ValueSetExpansionOutcome expand(ValueSet theSource, ExpansionProfile theProfile) { - ValueSetExpansionOutcome vso; - try { - vso = getExpander().expand(theSource, theProfile); - } catch (InvalidRequestException e) { - throw e; - } catch (TerminologyServiceException e) { - throw new InvalidRequestException(e.getMessage(), e); - } catch (Exception e) { - throw new InternalErrorException(e); - } - if (vso.getError() != null) { - throw new InvalidRequestException(vso.getError()); + public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc, boolean theHierarchical) { + ValueSet input = new ValueSet(); + input.getCompose().addInclude(theInc); + IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(myValidationSupport, null, input); + ValueSet outputValueSet = (ValueSet) output.getValueSet(); + if (outputValueSet != null) { + return outputValueSet.getExpansion(); } else { - return vso; + return null; } } - @Override - public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHeiarchical) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc, boolean theHeiarchical) { - return myValidationSupport.expandValueSet(myCtx, theInc); - } - @Override public StructureDefinition fetchTypeDefinition(String theCode) { return fetchResource(org.hl7.fhir.dstu3.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + theCode); @@ -100,20 +94,28 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return null; } else { - return myValidationSupport.fetchCodeSystem(myCtx, theSystem); + return (CodeSystem) myValidationSupport.fetchCodeSystem(theSystem); } } @Override public T fetchResource(Class theClass, String theUri) { + Validate.notBlank(theUri, "theUri must not be null or blank"); if (myValidationSupport == null) { return null; } else { - @SuppressWarnings("unchecked") - T retVal = (T) myFetchedResourceCache.get(theUri, t->{ - return myValidationSupport.fetchResource(myCtx, theClass, theUri); - }); - return retVal; + try { + //noinspection unchecked + return (T) myFetchedResourceCache.get(theUri, t -> { + T resource = myValidationSupport.fetchResource(theClass, theUri); + if (resource == null) { + throw new IllegalArgumentException(); + } + return resource; + }); + } catch (IllegalArgumentException e) { + return null; + } } } @@ -132,15 +134,13 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public String getAbbreviation(String theName) { + public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet source, boolean cacheOk, boolean heiarchical) { throw new UnsupportedOperationException(); } @Override - public ValueSetExpander getExpander() { - ValueSetExpanderSimple retVal = new ValueSetExpanderSimple(this, this); - retVal.setMaxExpansionSize(Integer.MAX_VALUE); - return retVal; + public String getAbbreviation(String theName) { + throw new UnsupportedOperationException(); } @Override @@ -175,7 +175,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @Override public List getResourceNames() { - List result = new ArrayList(); + List result = new ArrayList<>(); for (ResourceType next : ResourceType.values()) { result.add(next.name()); } @@ -239,13 +239,13 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return false; } else { - return myValidationSupport.isCodeSystemSupported(myCtx, theSystem); + return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem); } } @Override public Set typeTails() { - return new HashSet(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", + return new HashSet<>(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", "Markdown", "Base64Binary", "Coding", "CodeableConcept", "Attachment", "Identifier", "Quantity", "SampledData", "Range", "Period", "Ratio", "HumanName", "Address", "ContactPoint", "Timing", "Reference", "Annotation", "Signature", "Meta")); } @@ -272,11 +272,26 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @Override public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) { - IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, (String)null); + ValidationOptions options = new ValidationOptions(); + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, null); if (result == null) { return null; } - return new ValidationResult((IssueSeverity)result.getSeverity(), result.getMessage(), (ConceptDefinitionComponent)result.asConceptDefinition()); + + IssueSeverity severity = null; + if (result.getSeverity() != null) { + severity = IssueSeverity.fromCode(result.getSeverityCode()); + } + ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode()); + return new ValidationResult(severity, result.getMessage(), definition); + } + + public static ConceptValidationOptions convertConceptValidationOptions(ValidationOptions theOptions) { + ConceptValidationOptions retVal = new ConceptValidationOptions(); + if (theOptions.isGuessSystem()) { + retVal = retVal.setInferSystem(true); + } + return retVal; } @Override @@ -287,31 +302,12 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander @Override public ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet theVs) { - /* - * The following valueset is a special case, since the BCP codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/languages".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } - - /* - * The following valueset is a special case, since the mime types codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/mimetypes".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } - IValidationSupport.CodeValidationResult outcome; + ValidationOptions options = new ValidationOptions(); if (isNotBlank(theVs.getUrl())) { - outcome = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, theVs.getUrl()); + outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs.getUrl()); } else { - outcome = myValidationSupport.validateCodeInValueSet(myCtx, theSystem, theCode, theDisplay, theVs); + outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs); } if (outcome != null && outcome.isOk()) { diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/IValidationSupport.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/IValidationSupport.java deleted file mode 100644 index a63581a4b6c..00000000000 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/ctx/IValidationSupport.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; -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.utilities.validation.ValidationMessage.IssueSeverity; - -import java.util.List; - -public interface IValidationSupport - extends ca.uhn.fhir.context.support.IContextValidationSupport { - - /** - * Expands the given portion of a ValueSet - * - * @param theInclude The portion to include - * @return The expansion - */ - @Override - ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude); - - /** - * Load and return all possible structure definitions - */ - @Override - List fetchAllStructureDefinitions(FhirContext theContext); - - /** - * Fetch a code system by Uri - * - * @param uri Canonical Uri of the code system - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - CodeSystem fetchCodeSystem(FhirContext theContext, String uri); - - /** - * Fetch a valueset by Uri - * - * @param uri Canonical Uri of the ValueSet - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - ValueSet fetchValueSet(FhirContext theContext, String uri); - - @Override - StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl); - - /** - * Returns true if codes in the given code system can be expanded - * or validated - * - * @param theSystem The URI for the code system, e.g. "http://loinc.org" - * @return Returns true if codes in the given code system can be - * validated - */ - @Override - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); - - /** - * Generate a snapshot from the given differential profile. - * - * @return Returns null if this module does not know how to handle this request - */ - StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName); - - - -} diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/fluentpath/FluentPathDstu3.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/fluentpath/FluentPathDstu3.java index cfb1daeaaa5..9eb25f1d369 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/fluentpath/FluentPathDstu3.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/hapi/fluentpath/FluentPathDstu3.java @@ -1,10 +1,10 @@ package org.hl7.fhir.dstu3.hapi.fluentpath; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.fluentpath.FluentPathExecutionException; import ca.uhn.fhir.fluentpath.IFluentPath; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.Base; import org.hl7.fhir.dstu3.utils.FHIRPathEngine; import org.hl7.fhir.exceptions.FHIRException; @@ -18,10 +18,7 @@ public class FluentPathDstu3 implements IFluentPath { private FHIRPathEngine myEngine; public FluentPathDstu3(FhirContext theCtx) { - if (!(theCtx.getValidationSupport() instanceof IValidationSupport)) { - throw new IllegalStateException("Validation support module configured on context appears to be for the wrong FHIR version- Does not extend " + IValidationSupport.class.getName()); - } - IValidationSupport validationSupport = (IValidationSupport) theCtx.getValidationSupport(); + IValidationSupport validationSupport = theCtx.getValidationSupport(); myEngine = new FHIRPathEngine(new HapiWorkerContext(theCtx, validationSupport)); } diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/model/XhtmlNodeTest.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/model/XhtmlNodeTest.java index b87263ed32b..673cac8a740 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/model/XhtmlNodeTest.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/model/XhtmlNodeTest.java @@ -30,7 +30,17 @@ public class XhtmlNodeTest { assertEquals("
    It’s January again
    ", new XhtmlNode().setValue(dt.getValue()).getValueAsString()); } - + /** + * See #1658 + */ + @Test + public void testLangAttributePreserved() { + XhtmlNode dt = new XhtmlNode(); + dt.setValueAsString("
    help i'm a bug
    "); + assertEquals("
    help i'm a bug
    ", dt.getValueAsString()); + assertEquals("
    help i'm a bug
    ", new XhtmlNode().setValue(dt.getValue()).getValueAsString()); + } + /** * See #443 */ diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java index f6c411a272a..b87a3408961 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java @@ -72,7 +72,8 @@ public class JsonParserDstu3Test { p.parseResource(input); fail(); } catch (DataFormatException e) { - assertEquals("Found incorrect type for element subject - Expected OBJECT and found SCALAR (STRING)", e.getMessage()); + assertEquals("Failed to parse JSON encoded FHIR content: Unexpected character ('=' (code 61)): was expecting a colon to separate field name and value\n" + + " at [Source: UNKNOWN; line: 4, column: 18]", e.getMessage()); } } @@ -488,32 +489,25 @@ public class JsonParserDstu3Test { String enc = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); ourLog.info(enc); - //@formatter:off - assertEquals("{\n" + - " \"resourceType\": \"Patient\",\n" + - " \"meta\": {\n" + - " \"security\": [\n" + - " {\n" + - " \"system\": \"SYSTEM1\",\n" + - " \"version\": \"VERSION1\",\n" + - " \"code\": \"CODE1\",\n" + - " \"display\": \"DISPLAY1\"\n" + - " },\n" + - " {\n" + - " \"system\": \"SYSTEM2\",\n" + - " \"version\": \"VERSION2\",\n" + - " \"code\": \"CODE2\",\n" + - " \"display\": \"DISPLAY2\"\n" + - " }\n" + - " ]\n" + - " },\n" + - " \"name\": [\n" + - " {\n" + - " \"family\": \"FAMILY\"\n" + - " }\n" + - " ]\n" + - "}", enc.trim()); - //@formatter:on + assertThat(enc.trim(), stringContainsInOrder("{", + " \"resourceType\": \"Patient\",", + " \"meta\": {", + " \"security\": [ {", + " \"system\": \"SYSTEM1\",", + " \"version\": \"VERSION1\",", + " \"code\": \"CODE1\",", + " \"display\": \"DISPLAY1\"", + " }, {", + " \"system\": \"SYSTEM2\",", + " \"version\": \"VERSION2\",", + " \"code\": \"CODE2\",", + " \"display\": \"DISPLAY2\"", + " } ]", + " },", + " \"name\": [ {", + " \"family\": \"FAMILY\"", + " } ]", + "}")); Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); List gotLabels = parsed.getMeta().getSecurity(); @@ -1401,7 +1395,8 @@ public class JsonParserDstu3Test { String input = "{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.0000000000000001}}"; Observation obs = ourCtx.newJsonParser().parseResource(Observation.class, input); - assertEquals("0.0000000000000001", ((Quantity) obs.getValue()).getValueElement().getValueAsString()); + DecimalType valueElement = ((Quantity) obs.getValue()).getValueElement(); + assertEquals("0.0000000000000001", valueElement.getValueAsString()); String str = ourCtx.newJsonParser().encodeResourceToString(obs); ourLog.info(str); @@ -1593,44 +1588,6 @@ public class JsonParserDstu3Test { assertEquals("", out); } - // FIXME: this should pass - @Test - @Ignore - public void testNamespacePreservationEncode() { - //@formatter:off - String input = "" + - "" + - "" + - "" + - "@fhirabend" + - "" + - "" + - ""; - //@formatter:on - Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, input); - - String expected = "@fhirabend"; - assertEquals(expected, parsed.getText().getDiv().getValueAsString()); - - String encoded = ourCtx.newJsonParser().encodeResourceToString(parsed); - ourLog.info(encoded); - assertThat(encoded, containsString("\"div\":\"" + expected.replace("\"", "\\\"") + "\"")); - } - - // TODO: this should pass - @Test - @Ignore - public void testNamespacePreservationParse() { - String input = "{\"resourceType\":\"Patient\",\"text\":{\"div\":\"@fhirabend\"}}"; - Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, input); - XhtmlNode div = parsed.getText().getDiv(); - - assertEquals("@fhirabend", div.getValueAsString()); - - String encoded = ourCtx.newXmlParser().encodeResourceToString(parsed); - assertEquals("@fhirabend", encoded); - } - @Test public void testOmitResourceId() { Patient p = new Patient(); @@ -2031,13 +1988,13 @@ public class JsonParserDstu3Test { ourCtx.newJsonParser().parseResource("FOO"); fail(); } catch (DataFormatException e) { - assertEquals("Failed to parse JSON content, error was: Content does not appear to be FHIR JSON, first non-whitespace character was: 'F' (must be '{')", e.getMessage()); + assertEquals("Failed to parse JSON encoded FHIR content: Content does not appear to be FHIR JSON, first non-whitespace character was: 'F' (must be '{')", e.getMessage()); } try { ourCtx.newJsonParser().parseResource("[\"aaa\"]"); fail(); } catch (DataFormatException e) { - assertEquals("Failed to parse JSON content, error was: Content does not appear to be FHIR JSON, first non-whitespace character was: '[' (must be '{')", e.getMessage()); + assertEquals("Failed to parse JSON encoded FHIR content: Content does not appear to be FHIR JSON, first non-whitespace character was: '[' (must be '{')", e.getMessage()); } assertEquals(Bundle.class, ourCtx.newJsonParser().parseResource(" {\"resourceType\" : \"Bundle\"}").getClass()); @@ -2187,11 +2144,11 @@ public class JsonParserDstu3Test { public void testParseNarrativeWithEmptyDiv() { String input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; Basic basic = ourCtx.newJsonParser().parseResource(Basic.class, input); - assertEquals(null, basic.getText().getDivAsString()); + assertEquals("
    ", basic.getText().getDivAsString()); input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; basic = ourCtx.newJsonParser().parseResource(Basic.class, input); - assertEquals(null, basic.getText().getDivAsString()); + assertEquals("
    ", basic.getText().getDivAsString()); input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    \"}}"; basic = ourCtx.newJsonParser().parseResource(Basic.class, input); @@ -2199,6 +2156,18 @@ public class JsonParserDstu3Test { } + /** + * See #1658 + */ + @Test + public void testParseNarrativeWithLang() { + String input = "{\"resourceType\":\"Basic\",\"id\":\"1\",\"text\":{\"status\":\"generated\",\"div\":\"
    foo
    \"}}"; + Basic basic = ourCtx.newJsonParser().parseResource(Basic.class, input); + assertEquals("
    foo
    ", basic.getText().getDivAsString()); + + + } + /** * See #163 */ @@ -2247,25 +2216,47 @@ public class JsonParserDstu3Test { @Test public void testParseWithPrecision() { - String input = "{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.000000000000000100}}"; - Observation obs = ourCtx.newJsonParser().parseResource(Observation.class, input); - DecimalType valueElement = ((Quantity) obs.getValue()).getValueElement(); - assertEquals("0.000000000000000100", valueElement.getValueAsString()); +// BigDecimal d0 = new BigDecimal("0.1"); +// BigDecimal d1 = new BigDecimal("0.1000"); +// +// ourLog.info("Value: {}", d0); +// ourLog.info("Value: {}", d1); - String str = ourCtx.newJsonParser().encodeResourceToString(obs); - ourLog.info(str); - assertEquals("{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.000000000000000100}}", str); + { + String input = "{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.0100}}"; + Observation obs = ourCtx.newJsonParser().parseResource(Observation.class, input); + DecimalType valueElement = ((Quantity) obs.getValue()).getValueElement(); + assertEquals("0.0100", valueElement.getValueAsString()); + String str = ourCtx.newJsonParser().encodeResourceToString(obs); + ourLog.info(str); + assertEquals("{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.0100}}", str); + } + { + String input = "{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.000000000000000100}}"; + Observation obs = ourCtx.newJsonParser().parseResource(Observation.class, input); + DecimalType valueElement = ((Quantity) obs.getValue()).getValueElement(); + assertEquals("0.000000000000000100", valueElement.getValueAsString()); + String str = ourCtx.newJsonParser().encodeResourceToString(obs); + ourLog.info(str); + assertEquals("{\"resourceType\":\"Observation\",\"valueQuantity\":{\"value\":0.000000000000000100}}", str); + } } - @Test(expected = DataFormatException.class) + @Test public void testParseWithTrailingContent() { String bundle = "{\n" + - " \"resourceType\" : \"Bundle\",\n" + - " \"total\" : 1\n" + + " \"resourceType\": \"Bundle\",\n" + + " \"total\": 1\n" + "}}"; - ourCtx.newJsonParser().parseResource(Bundle.class, bundle); + try { + ourCtx.newJsonParser().parseResource(Bundle.class, bundle); + fail(); + } catch (DataFormatException e) { + assertEquals("Failed to parse JSON encoded FHIR content: Unexpected close marker '}': expected ']' (for root starting at [Source: UNKNOWN; line: 1, column: 0])\n" + + " at [Source: UNKNOWN; line: 4, column: 3]", e.getMessage()); + } } @Test diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/XmlParserDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/XmlParserDstu3Test.java index 8023417d1de..98fdae848b5 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/XmlParserDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/XmlParserDstu3Test.java @@ -2508,42 +2508,27 @@ public class XmlParserDstu3Test { output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(pat); ourLog.info(output); - assertThat(output, stringContainsInOrder( - "{", + assertThat(output, stringContainsInOrder("{", " \"resourceType\": \"Patient\",", " \"id\": \"someid\",", " \"_id\": {", - " \"fhir_comments\": [", - " \" comment 1 \"", - " ]", + " \"fhir_comments\": [ \" comment 1 \" ]", " },", - " \"extension\": [", - " {", - " \"fhir_comments\": [", - " \" comment 2 \",", - " \" comment 7 \"", - " ],", - " \"url\": \"urn:patientext:att\",", - " \"valueAttachment\": {", - " \"fhir_comments\": [", - " \" comment 3 \",", - " \" comment 6 \"", - " ],", - " \"contentType\": \"aaaa\",", - " \"_contentType\": {", - " \"fhir_comments\": [", - " \" comment 4 \"", - " ]", - " },", - " \"data\": \"AAAA\",", - " \"_data\": {", - " \"fhir_comments\": [", - " \" comment 5 \"", - " ]", - " }", + " \"extension\": [ {", + " \"fhir_comments\": [ \" comment 2 \", \" comment 7 \" ],", + " \"url\": \"urn:patientext:att\",", + " \"valueAttachment\": {", + " \"fhir_comments\": [ \" comment 3 \", \" comment 6 \" ],", + " \"contentType\": \"aaaa\",", + " \"_contentType\": {", + " \"fhir_comments\": [ \" comment 4 \" ]", + " },", + " \"data\": \"AAAA\",", + " \"_data\": {", + " \"fhir_comments\": [ \" comment 5 \" ]", " }", " }", - " ]", + " } ]", "}")); } diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu3Test.java index 082a737d845..d63d4dcb8d9 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserDstu3Test.java @@ -1,426 +1,404 @@ -package ca.uhn.fhir.parser.jsonlike; - -import java.io.IOException; -import java.io.StringReader; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Stack; - -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.model.Bundle; -import org.hl7.fhir.dstu3.model.Extension; -import org.hl7.fhir.dstu3.model.Patient; -import org.hl7.fhir.dstu3.model.Reference; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Test; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IJsonLikeParser; -import ca.uhn.fhir.parser.json.GsonStructure; -import ca.uhn.fhir.parser.json.JsonLikeStructure; -import ca.uhn.fhir.parser.json.JsonLikeWriter; -import ca.uhn.fhir.util.TestUtil; - -public class JsonLikeParserDstu3Test { - private static FhirContext ourCtx = FhirContext.forDstu3(); - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JsonLikeParserDstu3Test.class); - - /** - * Test for JSON Parser with user-supplied JSON-like structure (use default GSON) - */ - @Test - public void testJsonLikeParseAndEncodeBundleFromXmlToJson() throws Exception { - String content = IOUtils.toString(JsonLikeParserDstu3Test.class.getResourceAsStream("/bundle_with_woven_obs.xml")); - - Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, content); - - String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); - ourLog.info(encoded); - - JsonLikeStructure jsonLikeStructure = new GsonStructure(); - jsonLikeStructure.load(new StringReader(encoded)); - - IJsonLikeParser jsonLikeparser = (IJsonLikeParser)ourCtx.newJsonParser(); - - Bundle bundle = jsonLikeparser.parseResource(Bundle.class, jsonLikeStructure); - - } - - /** - * Test JSON-Like writer using custom stream writer - * - */ - @Test - public void testJsonLikeParseWithCustomJSONStreamWriter() throws Exception { - String refVal = "http://my.org/FooBar"; - - Patient fhirPat = new Patient(); - fhirPat.addExtension().setUrl("x1").setValue(new Reference(refVal)); - - IJsonLikeParser jsonLikeParser = (IJsonLikeParser)ourCtx.newJsonParser(); - JsonLikeMapWriter jsonLikeWriter = new JsonLikeMapWriter(); - - jsonLikeParser.encodeResourceToJsonLikeWriter(fhirPat, jsonLikeWriter); - Map jsonLikeMap = jsonLikeWriter.getResultMap(); - - System.out.println("encoded map: " + jsonLikeMap.toString()); - - Assert.assertNotNull("Encoded resource missing 'resourceType' element", jsonLikeMap.get("resourceType")); - Assert.assertEquals("Expecting 'resourceType'='Patient'; found '"+jsonLikeMap.get("resourceType")+"'", jsonLikeMap.get("resourceType"), "Patient"); - - Assert.assertNotNull("Encoded resource missing 'extension' element", jsonLikeMap.get("extension")); - Assert.assertTrue("'extension' element is not a List", (jsonLikeMap.get("extension") instanceof List)); - - List extensions = (List)jsonLikeMap.get("extension"); - Assert.assertEquals("'extnesion' array has more than one entry", 1, extensions.size()); - Assert.assertTrue("'extension' array entry is not a Map", (extensions.get(0) instanceof Map)); - - Map extension = (Map)extensions.get(0); - Assert.assertNotNull("'extension' entry missing 'url' member", extension.get("url")); - Assert.assertTrue("'extension' entry 'url' member is not a String", (extension.get("url") instanceof String)); - Assert.assertEquals("Expecting '/extension[]/url' = 'x1'; found '"+extension.get("url")+"'", "x1", (String)extension.get("url")); - - } - - @AfterClass - public static void afterClassClearContext() { - TestUtil.clearAllStaticFieldsForUnitTest(); - } - - - - public static class JsonLikeMapWriter extends JsonLikeWriter { - - private Map target; - - private static class Block { - private BlockType type; - private String name; - private Map object; - private List array; - public Block(BlockType type) { - this.type = type; - } - public BlockType getType() { - return type; - } - public String getName() { - return name; - } - public void setName(String currentName) { - this.name = currentName; - } - public Map getObject() { - return object; - } - public void setObject(Map currentObject) { - this.object = currentObject; - } - public List getArray() { - return array; - } - public void setArray(List currentArray) { - this.array = currentArray; - } - } - private enum BlockType { - NONE, OBJECT, ARRAY - } - private Block currentBlock = new Block(BlockType.NONE); - private Stack blockStack = new Stack(); - - public JsonLikeMapWriter () { - super(); - } - - public Map getResultMap() { - return target; - } - public void setResultMap(Map target) { - this.target = target; - } - - @Override - public JsonLikeWriter init() throws IOException { - if (target != null) { - target.clear(); - } - currentBlock = new Block(BlockType.NONE); - blockStack.clear(); - return this; - } - - @Override - public JsonLikeWriter flush() throws IOException { - if (currentBlock.getType() != BlockType.NONE) { - throw new IOException("JsonLikeStreamWriter.flush() called but JSON document is not finished"); - } - return this; - } - - @Override - public void close() { - // nothing to do - } - - @Override - public JsonLikeWriter beginObject() throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - Map newObject = null; - if (currentBlock.getType() == BlockType.NONE) { - if (null == target) { - // for this test, we don't care about ordering of map elements - // target = new EntryOrderedMap(); - target = new HashMap(); - } - newObject = target; - } else { - // for this test, we don't care about ordering of map elements - // newObject = new EntryOrderedMap(); - newObject = new HashMap(); - } - blockStack.push(currentBlock); - currentBlock = new Block(BlockType.OBJECT); - currentBlock.setObject(newObject); - return this; - } - - @Override - public JsonLikeWriter beginArray() throws IOException { - if (currentBlock.getType() == BlockType.NONE) { - throw new IOException("JsonLikeStreamWriter.beginArray() called but only beginObject() is allowed here."); - } - blockStack.push(currentBlock); - currentBlock = new Block(BlockType.ARRAY); - currentBlock.setArray(new ArrayList()); - return this; - } - - @Override - public JsonLikeWriter beginObject(String name) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - blockStack.push(currentBlock); - currentBlock = new Block(BlockType.OBJECT); - currentBlock.setName(name); - // for this test, we don't care about ordering of map elements - // currentBlock.setObject(new EntryOrderedMap()); - currentBlock.setObject(new HashMap()); - return this; - } - - @Override - public JsonLikeWriter beginArray(String name) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - blockStack.push(currentBlock); - currentBlock = new Block(BlockType.ARRAY); - currentBlock.setName(name); - currentBlock.setArray(new ArrayList()); - return this; - } - - @Override - public JsonLikeWriter write(String value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(value); - return this; - } - - @Override - public JsonLikeWriter write(BigInteger value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(value); - return this; - } - - @Override - public JsonLikeWriter write(BigDecimal value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(value); - return this; - } - - @Override - public JsonLikeWriter write(long value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(Long.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter write(double value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(Double.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter write(Boolean value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(value); - return this; - } - - @Override - public JsonLikeWriter write(boolean value) throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(Boolean.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter writeNull() throws IOException { - if (currentBlock.getType() == BlockType.OBJECT) { - throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); - } - currentBlock.getArray().add(null); - return this; - } - - @Override - public JsonLikeWriter write(String name, String value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, value); - return this; - } - - @Override - public JsonLikeWriter write(String name, BigInteger value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, value); - return this; - } - @Override - public JsonLikeWriter write(String name, BigDecimal value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, value); - return this; - } - - @Override - public JsonLikeWriter write(String name, long value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, Long.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter write(String name, double value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, Double.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter write(String name, Boolean value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, value); - return this; - } - - @Override - public JsonLikeWriter write(String name, boolean value) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, Boolean.valueOf(value)); - return this; - } - - @Override - public JsonLikeWriter writeNull(String name) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, null); - return this; - } - - @Override - public JsonLikeWriter endObject() throws IOException { - if (currentBlock.getType() == BlockType.NONE) { - ourLog.error("JsonLikeStreamWriter.endObject(); called with no active JSON document"); - } else { - if (currentBlock.getType() != BlockType.OBJECT) { - ourLog.error("JsonLikeStreamWriter.endObject(); called outside a JSON object. (Use endArray() instead?)"); - } - endBlock(); - } - return this; - } - - @Override - public JsonLikeWriter endArray() throws IOException { - if (currentBlock.getType() == BlockType.NONE) { - ourLog.error("JsonLikeStreamWriter.endArray(); called with no active JSON document"); - } else { - if (currentBlock.getType() != BlockType.ARRAY) { - ourLog.error("JsonLikeStreamWriter.endArray(); called outside a JSON array. (Use endObject() instead?)"); - } - endBlock(); - } - return this; - } - - @Override - public JsonLikeWriter endBlock() throws IOException { - if (currentBlock.getType() == BlockType.NONE) { - ourLog.error("JsonLikeStreamWriter.endBlock(); called with no active JSON document"); - } else { - Object toPut = null; - if (currentBlock.getType() == BlockType.ARRAY) { - toPut = currentBlock.getArray(); - } else { - toPut = currentBlock.getObject(); - } - Block parentBlock = blockStack.pop(); - if (parentBlock.getType() == BlockType.OBJECT) { - parentBlock.getObject().put(currentBlock.getName(), toPut); - } else - if (parentBlock.getType() == BlockType.ARRAY) { - parentBlock.getArray().add(toPut); - } - currentBlock = parentBlock; - } - return this; - } - - } - -} +package ca.uhn.fhir.parser.jsonlike; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IJsonLikeParser; +import ca.uhn.fhir.parser.json.JsonLikeStructure; +import ca.uhn.fhir.parser.json.JsonLikeWriter; +import ca.uhn.fhir.parser.json.jackson.JacksonStructure; +import ca.uhn.fhir.util.TestUtil; +import org.apache.commons.io.IOUtils; +import org.hl7.fhir.dstu3.model.Bundle; +import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Reference; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; +import java.io.StringReader; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Stack; + +public class JsonLikeParserDstu3Test { + private static FhirContext ourCtx = FhirContext.forDstu3(); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JsonLikeParserDstu3Test.class); + + /** + * Test for JSON Parser with user-supplied JSON-like structure (use default GSON) + */ + @Test + public void testJsonLikeParseAndEncodeBundleFromXmlToJson() throws Exception { + String content = IOUtils.toString(JsonLikeParserDstu3Test.class.getResourceAsStream("/bundle_with_woven_obs.xml")); + + Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, content); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(encoded); + + JsonLikeStructure jsonLikeStructure = new JacksonStructure(); + jsonLikeStructure.load(new StringReader(encoded)); + + IJsonLikeParser jsonLikeparser = (IJsonLikeParser)ourCtx.newJsonParser(); + + Bundle bundle = jsonLikeparser.parseResource(Bundle.class, jsonLikeStructure); + + } + + /** + * Test JSON-Like writer using custom stream writer + * + */ + @Test + public void testJsonLikeParseWithCustomJSONStreamWriter() throws Exception { + String refVal = "http://my.org/FooBar"; + + Patient fhirPat = new Patient(); + fhirPat.addExtension().setUrl("x1").setValue(new Reference(refVal)); + + IJsonLikeParser jsonLikeParser = (IJsonLikeParser)ourCtx.newJsonParser(); + JsonLikeMapWriter jsonLikeWriter = new JsonLikeMapWriter(); + + jsonLikeParser.encodeResourceToJsonLikeWriter(fhirPat, jsonLikeWriter); + Map jsonLikeMap = jsonLikeWriter.getResultMap(); + + System.out.println("encoded map: " + jsonLikeMap.toString()); + + Assert.assertNotNull("Encoded resource missing 'resourceType' element", jsonLikeMap.get("resourceType")); + Assert.assertEquals("Expecting 'resourceType'='Patient'; found '"+jsonLikeMap.get("resourceType")+"'", jsonLikeMap.get("resourceType"), "Patient"); + + Assert.assertNotNull("Encoded resource missing 'extension' element", jsonLikeMap.get("extension")); + Assert.assertTrue("'extension' element is not a List", (jsonLikeMap.get("extension") instanceof List)); + + List extensions = (List)jsonLikeMap.get("extension"); + Assert.assertEquals("'extnesion' array has more than one entry", 1, extensions.size()); + Assert.assertTrue("'extension' array entry is not a Map", (extensions.get(0) instanceof Map)); + + Map extension = (Map)extensions.get(0); + Assert.assertNotNull("'extension' entry missing 'url' member", extension.get("url")); + Assert.assertTrue("'extension' entry 'url' member is not a String", (extension.get("url") instanceof String)); + Assert.assertEquals("Expecting '/extension[]/url' = 'x1'; found '"+extension.get("url")+"'", "x1", (String)extension.get("url")); + + } + + @AfterClass + public static void afterClassClearContext() { + TestUtil.clearAllStaticFieldsForUnitTest(); + } + + + + public static class JsonLikeMapWriter extends JsonLikeWriter { + + private Map target; + + private static class Block { + private BlockType type; + private String name; + private Map object; + private List array; + public Block(BlockType type) { + this.type = type; + } + public BlockType getType() { + return type; + } + public String getName() { + return name; + } + public void setName(String currentName) { + this.name = currentName; + } + public Map getObject() { + return object; + } + public void setObject(Map currentObject) { + this.object = currentObject; + } + public List getArray() { + return array; + } + public void setArray(List currentArray) { + this.array = currentArray; + } + } + private enum BlockType { + NONE, OBJECT, ARRAY + } + private Block currentBlock = new Block(BlockType.NONE); + private Stack blockStack = new Stack(); + + public JsonLikeMapWriter () { + super(); + } + + public Map getResultMap() { + return target; + } + public void setResultMap(Map target) { + this.target = target; + } + + @Override + public JsonLikeWriter init() throws IOException { + if (target != null) { + target.clear(); + } + currentBlock = new Block(BlockType.NONE); + blockStack.clear(); + return this; + } + + @Override + public JsonLikeWriter flush() throws IOException { + if (currentBlock.getType() != BlockType.NONE) { + throw new IOException("JsonLikeStreamWriter.flush() called but JSON document is not finished"); + } + return this; + } + + @Override + public void close() { + // nothing to do + } + + @Override + public JsonLikeWriter beginObject() throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + Map newObject = null; + if (currentBlock.getType() == BlockType.NONE) { + if (null == target) { + // for this test, we don't care about ordering of map elements + // target = new EntryOrderedMap(); + target = new HashMap(); + } + newObject = target; + } else { + // for this test, we don't care about ordering of map elements + // newObject = new EntryOrderedMap(); + newObject = new HashMap(); + } + blockStack.push(currentBlock); + currentBlock = new Block(BlockType.OBJECT); + currentBlock.setObject(newObject); + return this; + } + + @Override + public JsonLikeWriter beginObject(String name) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + blockStack.push(currentBlock); + currentBlock = new Block(BlockType.OBJECT); + currentBlock.setName(name); + // for this test, we don't care about ordering of map elements + // currentBlock.setObject(new EntryOrderedMap()); + currentBlock.setObject(new HashMap()); + return this; + } + + @Override + public JsonLikeWriter beginArray(String name) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + blockStack.push(currentBlock); + currentBlock = new Block(BlockType.ARRAY); + currentBlock.setName(name); + currentBlock.setArray(new ArrayList()); + return this; + } + + @Override + public JsonLikeWriter write(String value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(value); + return this; + } + + @Override + public JsonLikeWriter write(BigInteger value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(value); + return this; + } + + @Override + public JsonLikeWriter write(BigDecimal value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(value); + return this; + } + + @Override + public JsonLikeWriter write(long value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(Long.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter write(double value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(Double.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter write(Boolean value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(value); + return this; + } + + @Override + public JsonLikeWriter write(boolean value) throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(Boolean.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter writeNull() throws IOException { + if (currentBlock.getType() == BlockType.OBJECT) { + throw new IOException("Unnamed JSON elements can only be created in JSON arrays"); + } + currentBlock.getArray().add(null); + return this; + } + + @Override + public JsonLikeWriter write(String name, String value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, BigInteger value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, value); + return this; + } + @Override + public JsonLikeWriter write(String name, BigDecimal value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, long value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, Long.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter write(String name, double value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, Double.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter write(String name, Boolean value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, value); + return this; + } + + @Override + public JsonLikeWriter write(String name, boolean value) throws IOException { + if (currentBlock.getType() == BlockType.ARRAY) { + throw new IOException("Named JSON elements can only be created in JSON objects"); + } + currentBlock.getObject().put(name, Boolean.valueOf(value)); + return this; + } + + @Override + public JsonLikeWriter endObject() throws IOException { + if (currentBlock.getType() == BlockType.NONE) { + ourLog.error("JsonLikeStreamWriter.endObject(); called with no active JSON document"); + } else { + if (currentBlock.getType() != BlockType.OBJECT) { + ourLog.error("JsonLikeStreamWriter.endObject(); called outside a JSON object. (Use endArray() instead?)"); + } + endBlock(); + } + return this; + } + + @Override + public JsonLikeWriter endArray() throws IOException { + if (currentBlock.getType() == BlockType.NONE) { + ourLog.error("JsonLikeStreamWriter.endArray(); called with no active JSON document"); + } else { + if (currentBlock.getType() != BlockType.ARRAY) { + ourLog.error("JsonLikeStreamWriter.endArray(); called outside a JSON array. (Use endObject() instead?)"); + } + endBlock(); + } + return this; + } + + @Override + public JsonLikeWriter endBlock() { + if (currentBlock.getType() == BlockType.NONE) { + ourLog.error("JsonLikeStreamWriter.endBlock(); called with no active JSON document"); + } else { + Object toPut = null; + if (currentBlock.getType() == BlockType.ARRAY) { + toPut = currentBlock.getArray(); + } else { + toPut = currentBlock.getObject(); + } + Block parentBlock = blockStack.pop(); + if (parentBlock.getType() == BlockType.OBJECT) { + parentBlock.getObject().put(currentBlock.getName(), toPut); + } else + if (parentBlock.getType() == BlockType.ARRAY) { + parentBlock.getArray().add(toPut); + } + currentBlock = parentBlock; + } + return this; + } + + } + +} diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu3Test.java index 625b0ba0a85..40bb7342a37 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/client/GenericClientDstu3Test.java @@ -1538,21 +1538,21 @@ public class GenericClientDstu3Test { IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); int idx = 0; - client - .search() - .forResource(Patient.class) - .sort().ascending("address") - .returnBundle(Bundle.class) - .execute(); - assertEquals("http://example.com/fhir/Patient?_sort=address", capt.getAllValues().get(idx++).getURI().toASCIIString()); - - client - .search() - .forResource(Patient.class) - .sort().descending("address") - .returnBundle(Bundle.class) - .execute(); - assertEquals("http://example.com/fhir/Patient?_sort=-address", capt.getAllValues().get(idx++).getURI().toASCIIString()); +// client +// .search() +// .forResource(Patient.class) +// .sort().ascending("address") +// .returnBundle(Bundle.class) +// .execute(); +// assertEquals("http://example.com/fhir/Patient?_sort=address", capt.getAllValues().get(idx++).getURI().toASCIIString()); +// +// client +// .search() +// .forResource(Patient.class) +// .sort().descending("address") +// .returnBundle(Bundle.class) +// .execute(); +// assertEquals("http://example.com/fhir/Patient?_sort=-address", capt.getAllValues().get(idx++).getURI().toASCIIString()); client .search() diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java index f727d380bf5..b40c76088ad 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java @@ -11,6 +11,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class ReferenceParamTest { @@ -202,6 +203,101 @@ public class ReferenceParamTest { } + @Test + public void testGetIdPartAsBigDecimal() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "123"); + + assertEquals("123", rp.getIdPartAsBigDecimal().toPlainString()); + } + + @Test + public void testGetIdPart() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "123"); + + assertTrue(rp.isIdPartValidLong()); + assertEquals("123", rp.getIdPart()); + assertEquals(null, rp.getResourceType(ourCtx)); + } + + @Test + public void testGetIdPartWithType() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, ":Patient", "123"); + + assertEquals("123", rp.getIdPart()); + assertEquals("Patient", rp.getResourceType(ourCtx).getSimpleName()); + } + + @Test + public void testSetValueWithType() { + ReferenceParam rp = new ReferenceParam(); + rp.setValue("Patient/123"); + + assertEquals("123", rp.getIdPart()); + assertEquals("Patient", rp.getResourceType(ourCtx).getSimpleName()); + } + + @Test + public void testSetValueWithoutType() { + ReferenceParam rp = new ReferenceParam(); + rp.setValue("123"); + + assertEquals("123", rp.getIdPart()); + assertEquals(null, rp.getResourceType(ourCtx)); + } + + @Test + public void testGetIdPartAsLong() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "123"); + + assertEquals(123L, rp.getIdPartAsLong().longValue()); + } + + @Test + public void testToStringParam() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "123"); + + assertEquals("123", rp.toStringParam(ourCtx).getValue()); + } + + @Test + public void testToTokenParam() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "123"); + + assertEquals("123", rp.toTokenParam(ourCtx).getValue()); + } + + @Test + public void testToDateParam() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "2020-10-01"); + + assertEquals("2020-10-01", rp.toDateParam(ourCtx).getValueAsString()); + } + + @Test + public void testToNumberParam() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "1.23"); + + assertEquals("1.23", rp.toNumberParam(ourCtx).getValue().toPlainString()); + } + + @Test + public void testToQuantityParam() { + ReferenceParam rp = new ReferenceParam(); + rp.setValueAsQueryToken(ourCtx, null, null, "1.23|http://unitsofmeasure.org|cm"); + + assertEquals("1.23", rp.toQuantityParam(ourCtx).getValue().toPlainString()); + assertEquals("http://unitsofmeasure.org", rp.toQuantityParam(ourCtx).getSystem()); + assertEquals("cm", rp.toQuantityParam(ourCtx).getUnits()); + } + @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/server/SearchCountParamDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/server/SearchCountParamDstu3Test.java index b5351919be6..867fa36ed75 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/server/SearchCountParamDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/server/SearchCountParamDstu3Test.java @@ -1,14 +1,13 @@ package ca.uhn.fhir.rest.server; -import static org.hamcrest.Matchers.stringContainsInOrder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.rest.annotation.Count; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Search; import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.test.utilities.JettyUtil; +import ca.uhn.fhir.util.TestUtil; import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; @@ -26,19 +25,21 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.annotation.Count; -import ca.uhn.fhir.rest.annotation.OptionalParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class SearchCountParamDstu3Test { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchCountParamDstu3Test.class); private static CloseableHttpClient ourClient; private static FhirContext ourCtx = FhirContext.forDstu3(); - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchCountParamDstu3Test.class); private static int ourPort; private static Server ourServer; private static String ourLastMethod; @@ -53,28 +54,46 @@ public class SearchCountParamDstu3Test { @Test public void testSearch() throws Exception { HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?_count=2"); - CloseableHttpResponse status = ourClient.execute(httpGet); - try { + + try (CloseableHttpResponse status = ourClient.execute(httpGet)) { String responseContent = IOUtils.toString(status.getEntity().getContent()); ourLog.info(responseContent); assertEquals(200, status.getStatusLine().getStatusCode()); assertEquals("search", ourLastMethod); - assertEquals(new Integer(2), ourLastParam); - - //@formatter:off + assertEquals(Integer.valueOf(2), ourLastParam); + assertThat(responseContent, stringContainsInOrder( - "", - "", - "", - "", "", - "", - "", + "", + "", + "", + "", + "", + "", "")); - //@formatter:on - - } finally { - IOUtils.closeQuietly(status.getEntity().getContent()); + + } + + } + + + @Test + public void testSearchCount0() throws Exception { + HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?_count=0&_pretty=true"); + + try (CloseableHttpResponse status = ourClient.execute(httpGet)) { + String responseContent = IOUtils.toString(status.getEntity().getContent()); + ourLog.info(responseContent); + assertEquals(200, status.getStatusLine().getStatusCode()); + assertEquals("search", ourLastMethod); + assertEquals(Integer.valueOf(0), ourLastParam); + + assertThat(responseContent, stringContainsInOrder( + "", + "")); + assertThat(responseContent, not(containsString("entry"))); + } } @@ -92,25 +111,65 @@ public class SearchCountParamDstu3Test { assertEquals(200, status.getStatusLine().getStatusCode()); assertEquals("searchWithNoCountParam", ourLastMethod); assertEquals(null, ourLastParam); - + //@formatter:off assertThat(responseContent, stringContainsInOrder( - "", - "", - "", - "", "", - "", - "", + "", + "", + "", + "", + "", + "", "")); //@formatter:on - + } finally { IOUtils.closeQuietly(status.getEntity().getContent()); } } + public static class DummyPatientResourceProvider implements IResourceProvider { + + @Override + public Class getResourceType() { + return Patient.class; + } + + //@formatter:off + @SuppressWarnings("rawtypes") + @Search() + public List search( + @OptionalParam(name = Patient.SP_IDENTIFIER) TokenParam theIdentifier, + @Count() Integer theParam + ) { + ourLastMethod = "search"; + ourLastParam = theParam; + ArrayList retVal = new ArrayList(); + for (int i = 1; i < 100; i++) { + retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i)); + } + return retVal; + } + //@formatter:on + + //@formatter:off + @SuppressWarnings("rawtypes") + @Search(queryName = "searchWithNoCountParam") + public List searchWithNoCountParam() { + ourLastMethod = "searchWithNoCountParam"; + ourLastParam = null; + ArrayList retVal = new ArrayList(); + for (int i = 1; i < 100; i++) { + retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i)); + } + return retVal; + } + //@formatter:on + + } + @AfterClass public static void afterClassClearContext() throws Exception { JettyUtil.closeServer(ourServer); @@ -133,7 +192,7 @@ public class SearchCountParamDstu3Test { proxyHandler.addServletWithMapping(servletHolder, "/*"); ourServer.setHandler(proxyHandler); JettyUtil.startServer(ourServer); - ourPort = JettyUtil.getPortForStartedServer(ourServer); + ourPort = JettyUtil.getPortForStartedServer(ourServer); PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); HttpClientBuilder builder = HttpClientBuilder.create(); @@ -142,44 +201,4 @@ public class SearchCountParamDstu3Test { } - public static class DummyPatientResourceProvider implements IResourceProvider { - - @Override - public Class getResourceType() { - return Patient.class; - } - - //@formatter:off - @SuppressWarnings("rawtypes") - @Search() - public List search( - @OptionalParam(name=Patient.SP_IDENTIFIER) TokenParam theIdentifier, - @Count() Integer theParam - ) { - ourLastMethod = "search"; - ourLastParam = theParam; - ArrayList retVal = new ArrayList(); - for (int i = 1; i < 100; i++) { - retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i)); - } - return retVal; - } - //@formatter:on - - //@formatter:off - @SuppressWarnings("rawtypes") - @Search(queryName="searchWithNoCountParam") - public List searchWithNoCountParam() { - ourLastMethod = "searchWithNoCountParam"; - ourLastParam = null; - ArrayList retVal = new ArrayList(); - for (int i = 1; i < 100; i++) { - retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i)); - } - return retVal; - } - //@formatter:on - - } - } diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index f92fd6871e2..1b2953fcdb7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/dstu2/hapi/ctx/FhirDstu2Hl7Org.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/dstu2/hapi/ctx/FhirDstu2Hl7Org.java index 28c8e4a7fe4..6048745858f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/dstu2/hapi/ctx/FhirDstu2Hl7Org.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/dstu2/hapi/ctx/FhirDstu2Hl7Org.java @@ -29,7 +29,6 @@ import org.hl7.fhir.dstu2.model.*; import org.hl7.fhir.instance.model.api.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.base.composite.BaseCodingDt; @@ -46,11 +45,6 @@ public class FhirDstu2Hl7Org implements IFhirVersion { throw new UnsupportedOperationException("FluentPath is not supported in DSTU2 contexts"); } - @Override - public IContextValidationSupport createValidationSupport() { - throw new UnsupportedOperationException("Validation support is not supported in DSTU2 contexts"); - } - @Override public StructureDefinition generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserHl7OrgDstu2Test.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserHl7OrgDstu2Test.java index e26ffe9f5cc..08615623b2a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserHl7OrgDstu2Test.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserHl7OrgDstu2Test.java @@ -1097,12 +1097,6 @@ public class JsonParserHl7OrgDstu2Test { assertEquals("idsystem", p.getIdentifier().get(0).getSystem()); } - @Test - public void testParseSingleQuotes() { - ourCtx.newJsonParser().parseResource(Bundle.class, "{ \"resourceType\": \"Bundle\" }"); - ourCtx.newJsonParser().parseResource(Bundle.class, "{ 'resourceType': 'Bundle' }"); - } - /** * HAPI FHIR < 0.6 incorrectly used "resource" instead of "reference" */ diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index e4e51da7cfa..4f16839bcf0 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -175,6 +175,11 @@ ${project.version} test + + org.awaitility + awaitility + test + @@ -215,9 +220,8 @@ - org.apache.jena - apache-jena-libs - pom + com.google.code.gson + gson test diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/DefaultProfileValidationSupport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/DefaultProfileValidationSupport.java deleted file mode 100644 index 3558221c4e3..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/DefaultProfileValidationSupport.java +++ /dev/null @@ -1,367 +0,0 @@ -package org.hl7.fhir.r4.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r4.model.DomainResource; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.UriType; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; -import org.hl7.fhir.r4.terminologies.ValueSetExpanderSimple; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class DefaultProfileValidationSupport implements IValidationSupport { - - private static final String URL_PREFIX_VALUE_SET = "http://hl7.org/fhir/ValueSet/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION = "http://hl7.org/fhir/StructureDefinition/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION_BASE = "http://hl7.org/fhir/"; - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class); - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - - private void addConcepts(ConceptSetComponent theInclude, ValueSetExpansionComponent theRetVal, Set theWantCodes, List theConcepts) { - for (ConceptDefinitionComponent next : theConcepts) { - if (theWantCodes.isEmpty() || theWantCodes.contains(next.getCode())) { - theRetVal - .addContains() - .setSystem(theInclude.getSystem()) - .setCode(next.getCode()) - .setDisplay(next.getDisplay()); - } - addConcepts(theInclude, theRetVal, theWantCodes, next.getConcept()); - } - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSetExpander.ValueSetExpansionOutcome retVal = new ValueSetExpander.ValueSetExpansionOutcome(new ValueSet()); - - Set wantCodes = new HashSet<>(); - for (ConceptReferenceComponent next : theInclude.getConcept()) { - wantCodes.add(next.getCode()); - } - - CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem()); - if (system != null) { - List concepts = system.getConcept(); - addConcepts(theInclude, retVal.getValueset().getExpansion(), wantCodes, concepts); - } - - for (UriType next : theInclude.getValueSet()) { - ValueSet vs = myValueSets.get(defaultString(next.getValueAsString())); - if (vs != null) { - for (ConceptSetComponent nextInclude : vs.getCompose().getInclude()) { - ValueSetExpander.ValueSetExpansionOutcome contents = expandValueSet(theContext, nextInclude); - retVal.getValueset().getExpansion().getContains().addAll(contents.getValueset().getExpansion().getContains()); - } - } - } - - return retVal; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList<>(provideStructureDefinitionMap(theContext).values()); - } - - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true); - } - - private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) { - synchronized (this) { - Map codeSystems = myCodeSystems; - Map valueSets = myValueSets; - if (codeSystems == null || valueSets == null) { - codeSystems = new HashMap<>(); - valueSets = new HashMap<>(); - - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r4/model/valueset/valuesets.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r4/model/valueset/v2-tables.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml"); - - myCodeSystems = codeSystems; - myValueSets = valueSets; - } - - // System can take the form "http://url|version" - String system = theSystem; - if (system.contains("|")) { - String version = system.substring(system.indexOf('|') + 1); - if (version.matches("^[0-9.]+$")) { - system = system.substring(0, system.indexOf('|')); - } - } - - if (codeSystem) { - return codeSystems.get(system); - } else { - return valueSets.get(system); - } - } - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - Validate.notBlank(theUri, "theUri must not be null or blank"); - - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - - if (theClass.equals(ValueSet.class) || theUri.startsWith(URL_PREFIX_VALUE_SET)) { - return (T) fetchValueSet(theContext, theUri); - } - - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) { - String url = theUrl; - if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) { - // no change - } else if (url.indexOf('/') == -1) { - url = URL_PREFIX_STRUCTURE_DEFINITION + url; - } else if (StringUtils.countMatches(url, '/') == 1) { - url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url; - } - return provideStructureDefinitionMap(theContext).get(url); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return (ValueSet) fetchCodeSystemOrValueSet(theContext, uri, false); - } - - public void flush() { - myCodeSystems = null; - myStructureDefinitions = null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - if (isBlank(theSystem) || Constants.codeSystemNotNeeded(theSystem)) { - return false; - } - CodeSystem cs = fetchCodeSystem(theContext, theSystem); - return cs != null && cs.getContent() != CodeSystemContentMode.NOTPRESENT; - } - - @Override - public boolean isValueSetSupported(FhirContext theContext, String theValueSetUrl) { - return isNotBlank(theValueSetUrl) && fetchValueSet(theContext, theValueSetUrl) != null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - private void loadCodeSystems(FhirContext theContext, Map theCodeSystems, Map theValueSets, String theClasspath) { - ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath); - InputStream inputStream = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - InputStreamReader reader = null; - if (inputStream != null) { - try { - reader = new InputStreamReader(inputStream, Constants.CHARSET_UTF8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof CodeSystem) { - CodeSystem nextValueSet = (CodeSystem) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextValueSet); - } - } else if (next.getResource() instanceof ValueSet) { - ValueSet nextValueSet = (ValueSet) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theValueSets.put(system, nextValueSet); - } - } - } - } finally { - try { - if (reader != null) { - reader.close(); - } - inputStream.close(); - } catch (IOException e) { - ourLog.warn("Failure closing stream", e); - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private void loadStructureDefinitions(FhirContext theContext, Map theCodeSystems, String theClasspath) { - ourLog.info("Loading structure definitions from classpath: {}", theClasspath); - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - if (valuesetText != null) { - InputStreamReader reader = new InputStreamReader(valuesetText, Constants.CHARSET_UTF8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof StructureDefinition) { - StructureDefinition nextSd = (StructureDefinition) next.getResource(); - nextSd.getText().setDivAsString(""); - String system = nextSd.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextSd); - } - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private Map provideStructureDefinitionMap(FhirContext theContext) { - Map structureDefinitions = myStructureDefinitions; - if (structureDefinitions == null) { - structureDefinitions = new HashMap<>(); - - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r4/model/profile/profiles-resources.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r4/model/profile/profiles-types.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r4/model/profile/profiles-others.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r4/model/extension/extension-definitions.xml"); - - myStructureDefinitions = structureDefinitions; - } - return structureDefinitions; - } - - private CodeValidationResult testIfConceptIsInList(CodeSystem theCodeSystem, String theCode, List conceptList, boolean theCaseSensitive) { - String code = theCode; - if (theCaseSensitive == false) { - code = code.toUpperCase(); - } - - return testIfConceptIsInListInner(theCodeSystem, conceptList, theCaseSensitive, code); - } - - private CodeValidationResult testIfConceptIsInListInner(CodeSystem theCodeSystem, List conceptList, boolean theCaseSensitive, String code) { - CodeValidationResult retVal = null; - for (ConceptDefinitionComponent next : conceptList) { - String nextCandidate = next.getCode(); - if (theCaseSensitive == false) { - nextCandidate = nextCandidate.toUpperCase(); - } - if (nextCandidate.equals(code)) { - retVal = new CodeValidationResult(null, null, next, next.getDisplay()); - break; - } - - // recurse - retVal = testIfConceptIsInList(theCodeSystem, code, next.getConcept(), theCaseSensitive); - if (retVal != null) { - break; - } - } - - if (retVal != null) { - retVal.setCodeSystemName(theCodeSystem.getName()); - retVal.setCodeSystemVersion(theCodeSystem.getVersion()); - } - - return retVal; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - if (isNotBlank(theValueSetUrl)) { - ValueSetExpander expander = new ValueSetExpanderSimple(new HapiWorkerContext(theContext, this)); - try { - ValueSet valueSet = fetchValueSet(theContext, theValueSetUrl); - if (valueSet != null) { - ValueSetExpander.ValueSetExpansionOutcome expanded = expander.expand(valueSet, null); - ValueSetExpansionComponent expansion = expanded.getValueset().getExpansion(); - for (ValueSet.ValueSetExpansionContainsComponent nextExpansionCode : expansion.getContains()) { - - if (theCode.equals(nextExpansionCode.getCode())) { - if (Constants.codeSystemNotNeeded(theCodeSystem) || nextExpansionCode.getSystem().equals(theCodeSystem)) { - return new CodeValidationResult(new CodeSystem.ConceptDefinitionComponent(new CodeType(theCode))); - } - } - } - - } - } catch (Exception e) { - return new CodeValidationResult(IssueSeverity.WARNING, e.getMessage()); - } - - return null; - } - - if (theCodeSystem != null) { - CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); - if (cs != null) { - boolean caseSensitive = true; - if (cs.hasCaseSensitive()) { - caseSensitive = cs.getCaseSensitive(); - } - - CodeValidationResult retVal = testIfConceptIsInList(cs, theCode, cs.getConcept(), caseSensitive); - - if (retVal != null) { - return retVal; - } - } - } - - return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return validateCode(theContext, theSystem, theCode, null, (String) null).asLookupCodeResult(theSystem, theCode); - } - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/FhirR4.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/FhirR4.java index 641bf794cd7..cb1eeeb2358 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/FhirR4.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/FhirR4.java @@ -31,7 +31,6 @@ import org.hl7.fhir.r4.hapi.rest.server.R4BundleFactory; import org.hl7.fhir.r4.model.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.primitive.IdDt; @@ -47,11 +46,6 @@ public class FhirR4 implements IFhirVersion { return new FluentPathR4(theFhirContext); } - @Override - public IContextValidationSupport createValidationSupport() { - return ReflectionUtil.newInstanceOfFhirProfileValidationSupport("org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport"); - } - @Override public IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/HapiWorkerContext.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/HapiWorkerContext.java index 46d0a2fbd2f..21e25668efb 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/HapiWorkerContext.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/HapiWorkerContext.java @@ -1,10 +1,9 @@ package org.hl7.fhir.r4.hapi.ctx; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.CoverageIgnore; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; @@ -21,19 +20,24 @@ import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent; import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.r4.terminologies.ValueSetExpander; -import org.hl7.fhir.r4.terminologies.ValueSetExpanderFactory; -import org.hl7.fhir.r4.terminologies.ValueSetExpanderSimple; import org.hl7.fhir.r4.utils.IResourceValidator; -import org.hl7.fhir.utilities.TerminologyServiceOptions; import org.hl7.fhir.utilities.TranslationServices; +import org.hl7.fhir.utilities.i18n.I18nBase; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationOptions; -import java.util.*; +import java.util.ArrayList; +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; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory { +public final class HapiWorkerContext extends I18nBase implements IWorkerContext { private final FhirContext myCtx; private final Cache myFetchedResourceCache; private IValidationSupport myValidationSupport; @@ -52,11 +56,14 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } myFetchedResourceCache = Caffeine.newBuilder().expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS).build(); + + // Set a default locale + setValidationMessageLanguage(getLocale()); } @Override public List allStructures() { - return myValidationSupport.fetchAllStructureDefinitions(myCtx); + return myValidationSupport.fetchAllStructureDefinitions(); } @Override @@ -69,7 +76,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return null; } else { - return myValidationSupport.fetchCodeSystem(myCtx, theSystem); + return (CodeSystem) myValidationSupport.fetchCodeSystem(theSystem); } } @@ -83,13 +90,6 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander throw new UnsupportedOperationException(); } - @Override - public ValueSetExpander getExpander() { - ValueSetExpanderSimple retVal = new ValueSetExpanderSimple(this); - retVal.setMaxExpansionSize(Integer.MAX_VALUE); - return retVal; - } - @Override public org.hl7.fhir.r4.utils.INarrativeGenerator getNarrativeGenerator(String thePrefix, String theBasePath) { throw new UnsupportedOperationException(); @@ -140,7 +140,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return false; } else { - return myValidationSupport.isCodeSystemSupported(myCtx, theSystem); + return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem); } } @@ -152,7 +152,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, CodeableConcept theCode, ValueSet theVs) { + public ValidationResult validateCode(ValidationOptions theOptions, CodeableConcept theCode, ValueSet theVs) { for (Coding next : theCode.getCoding()) { ValidationResult retVal = validateCode(theOptions, next, theVs); if (retVal.isOk()) { @@ -164,7 +164,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, Coding theCode, ValueSet theVs) { + public ValidationResult validateCode(ValidationOptions theOptions, Coding theCode, ValueSet theVs) { String system = theCode.getSystem(); String code = theCode.getCode(); String display = theCode.getDisplay(); @@ -172,48 +172,35 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay) { - IContextValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, (String)null); + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) { + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null); if (result == null) { return null; } - return new ValidationResult((IssueSeverity)result.getSeverity(), result.getMessage(), (ConceptDefinitionComponent)result.asConceptDefinition()); + + IssueSeverity severity = null; + if (result.getSeverity() != null) { + severity = IssueSeverity.fromCode(result.getSeverityCode()); + } + + ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode()); + return new ValidationResult(severity, result.getMessage(), definition); } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay, ConceptSetComponent theVsi) { + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay, ConceptSetComponent theVsi) { throw new UnsupportedOperationException(); } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay, ValueSet theVs) { - - /* - * The following valueset is a special case, since the BCP codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/languages".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } - - /* - * The following valueset is a special case, since the mime types codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/mimetypes".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay, ValueSet theVs) { IValidationSupport.CodeValidationResult outcome; if (isNotBlank(theVs.getUrl())) { - outcome = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, theVs.getUrl()); + outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl()); } else { - outcome = myValidationSupport.validateCodeInValueSet(myCtx, theSystem, theCode, theDisplay, theVs); + outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs); } if (outcome != null && outcome.isOk()) { @@ -227,8 +214,9 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, ValueSet vs) { - return validateCode(theOptions, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, vs); + public ValidationResult validateCode(ValidationOptions theOptions, String code, ValueSet vs) { + ValidationOptions options = theOptions.guessSystem(); + return validateCode(options, null, code, null, vs); } @Override @@ -259,30 +247,16 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValueSetExpansionOutcome expand(ValueSet theSource, Parameters theProfile) { - ValueSetExpansionOutcome vso; - try { - vso = getExpander().expand(theSource, theProfile); - } catch (InvalidRequestException e) { - throw e; - } catch (Exception e) { - throw new InternalErrorException(e); - } - if (vso.getError() != null) { - throw new InvalidRequestException(vso.getError()); - } else { - return vso; - } - } - - @Override - public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHeiarchical) { + public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical) { throw new UnsupportedOperationException(); } @Override - public ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHeiarchical) throws TerminologyServiceException { - return myValidationSupport.expandValueSet(myCtx, theInc); + 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); + return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null); } @Override @@ -361,9 +335,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander return null; } else { @SuppressWarnings("unchecked") - T retVal = (T) myFetchedResourceCache.get(theUri, t -> { - return myValidationSupport.fetchResource(myCtx, theClass, theUri); - }); + T retVal = (T) myFetchedResourceCache.get(theUri, t -> myValidationSupport.fetchResource(theClass, theUri)); return retVal; } } @@ -398,8 +370,16 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValueSetExpansionOutcome expandVS(ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHeiarchical) throws FHIRException { + public ValueSetExpander.ValueSetExpansionOutcome expandVS(ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException { throw new UnsupportedOperationException(); } + public static ConceptValidationOptions convertConceptValidationOptions(ValidationOptions theOptions) { + ConceptValidationOptions retVal = new ConceptValidationOptions(); + if (theOptions.isGuessSystem()) { + retVal = retVal.setInferSystem(true); + } + return retVal; + } + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/IValidationSupport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/IValidationSupport.java deleted file mode 100644 index cc8f317b0bd..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/ctx/IValidationSupport.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.hl7.fhir.r4.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r4.model.StructureDefinition; -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.utilities.validation.ValidationMessage.IssueSeverity; - -import java.util.List; - -public interface IValidationSupport - extends ca.uhn.fhir.context.support.IContextValidationSupport { - - /** - * Expands the given portion of a ValueSet - * - * @param theInclude The portion to include - * @return The expansion - */ - @Override - ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude); - - /** - * Load and return all possible structure definitions - */ - @Override - List fetchAllStructureDefinitions(FhirContext theContext); - - /** - * Fetch a code system by Uri - * - * @param uri Canonical Uri of the code system - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - CodeSystem fetchCodeSystem(FhirContext theContext, String uri); - - /** - * Fetch a valueset by Uri - * - * @param uri Canonical Uri of the ValueSet - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - ValueSet fetchValueSet(FhirContext theContext, String uri); - - /** - * Loads a resource needed by the validation (a StructureDefinition, or a - * ValueSet) - * - * @param theContext The HAPI FHIR Context object current in use by the validator - * @param theClass The type of the resource to load - * @param theUri The resource URI - * @return Returns the resource, or null if no resource with the - * given URI can be found - */ - @Override - T fetchResource(FhirContext theContext, Class theClass, String theUri); - - @Override - StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl); - - /** - * Returns true if codes in the given code system can be expanded - * or validated - * - * @param theSystem The URI for the code system, e.g. "http://loinc.org" - * @return Returns true if codes in the given code system can be - * validated - */ - @Override - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); - - /** - * Returns true if the given valueset can be validated by the given - * validation support module - * - * @param theContext The FHIR context - * @param theValueSetUrl The URL - */ - default boolean isValueSetSupported(FhirContext theContext, String theValueSetUrl) { - return false; - } - - /** - * Generate a snapshot from the given differential profile. - * - * @return Returns null if this module does not know how to handle this request - */ - StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/fluentpath/FluentPathR4.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/fluentpath/FluentPathR4.java index f85d63a6472..5a34d3d8ff3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/fluentpath/FluentPathR4.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/fluentpath/FluentPathR4.java @@ -1,12 +1,12 @@ package org.hl7.fhir.r4.hapi.fluentpath; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.fluentpath.FluentPathExecutionException; import ca.uhn.fhir.fluentpath.IFluentPath; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; import org.hl7.fhir.r4.model.Base; import org.hl7.fhir.r4.utils.FHIRPathEngine; @@ -18,10 +18,7 @@ public class FluentPathR4 implements IFluentPath { private FHIRPathEngine myEngine; public FluentPathR4(FhirContext theCtx) { - if (!(theCtx.getValidationSupport() instanceof IValidationSupport)) { - throw new IllegalStateException("Validation support module configured on context appears to be for the wrong FHIR version- Does not extend " + IValidationSupport.class.getName()); - } - IValidationSupport validationSupport = (IValidationSupport) theCtx.getValidationSupport(); + IValidationSupport validationSupport = theCtx.getValidationSupport(); myEngine = new FHIRPathEngine(new HapiWorkerContext(theCtx, validationSupport)); } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/context/BaseRuntimeElementDefinitionTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/context/BaseRuntimeElementDefinitionTest.java new file mode 100644 index 00000000000..965a327ef3a --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/context/BaseRuntimeElementDefinitionTest.java @@ -0,0 +1,23 @@ +package ca.uhn.fhir.context; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class BaseRuntimeElementDefinitionTest { + + @Test + public void testNewInstance_InvalidArgumentType() { + FhirContext ctx = FhirContext.forR4(); + + BaseRuntimeElementDefinition def = ctx.getElementDefinition("string"); + + try { + def.newInstance(123); + fail(); + } catch (ConfigurationException e) { + assertEquals("Failed to instantiate type:org.hl7.fhir.r4.model.StringType", e.getMessage()); + } + } + +} diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/JsonParserR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/JsonParserR4Test.java index cc5dfa8e9d7..e7783c95f7d 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/JsonParserR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/JsonParserR4Test.java @@ -10,6 +10,7 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.NullWriter; import org.apache.commons.lang.StringUtils; import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.junit.AfterClass; import org.junit.Ignore; import org.junit.Test; @@ -52,6 +53,38 @@ public class JsonParserR4Test extends BaseTest { ourLog.info(narrative); } + @Test + public void testNamespacePrefixTrimmedFromNarrative() { + String input = "" + + "" + + "" + + "" + + "@fhirabend" + + "" + + "" + + ""; + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, input); + + String expected = "
    @fhirabend
    "; + assertEquals(expected, parsed.getText().getDiv().getValueAsString()); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(parsed); + ourLog.info(encoded); + assertThat(encoded, containsString("\"div\":\"" + expected.replace("\"", "\\\"") + "\"")); + } + + @Test + public void testNamespacePrefixStrippedOnJsonParse() { + String input = "{\"resourceType\":\"Patient\",\"text\":{\"div\":\"@fhirabend\"}}"; + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, input); + XhtmlNode div = parsed.getText().getDiv(); + + assertEquals("
    @fhirabend
    ", div.getValueAsString()); + + String encoded = ourCtx.newXmlParser().encodeResourceToString(parsed); + assertEquals("
    @fhirabend
    ", encoded); + } + @Test public void testEncodeExtensionOnBinaryData() { @@ -79,6 +112,19 @@ public class JsonParserR4Test extends BaseTest { assertThat(output, containsString("\"Questionnaire/123/_history/456\"")); } + @Test + public void testPrettyPrint() { + ourCtx.getParserOptions().setDontStripVersionsFromReferencesAtPaths("QuestionnaireResponse.questionnaire"); + + QuestionnaireResponse qr = new QuestionnaireResponse(); + qr.getQuestionnaireElement().setValueAsString("Questionnaire/123/_history/456"); + + String output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(qr); + ourLog.info(output); + + assertThat(output, containsString("\n \"resourceType\"")); + } + /** * See #814 */ @@ -202,6 +248,12 @@ public class JsonParserR4Test extends BaseTest { } + @Test + public void testParseSingleQuotes() { + Bundle bundle = ourCtx.newJsonParser().parseResource(Bundle.class, "{ 'resourceType': 'Bundle', 'id': '123' }"); + assertEquals("123", bundle.getIdElement().getIdPart()); + } + @Test public void testEncodeBinary() { @@ -214,6 +266,18 @@ public class JsonParserR4Test extends BaseTest { assertEquals("{\"resourceType\":\"Binary\",\"contentType\":\"application/octet-stream\",\"data\":\"AAECAwQ=\"}", output); } + + @Test + public void testAlwaysUseUnixNewlines() { + Patient p = new Patient(); + p.setId("1"); + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); + assertEquals("{\n" + + " \"resourceType\": \"Patient\",\n" + + " \"id\": \"1\"\n" + + "}", encoded); + } + @Test public void testEncodeWithInvalidExtensionMissingUrl() { @@ -533,11 +597,21 @@ public class JsonParserR4Test extends BaseTest { * 18:25:00.463 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:483] - Encoded 500 passes - 44ms / pass - 22.6 / second * * 2019-09-19 - Post #1489 - * 20:43:21.434 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:470] - Encoded 2300 passes - 29ms / pass - 33.5 / second - * 20:43:24.228 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:470] - Encoded 2400 passes - 29ms / pass - 33.6 / second - * 20:43:27.029 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:470] - Encoded 2500 passes - 29ms / pass - 33.7 / second - * 20:43:29.825 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:470] - Encoded 2600 passes - 29ms / pass - 33.8 / second - * 20:43:32.779 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:470] - Encoded 2700 passes - 29ms / pass - 33.8 / second + * 15:20:30.134 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 800 passes - 28ms / pass - 34.5 / second + * 15:20:32.986 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 900 passes - 28ms / pass - 34.6 / second + * 15:20:35.865 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 1000 passes - 28ms / pass - 34.6 / second + * 15:20:38.797 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 1100 passes - 28ms / pass - 34.6 / second + * 15:20:41.708 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 1200 passes - 28ms / pass - 34.5 / second + * 15:20:44.722 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 1300 passes - 29ms / pass - 34.4 / second + * 15:20:47.716 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:574] - Encoded 1400 passes - 29ms / pass - 34.4 / second + * + * 2020-02-27 - Post #1673 + * 21:27:25.817 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1100 passes - 28ms / pass - 35.5 / second + * 21:27:28.598 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1200 passes - 28ms / pass - 35.5 / second + * 21:27:31.436 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1300 passes - 28ms / pass - 35.5 / second + * 21:27:34.246 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1400 passes - 28ms / pass - 35.5 / second + * 21:27:37.013 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1500 passes - 28ms / pass - 35.6 / second + * 21:27:39.874 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:609] - Encoded 1600 passes - 28ms / pass - 35.5 / second */ @Test @Ignore @@ -546,6 +620,14 @@ public class JsonParserR4Test extends BaseTest { Bundle b = createBigBundle(); IParser parser = ourCtx.newJsonParser(); + + for (int i = 0; i < 500; i++) { + parser.encodeResourceToWriter(b, new NullWriter()); + if (i % 100 == 0) { + ourLog.info("Warm-up Encoded {} passes", i); + } + } + StopWatch sw = new StopWatch(); for (int i = 0; ; i++) { parser.encodeResourceToWriter(b, new NullWriter()); @@ -588,18 +670,40 @@ public class JsonParserR4Test extends BaseTest { /** * 2019-09-19 - * 18:31:01.513 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:486] - Parsed 600 passes - 37ms / pass - 27.0 / second - * 18:31:04.454 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:486] - Parsed 700 passes - 35ms / pass - 27.8 / second - * 18:31:07.451 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:486] - Parsed 800 passes - 35ms / pass - 28.4 / second - * 18:31:10.457 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:486] - Parsed 900 passes - 34ms / pass - 28.9 / second + * 15:22:30.758 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 1700 passes - 12ms / pass - 79.3 / second + * 15:22:31.968 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 1800 passes - 12ms / pass - 79.5 / second + * 15:22:33.223 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 1900 passes - 12ms / pass - 79.5 / second + * 15:22:34.459 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2000 passes - 12ms / pass - 79.6 / second + * 15:22:35.696 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2100 passes - 12ms / pass - 79.7 / second + * 15:22:36.983 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2200 passes - 12ms / pass - 79.6 / second + * 15:22:38.203 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2300 passes - 12ms / pass - 79.7 / second + * 15:22:39.456 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2400 passes - 12ms / pass - 79.7 / second + * 15:22:40.699 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2500 passes - 12ms / pass - 79.7 / second + * 15:22:42.135 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:638] - Parsed 2600 passes - 12ms / pass - 79.3 / second + * + * 2020-02-27 - Post #1673 + * 21:29:38.157 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:687] - Parsed 2200 passes - 11ms / pass - 83.4 / second + * 21:29:39.374 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:687] - Parsed 2300 passes - 12ms / pass - 83.3 / second + * 21:29:40.576 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:687] - Parsed 2400 passes - 12ms / pass - 83.3 / second + * 21:29:41.778 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:687] - Parsed 2500 passes - 12ms / pass - 83.3 / second + * 21:29:42.999 [main] INFO ca.uhn.fhir.parser.JsonParserR4Test [JsonParserR4Test.java:687] - Parsed 2600 passes - 12ms / pass - 83.3 / second + * */ @Test @Ignore - public void testTimingsInput() throws IOException { + public void testTimingsInput() { Bundle b = createBigBundle(); IParser parser = ourCtx.newJsonParser(); String input = parser.encodeResourceToString(b); + for (int i = 0; i < 500; i++) { + parser.parseResource(input); + if (i % 100 == 0) { + ourLog.info("Warm up parsed {} passes", i); + } + } + + StopWatch sw = new StopWatch(); for (int i = 0; ; i++) { parser.parseResource(input); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/XmlParserR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/XmlParserR4Test.java index 8ddb449ca18..c16ac5c8950 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/XmlParserR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/XmlParserR4Test.java @@ -1,21 +1,26 @@ package ca.uhn.fhir.parser; +import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.stringContainsInOrder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThat; +import ca.uhn.fhir.test.BaseTest; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Composition; import org.hl7.fhir.r4.model.MessageHeader; import org.hl7.fhir.r4.model.Narrative; +import org.hl7.fhir.r4.model.Observation; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ca.uhn.fhir.context.FhirContext; -public class XmlParserR4Test { +import java.io.IOException; + +public class XmlParserR4Test extends BaseTest { private static final Logger ourLog = LoggerFactory.getLogger(XmlParserR4Test.class); private static FhirContext ourCtx = FhirContext.forR4(); @@ -74,5 +79,17 @@ public class XmlParserR4Test { } + /** + * See #1658 + */ + @Test + public void testNarrativeLangAttributePreserved() throws IOException { + Observation obs = loadResource(ourCtx, Observation.class, "/resource-with-lang-in-narrative.xml"); + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(obs); + assertThat(encoded, containsString("xmlns=\"http://www.w3.org/1999/xhtml\"")); + assertThat(encoded, containsString("lang=\"en-US\"")); + ourLog.info(encoded); + } + } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserTest.java index 72841e5450a..dcb523ac20e 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/jsonlike/JsonLikeParserTest.java @@ -1,5 +1,26 @@ package ca.uhn.fhir.parser.jsonlike; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.parser.IJsonLikeParser; +import ca.uhn.fhir.parser.json.JsonLikeArray; +import ca.uhn.fhir.parser.json.JsonLikeObject; +import ca.uhn.fhir.parser.json.JsonLikeStructure; +import ca.uhn.fhir.parser.json.JsonLikeValue; +import ca.uhn.fhir.parser.json.JsonLikeWriter; +import ca.uhn.fhir.parser.json.jackson.JacksonStructure; +import ca.uhn.fhir.parser.view.ExtPatient; +import ca.uhn.fhir.util.TestUtil; +import org.apache.commons.io.IOUtils; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Extension; +import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Reference; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Test; + import java.io.IOException; import java.io.Reader; import java.io.StringReader; @@ -14,31 +35,6 @@ import java.util.Map; import java.util.Set; import java.util.Stack; -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.IntegerType; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.Extension; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Test; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.parser.IJsonLikeParser; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.parser.json.GsonStructure; -import ca.uhn.fhir.parser.json.JsonLikeArray; -import ca.uhn.fhir.parser.json.JsonLikeObject; -import ca.uhn.fhir.parser.json.JsonLikeStructure; -import ca.uhn.fhir.parser.json.JsonLikeValue; -import ca.uhn.fhir.parser.json.JsonLikeWriter; -import ca.uhn.fhir.parser.json.JsonLikeValue.ScalarType; -import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; -import ca.uhn.fhir.parser.view.ExtPatient; -import ca.uhn.fhir.util.TestUtil; - public class JsonLikeParserTest { private static FhirContext ourCtx = FhirContext.forR4(); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JsonLikeParserTest.class); @@ -55,7 +51,7 @@ public class JsonLikeParserTest { String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); ourLog.info(encoded); - JsonLikeStructure jsonLikeStructure = new GsonStructure(); + JsonLikeStructure jsonLikeStructure = new JacksonStructure(); jsonLikeStructure.load(new StringReader(encoded)); IJsonLikeParser jsonLikeparser = (IJsonLikeParser)ourCtx.newJsonParser(); @@ -258,17 +254,6 @@ public class JsonLikeParserTest { return this; } - @Override - public JsonLikeWriter beginArray() throws IOException { - if (currentBlock.getType() == BlockType.NONE) { - throw new IOException("JsonLikeStreamWriter.beginArray() called but only beginObject() is allowed here."); - } - blockStack.push(currentBlock); - currentBlock = new Block(BlockType.ARRAY); - currentBlock.setArray(new ArrayList()); - return this; - } - @Override public JsonLikeWriter beginObject(String name) throws IOException { if (currentBlock.getType() == BlockType.ARRAY) { @@ -429,15 +414,6 @@ public class JsonLikeParserTest { return this; } - @Override - public JsonLikeWriter writeNull(String name) throws IOException { - if (currentBlock.getType() == BlockType.ARRAY) { - throw new IOException("Named JSON elements can only be created in JSON objects"); - } - currentBlock.getObject().put(name, null); - return this; - } - @Override public JsonLikeWriter endObject() throws IOException { if (currentBlock.getType() == BlockType.NONE) { @@ -452,7 +428,7 @@ public class JsonLikeParserTest { } @Override - public JsonLikeWriter endArray() throws IOException { + public JsonLikeWriter endArray() { if (currentBlock.getType() == BlockType.NONE) { ourLog.error("JsonLikeStreamWriter.endArray(); called with no active JSON document"); } else { @@ -465,11 +441,11 @@ public class JsonLikeParserTest { } @Override - public JsonLikeWriter endBlock() throws IOException { + public JsonLikeWriter endBlock() { if (currentBlock.getType() == BlockType.NONE) { ourLog.error("JsonLikeStreamWriter.endBlock(); called with no active JSON document"); } else { - Object toPut = null; + Object toPut; if (currentBlock.getType() == BlockType.ARRAY) { toPut = currentBlock.getArray(); } else { @@ -544,14 +520,9 @@ public class JsonLikeParserTest { return jsonLikeObject; } - @Override - public JsonLikeArray getRootArray() throws DataFormatException { - throw new DataFormatException("JSON document must be an object not an array for native Java Map structures"); - } - private class JsonMapObject extends JsonLikeObject { private Map nativeObject; - private Map jsonLikeMap = new LinkedHashMap(); + private Map jsonLikeMap = new LinkedHashMap<>(); public JsonMapObject (Map json) { this.nativeObject = json; @@ -585,7 +556,7 @@ public class JsonLikeParserTest { private class JsonMapArray extends JsonLikeArray { private List nativeArray; - private Map jsonLikeMap = new LinkedHashMap(); + private Map jsonLikeMap = new LinkedHashMap<>(); public JsonMapArray (List json) { this.nativeArray = json; @@ -603,7 +574,7 @@ public class JsonLikeParserTest { @Override public JsonLikeValue get(int index) { - Integer key = Integer.valueOf(index); + Integer key = index; JsonLikeValue result = null; if (jsonLikeMap.containsKey(key)) { result = jsonLikeMap.get(key); @@ -694,7 +665,7 @@ public class JsonLikeParserTest { @Override public boolean getAsBoolean() { if (nativeValue != null && isBoolean()) { - return ((Boolean)nativeValue).booleanValue(); + return (Boolean) nativeValue; } return super.getAsBoolean(); } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ClientR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ClientR4Test.java index 6336aeca665..70c27a03c0d 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ClientR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ClientR4Test.java @@ -4,11 +4,14 @@ import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.rest.annotation.At; +import ca.uhn.fhir.rest.annotation.Create; import ca.uhn.fhir.rest.annotation.Elements; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.IncludeParam; import ca.uhn.fhir.rest.annotation.OptionalParam; import ca.uhn.fhir.rest.annotation.RequiredParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; import ca.uhn.fhir.rest.annotation.Search; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.EncodingEnum; @@ -18,6 +21,7 @@ import ca.uhn.fhir.rest.client.apache.ApacheHttpRequest; import ca.uhn.fhir.rest.client.apache.ResourceEntity; import ca.uhn.fhir.rest.client.api.IBasicClient; import ca.uhn.fhir.rest.client.api.IGenericClient; +import ca.uhn.fhir.rest.client.api.IRestfulClient; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException; import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor; @@ -36,6 +40,7 @@ import org.apache.http.HttpResponse; import org.apache.http.ProtocolVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpUriRequest; @@ -228,6 +233,80 @@ public class ClientR4Test { assertEquals("200", response.getId().getVersionIdPart()); } + interface MyClient extends IRestfulClient { + + @Search() + List search(@IncludeParam String theInclude); + + + } + + + @Test + public void testStringIncludeTest() throws Exception { + + Bundle bundle = new Bundle(); + bundle.setType(Bundle.BundleType.SEARCHSET); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 201, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(ourCtx.newXmlParser().encodeResourceToString(bundle)), StandardCharsets.UTF_8)); + when(myHttpResponse.getAllHeaders()).thenReturn(new Header[0]); + + MyClient client = ourCtx.newRestfulClient(MyClient.class, "http://foo"); + List response = client.search("Patient:organization"); + + assertEquals(HttpGet.class, capt.getValue().getClass()); + HttpGet post = (HttpGet) capt.getValue(); + assertEquals("http://foo/Patient?_include=Patient%3Aorganization", post.getURI().toString()); + } + + @Test + public void testCreateWithInvalidType() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:foo").setValue("123"); + String serialized = ourCtx.newXmlParser().encodeResourceToString(patient); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 201, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(serialized), StandardCharsets.UTF_8)); + when(myHttpResponse.getAllHeaders()).thenReturn(toHeaderArray("Location", "http://example.com/fhir/Patient/100/_history/200")); + + try { + ourCtx.newRestfulClient(ITestClientWithCreateWithInvalidParameterType.class, "http://foo"); + fail(); + } catch (ConfigurationException e) { + assertEquals("Method 'createPatient' is annotated with @ResourceParam but has a type that is not an implementation of org.hl7.fhir.instance.model.api.IBaseResource", e.getMessage()); + } + } + + @Test + public void testCreateWithValidAndInvalidType() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:foo").setValue("123"); + String serialized = ourCtx.newXmlParser().encodeResourceToString(patient); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 201, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(serialized), StandardCharsets.UTF_8)); + when(myHttpResponse.getAllHeaders()).thenReturn(toHeaderArray("Location", "http://example.com/fhir/Patient/100/_history/200")); + + try { + ourCtx.newRestfulClient(ITestClientWithCreateWithValidAndInvalidParameterType.class, "http://foo"); + fail(); + } catch (ConfigurationException e) { + assertEquals("Parameter #2/2 of method 'createPatient' on type 'ca.uhn.fhir.rest.client.ClientR4Test.ITestClientWithCreateWithValidAndInvalidParameterType' has no recognized FHIR interface parameter annotations. Don't know how to handle this parameter", e.getMessage()); + } + } + @Test public void testDelete() throws Exception { @@ -946,6 +1025,45 @@ public class ClientR4Test { } + @Test + public void testSearchWithAt() throws Exception { + + String msg = getPatientFeedWithOneResult(); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), StandardCharsets.UTF_8)); + + ITestClient client = ourCtx.newRestfulClient(ITestClient.class, "http://foo"); + client.getPatientWithAt(new InstantType("2010-10-01T01:02:03.0Z")); + + assertEquals("http://foo/Patient?_at=2010-10-01T01%3A02%3A03.0Z", capt.getValue().getURI().toString()); + + } + + @Test + public void testUnannotatedMethod() throws Exception { + + String msg = getPatientFeedWithOneResult(); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), StandardCharsets.UTF_8)); + + ITestClientWithUnannotatedMethod client = ourCtx.newRestfulClient(ITestClientWithUnannotatedMethod.class, "http://foo"); + try { + client.getPatientWithAt(new InstantType("2010-10-01T01:02:03.0Z")); + fail(); + } catch (UnsupportedOperationException e) { + assertEquals("The method 'getPatientWithAt' in type ITestClientWithUnannotatedMethod has no handler. Did you forget to annotate it with a RESTful method annotation?", e.getMessage()); + } + + } + @Test public void testSearchWithOptionalParam() throws Exception { @@ -978,7 +1096,6 @@ public class ClientR4Test { } - @Test public void testSearchWithStringIncludes() throws Exception { @@ -1183,7 +1300,6 @@ public class ClientR4Test { } - @Test public void testValidateOutcomeResponse() throws Exception { @@ -1213,7 +1329,6 @@ public class ClientR4Test { assertNull(response.getResource()); } - @Test public void testVRead() throws Exception { @@ -1324,6 +1439,18 @@ public class ClientR4Test { } } + public interface ITestClientWithCreateWithInvalidParameterType extends IRestfulClient { + + @Create() + MethodOutcome createPatient(@ResourceParam int thePatient); + } + + public interface ITestClientWithCreateWithValidAndInvalidParameterType extends IRestfulClient { + + @Create() + MethodOutcome createPatient(@ResourceParam Patient thePatient, int theInt); + } + interface ITestClientWithAndOr extends IBasicClient { @Search() @@ -1382,6 +1509,10 @@ public class ClientR4Test { } + interface ITestClientWithUnannotatedMethod extends IRestfulClient { + void getPatientWithAt(@At InstantType theInstantType); + } + @ResourceDef(name = "Patient") public static class CustomPatient extends Patient { diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/GenericClientR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/GenericClientR4Test.java index c7adb44e2c1..bc693137411 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/GenericClientR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/GenericClientR4Test.java @@ -670,6 +670,40 @@ public class GenericClientR4Test { assertEquals("http://example.com/fhir/_history?_at=ge2011&_at=le2018", capt.getAllValues().get(0).getURI().toASCIIString()); } + + @Test + public void testHistoryOnTypeString() throws Exception { + + final Bundle resp1 = new Bundle(); + resp1.setTotal(0); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(myHttpResponse.getAllHeaders()).thenAnswer(new Answer() { + @Override + public Header[] answer(InvocationOnMock theInvocation) { + return new Header[0]; + } + }); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenAnswer(t -> { + IParser p = ourCtx.newXmlParser(); + return new ReaderInputStream(new StringReader(p.encodeResourceToString(resp1)), StandardCharsets.UTF_8); + }); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + Bundle outcome = client + .history() + .onType("Patient") + .returnBundle(Bundle.class) + .execute(); + + assertEquals(0, outcome.getTotal()); + assertEquals("http://example.com/fhir/Patient/_history", capt.getAllValues().get(0).getURI().toASCIIString()); + } + @Test public void testHttp499() throws Exception { ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ITestClient.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ITestClient.java index 15f2d88c9c0..370f8e663fe 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ITestClient.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/ITestClient.java @@ -17,40 +17,40 @@ import ca.uhn.fhir.rest.param.*; public interface ITestClient extends IBasicClient { @Create - public MethodOutcome createPatient(@ResourceParam Patient thePatient); + MethodOutcome createPatient(@ResourceParam Patient thePatient); @Search() - public List getPatientByDateRange(@RequiredParam(name = "dateRange") DateRangeParam theIdentifiers); + List getPatientByDateRange(@RequiredParam(name = "dateRange") DateRangeParam theIdentifiers); @Search(type=Observation.class) - public Bundle getObservationByNameValueDate(@RequiredParam(name = Observation.SP_CODE_VALUE_DATE, compositeTypes= {StringParam.class,DateParam.class}) CompositeParam theIdentifiers); + Bundle getObservationByNameValueDate(@RequiredParam(name = Observation.SP_CODE_VALUE_DATE, compositeTypes = {StringParam.class, DateParam.class}) CompositeParam theIdentifiers); @Search() - public List getPatientByDob(@RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theBirthDate); + List getPatientByDob(@RequiredParam(name = Patient.SP_BIRTHDATE) DateParam theBirthDate); @Search(type=ExtendedPatient.class) - public List getPatientByDobWithGenericResourceReturnType(@RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theBirthDate); + List getPatientByDobWithGenericResourceReturnType(@RequiredParam(name = Patient.SP_BIRTHDATE) DateParam theBirthDate); @Search(type=ExtendedPatient.class) - public List getPatientByDobWithGenericResourceReturnType2(@RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theBirthDate); + List getPatientByDobWithGenericResourceReturnType2(@RequiredParam(name = Patient.SP_BIRTHDATE) DateParam theBirthDate); @Search() - public List getPatientMultipleIdentifiers(@RequiredParam(name = "ids") TokenOrListParam theIdentifiers); + List getPatientMultipleIdentifiers(@RequiredParam(name = "ids") TokenOrListParam theIdentifiers); @Search(queryName="someQueryNoParams") - public Patient getPatientNoParams(); + Patient getPatientNoParams(); @Search(queryName="someQueryOneParam") - public Patient getPatientOneParam(@RequiredParam(name="param1") StringParam theParam); + Patient getPatientOneParam(@RequiredParam(name = "param1") StringParam theParam); @Search(type=Patient.class) - public Bundle findPatient(@RequiredParam(name = "param") StringAndListParam theStrings); + Bundle findPatient(@RequiredParam(name = "param") StringAndListParam theStrings); @Search() - public Patient getPatientWithIncludes(@RequiredParam(name = "withIncludes") StringParam theString, @IncludeParam List theIncludes); + Patient getPatientWithIncludes(@RequiredParam(name = "withIncludes") StringParam theString, @IncludeParam List theIncludes); @Update - public MethodOutcome updatePatient(@IdParam IdType theId, @ResourceParam Patient thePatient); + MethodOutcome updatePatient(@IdParam IdType theId, @ResourceParam Patient thePatient); @Delete(type=DiagnosticReport.class) void deleteDiagnosticReport(@IdParam IdType theId); @@ -89,7 +89,8 @@ public interface ITestClient extends IBasicClient { Patient findPatientQuantity(@RequiredParam(name="quantityParam") QuantityParam theQuantityType); @Search(compartmentName="compartmentName") - public List getPatientByCompartmentAndDob(@IdParam IdType theIdType, @RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theBirthDate); - + List getPatientByCompartmentAndDob(@IdParam IdType theIdType, @RequiredParam(name = Patient.SP_BIRTHDATE) DateParam theBirthDate); + @Search + Patient getPatientWithAt(@At InstantType theInstantType); } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/BlockingContentR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/BlockingContentR4Test.java index dd6793ec4df..a646e95cb5b 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/BlockingContentR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/BlockingContentR4Test.java @@ -91,7 +91,7 @@ public class BlockingContentR4Test { if (myByteCount++ == 10) { ourLog.info("About to block..."); try { - Thread.sleep(30000); + Thread.sleep(3000); } catch (InterruptedException e) { ourLog.warn("Interrupted", e); } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java index b99d57cf3c9..b477eb48cdc 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java @@ -262,9 +262,21 @@ public class IncludeTest { } } - /** - * Created by dsotnikov on 2/25/2014. - */ + @Test + public void testStringInclude() throws Exception { + HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?_query=stringInclude&_include=foo"); + try (CloseableHttpResponse status = ourClient.execute(httpGet)) { + String responseContent = IOUtils.toString(status.getEntity().getContent()); + + assertEquals(200, status.getStatusLine().getStatusCode()); + Bundle bundle = ourCtx.newXmlParser().parseResource(Bundle.class, responseContent); + assertEquals(1, bundle.getEntry().size()); + + Patient p = BundleUtil.toListOfResourcesOfType(ourCtx, bundle, Patient.class).get(0); + assertEquals("foo", p.getIdentifierFirstRep().getValue()); + } + } + public static class DummyDiagnosticReportResourceProvider implements IResourceProvider { @Override @@ -392,6 +404,17 @@ public class IncludeTest { return retVal; } + + @Search(queryName = "stringInclude") + public List stringInclude(@IncludeParam String theInclude) { + Patient p = new Patient(); + p.setId("p"); + p.addIdentifier().setValue(theInclude); + + return Arrays.asList(p); + } + + @Override public Class getResourceType() { return Patient.class; diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java index e2509542a19..3868584a9bc 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/ServerInvalidDefinitionR4Test.java @@ -54,7 +54,7 @@ public class ServerInvalidDefinitionR4Test { } catch (ServletException e) { assertThat(e.getCause().toString(), StringContains.containsString("ConfigurationException")); assertThat(e.getCause().toString(), StringContains - .containsString("Method 'update' is annotated with @ResourceParam but has a type that is not an implemtation of org.hl7.fhir.instance.model.api.IBaseResource or String or byte[]")); + .containsString("Method 'update' is annotated with @ResourceParam but has a type that is not an implementation of org.hl7.fhir.instance.model.api.IBaseResource or String or byte[]")); } } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/ConsentInterceptorTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/ConsentInterceptorTest.java index 20be8fee5bc..ab8ee8a1838 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/ConsentInterceptorTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/ConsentInterceptorTest.java @@ -35,12 +35,16 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.invocation.Invocation; import org.mockito.junit.MockitoJUnitRunner; import java.io.IOException; +import java.util.Collection; import java.util.List; import java.util.concurrent.TimeUnit; +import static org.awaitility.Awaitility.await; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.Matchers.not; import static org.junit.Assert.*; @@ -201,12 +205,13 @@ public class ConsentInterceptorTest { assertThat(responseContent, containsString("A DIAG")); } - verify(myConsentSvc, times(1)).startOperation(any(), any()); - verify(myConsentSvc, times(2)).canSeeResource(any(), any(), any()); - verify(myConsentSvc, times(3)).willSeeResource(any(), any(), any()); - verify(myConsentSvc, times(1)).completeOperationSuccess(any(), any()); - verify(myConsentSvc, times(0)).completeOperationFailure(any(), any(), any()); + verify(myConsentSvc, timeout(10000).times(1)).startOperation(any(), any()); + verify(myConsentSvc, timeout(10000).times(2)).canSeeResource(any(), any(), any()); + verify(myConsentSvc, timeout(10000).times(3)).willSeeResource(any(), any(), any()); + verify(myConsentSvc, timeout(10000).times(1)).completeOperationSuccess(any(), any()); + verify(myConsentSvc, timeout(10000).times(0)).completeOperationFailure(any(), any(), any()); verifyNoMoreInteractions(myConsentSvc); + } @Test @@ -241,6 +246,7 @@ public class ConsentInterceptorTest { ourPatientProvider.store((Patient) new Patient().setActive(true).setId("PTA")); ourPatientProvider.store((Patient) new Patient().setActive(false).setId("PTB")); + reset(myConsentSvc); when(myConsentSvc.startOperation(any(), any())).thenReturn(ConsentOutcome.PROCEED); when(myConsentSvc.canSeeResource(any(), any(), any())).thenReturn(ConsentOutcome.PROCEED); when(myConsentSvc.willSeeResource(any(RequestDetails.class), any(IBaseResource.class), any())).thenAnswer(t->{ @@ -266,10 +272,10 @@ public class ConsentInterceptorTest { assertEquals("PTB", response.getEntry().get(1).getResource().getIdElement().getIdPart()); } - verify(myConsentSvc, times(1)).startOperation(any(), any()); - verify(myConsentSvc, times(2)).canSeeResource(any(), any(), any()); - verify(myConsentSvc, times(3)).willSeeResource(any(), any(), any()); - verify(myConsentSvc, times(1)).completeOperationSuccess(any(), any()); + verify(myConsentSvc, timeout(1000).times(1)).startOperation(any(), any()); + verify(myConsentSvc, timeout(1000).times(2)).canSeeResource(any(), any(), any()); + verify(myConsentSvc, timeout(1000).times(3)).willSeeResource(any(), any(), any()); + verify(myConsentSvc, timeout(1000).times(1)).completeOperationSuccess(any(), any()); verify(myConsentSvc, times(0)).completeOperationFailure(any(), any(), any()); verifyNoMoreInteractions(myConsentSvc); } diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/InterceptorThrowingExceptionR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/InterceptorThrowingExceptionR4Test.java index 25a9e5177ca..72bfe7f35fc 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/InterceptorThrowingExceptionR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/InterceptorThrowingExceptionR4Test.java @@ -7,6 +7,7 @@ import ca.uhn.fhir.rest.annotation.Read; import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; +import ca.uhn.fhir.test.utilities.JettyUtil; import ca.uhn.fhir.util.TestUtil; import org.apache.commons.io.IOUtils; import org.apache.http.HttpResponse; @@ -21,7 +22,11 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Resource; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -30,11 +35,12 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; +import static org.awaitility.Awaitility.await; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.Matchers.contains; -import static org.junit.Assert.*; - -import ca.uhn.fhir.test.utilities.JettyUtil; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; public class InterceptorThrowingExceptionR4Test { @@ -57,7 +63,7 @@ public class InterceptorThrowingExceptionR4Test { } @After - public void after(){ + public void after() { ourServlet.getInterceptorService().unregisterAllInterceptors(); } @@ -84,26 +90,26 @@ public class InterceptorThrowingExceptionR4Test { @Test public void testFailureInProcessingCompletedNormally() throws Exception { - final List hit = new ArrayList<>(); + final List hit = Collections.synchronizedList(new ArrayList<>()); ourServlet.getInterceptorService().registerInterceptor(new InterceptorAdapter() { @Override public void processingCompletedNormally(ServletRequestDetails theRequestDetails) { hit.add(1); - throw new NullPointerException(); + throw new NullPointerException("Hit 1"); } }); ourServlet.getInterceptorService().registerInterceptor(new InterceptorAdapter() { @Override public void processingCompletedNormally(ServletRequestDetails theRequestDetails) { hit.add(2); - throw new NullPointerException(); + throw new NullPointerException("Hit 2"); } }); ourServlet.getInterceptorService().registerInterceptor(new InterceptorAdapter() { @Override public void processingCompletedNormally(ServletRequestDetails theRequestDetails) { hit.add(3); - throw new NullPointerException(); + throw new NullPointerException("Hit 3"); } }); @@ -119,6 +125,9 @@ public class InterceptorThrowingExceptionR4Test { assertEquals(200, status.getStatusLine().getStatusCode()); assertThat(response, containsString("FAM")); assertTrue(ourHitMethod); + + await().until(() -> hit.size() == 3); + ourLog.info("Hit: {}", hit); assertThat("Hits: " + hit.toString(), hit, contains(1, 2, 3)); @@ -165,7 +174,7 @@ public class InterceptorThrowingExceptionR4Test { proxyHandler.addServletWithMapping(servletHolder, "/*"); ourServer.setHandler(proxyHandler); JettyUtil.startServer(ourServer); - ourPort = JettyUtil.getPortForStartedServer(ourServer); + ourPort = JettyUtil.getPortForStartedServer(ourServer); PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); HttpClientBuilder builder = HttpClientBuilder.create(); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/GraphQLEngineTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/GraphQLEngineTest.java index 70cd2b7511f..dd1a03f8276 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/GraphQLEngineTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/GraphQLEngineTest.java @@ -2,11 +2,18 @@ package ca.uhn.fhir.util; import ca.uhn.fhir.context.FhirContext; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Quantity; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.r4.utils.GraphQLEngine; -import org.hl7.fhir.utilities.graphql.*; +import org.hl7.fhir.utilities.graphql.EGraphEngine; +import org.hl7.fhir.utilities.graphql.EGraphQLException; +import org.hl7.fhir.utilities.graphql.GraphQLResponse; +import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices; +import org.hl7.fhir.utilities.graphql.Parser; import org.junit.BeforeClass; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; @@ -122,7 +129,7 @@ public class GraphQLEngineTest { @BeforeClass public static void beforeClass() { ourCtx = FhirContext.forR4(); - ourWorkerCtx = new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport()); + ourWorkerCtx = new HapiWorkerContext(ourCtx, ourCtx.getValidationSupport()); } } diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/elementmodel/PropertyTest.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/elementmodel/PropertyTest.java index 817a3246f55..4256d38806a 100644 --- a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/elementmodel/PropertyTest.java +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/elementmodel/PropertyTest.java @@ -1,24 +1,21 @@ package org.hl7.fhir.r4.elementmodel; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.List; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IParser; import org.apache.commons.io.IOUtils; -import org.hl7.fhir.exceptions.DefinitionException; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.StructureDefinition; import org.junit.Before; import org.junit.Test; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; /** * Created by axemj on 14/07/2017. @@ -62,6 +59,6 @@ public class PropertyTest { final String sdString = IOUtils.toString(PropertyTest.class.getResourceAsStream("/customPatientSd.xml"), StandardCharsets.UTF_8); final IParser parser = ourCtx.newXmlParser(); sd = parser.parseResource(StructureDefinition.class, sdString); - workerContext = new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport()); + workerContext = new HapiWorkerContext(ourCtx, ourCtx.getValidationSupport()); } } diff --git a/hapi-fhir-structures-r4/src/test/resources/resource-with-lang-in-narrative.xml b/hapi-fhir-structures-r4/src/test/resources/resource-with-lang-in-narrative.xml new file mode 100644 index 00000000000..f3f5664f51e --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/resources/resource-with-lang-in-narrative.xml @@ -0,0 +1,49 @@ + + + + +

    Generated Narrative with Details

    id: f001

    identifier: 6323 (OFFICIAL)

    status: final

    code: Glucose [Moles/volume] in Blood (Details : {LOINC code '15074-8' = 'Glucose [Moles/volume] in Blood', given as 'Glucose [Moles/volume] in Blood'})

    subject: P. van de Heuvel

    effective: 02/04/2013 9:30:10 AM --> (ongoing)

    issued: 03/04/2013 3:30:10 PM

    performer: A. Langeveld

    value: 6.3 mmol/l (Details: UCUM code mmol/L = 'mmol/L')

    interpretation: High (Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'H' = 'High', given as 'High'})

    ReferenceRanges

    -LowHigh
    *3.1 mmol/l (Details: UCUM code mmol/L = 'mmol/L')6.2 mmol/l (Details: UCUM code mmol/L = 'mmol/L')
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index 92dabe9671b..0fabed502e0 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/DefaultProfileValidationSupport.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/DefaultProfileValidationSupport.java deleted file mode 100644 index ac63ae0f6a0..00000000000 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/DefaultProfileValidationSupport.java +++ /dev/null @@ -1,351 +0,0 @@ -package org.hl7.fhir.r5.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.terminologies.ValueSetExpanderSimple; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.*; - -public class DefaultProfileValidationSupport implements IValidationSupport { - - private static final String URL_PREFIX_VALUE_SET = "http://hl7.org/fhir/ValueSet/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION = "http://hl7.org/fhir/StructureDefinition/"; - private static final String URL_PREFIX_STRUCTURE_DEFINITION_BASE = "http://hl7.org/fhir/"; - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class); - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - - private void addConcepts(ConceptSetComponent theInclude, ValueSetExpansionComponent theRetVal, Set theWantCodes, List theConcepts) { - for (ConceptDefinitionComponent next : theConcepts) { - if (theWantCodes.isEmpty() || theWantCodes.contains(next.getCode())) { - theRetVal - .addContains() - .setSystem(theInclude.getSystem()) - .setCode(next.getCode()) - .setDisplay(next.getDisplay()); - } - addConcepts(theInclude, theRetVal, theWantCodes, next.getConcept()); - } - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSetExpander.ValueSetExpansionOutcome retVal = new ValueSetExpander.ValueSetExpansionOutcome(new ValueSet()); - - Set wantCodes = new HashSet<>(); - for (ConceptReferenceComponent next : theInclude.getConcept()) { - wantCodes.add(next.getCode()); - } - - CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem()); - if (system != null) { - List concepts = system.getConcept(); - addConcepts(theInclude, retVal.getValueset().getExpansion(), wantCodes, concepts); - } - - for (UriType next : theInclude.getValueSet()) { - ValueSet vs = myValueSets.get(defaultString(next.getValueAsString())); - if (vs != null) { - for (ConceptSetComponent nextInclude : vs.getCompose().getInclude()) { - ValueSetExpander.ValueSetExpansionOutcome contents = expandValueSet(theContext, nextInclude); - retVal.getValueset().getExpansion().getContains().addAll(contents.getValueset().getExpansion().getContains()); - } - } - } - - return retVal; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList<>(provideStructureDefinitionMap(theContext).values()); - } - - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { - return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true); - } - - private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) { - synchronized (this) { - Map codeSystems = myCodeSystems; - Map valueSets = myValueSets; - if (codeSystems == null || valueSets == null) { - codeSystems = new HashMap<>(); - valueSets = new HashMap<>(); - - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r5/model/valueset/valuesets.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r5/model/valueset/v2-tables.xml"); - loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml"); - - myCodeSystems = codeSystems; - myValueSets = valueSets; - } - - // System can take the form "http://url|version" - String system = theSystem; - if (system.contains("|")) { - String version = system.substring(system.indexOf('|') + 1); - if (version.matches("^[0-9.]+$")) { - system = system.substring(0, system.indexOf('|')); - } - } - - if (codeSystem) { - return codeSystems.get(system); - } else { - return valueSets.get(system); - } - } - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - Validate.notBlank(theUri, "theUri must not be null or blank"); - - if (theClass.equals(StructureDefinition.class)) { - return (T) fetchStructureDefinition(theContext, theUri); - } - - if (theClass.equals(ValueSet.class) || theUri.startsWith(URL_PREFIX_VALUE_SET)) { - return (T) fetchValueSet(theContext, theUri); - } - - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) { - String url = theUrl; - if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) { - // no change - } else if (url.indexOf('/') == -1) { - url = URL_PREFIX_STRUCTURE_DEFINITION + url; - } else if (StringUtils.countMatches(url, '/') == 1) { - url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url; - } - return provideStructureDefinitionMap(theContext).get(url); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return (ValueSet) fetchCodeSystemOrValueSet(theContext, uri, false); - } - - public void flush() { - myCodeSystems = null; - myStructureDefinitions = null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - if (isBlank(theSystem) || Constants.codeSystemNotNeeded(theSystem)) { - return false; - } - CodeSystem cs = fetchCodeSystem(theContext, theSystem); - return cs != null && cs.getContent() != CodeSystemContentMode.NOTPRESENT; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - private void loadCodeSystems(FhirContext theContext, Map theCodeSystems, Map theValueSets, String theClasspath) { - ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath); - InputStream inputStream = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - InputStreamReader reader = null; - if (inputStream != null) { - try { - reader = new InputStreamReader(inputStream, Constants.CHARSET_UTF8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof CodeSystem) { - CodeSystem nextValueSet = (CodeSystem) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextValueSet); - } - } else if (next.getResource() instanceof ValueSet) { - ValueSet nextValueSet = (ValueSet) next.getResource(); - nextValueSet.getText().setDivAsString(""); - String system = nextValueSet.getUrl(); - if (isNotBlank(system)) { - theValueSets.put(system, nextValueSet); - } - } - } - } finally { - try { - if (reader != null) { - reader.close(); - } - inputStream.close(); - } catch (IOException e) { - ourLog.warn("Failure closing stream", e); - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private void loadStructureDefinitions(FhirContext theContext, Map theCodeSystems, String theClasspath) { - ourLog.info("Loading structure definitions from classpath: {}", theClasspath); - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); - if (valuesetText != null) { - InputStreamReader reader = new InputStreamReader(valuesetText, Constants.CHARSET_UTF8); - - Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - if (next.getResource() instanceof StructureDefinition) { - StructureDefinition nextSd = (StructureDefinition) next.getResource(); - nextSd.getText().setDivAsString(""); - String system = nextSd.getUrl(); - if (isNotBlank(system)) { - theCodeSystems.put(system, nextSd); - } - } - } - } else { - ourLog.warn("Unable to load resource: {}", theClasspath); - } - } - - private Map provideStructureDefinitionMap(FhirContext theContext) { - Map structureDefinitions = myStructureDefinitions; - if (structureDefinitions == null) { - structureDefinitions = new HashMap<>(); - - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r5/model/profile/profiles-resources.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r5/model/profile/profiles-types.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r5/model/profile/profiles-others.xml"); - loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/r5/model/extension/extension-definitions.xml"); - - myStructureDefinitions = structureDefinitions; - } - return structureDefinitions; - } - - private CodeValidationResult testIfConceptIsInList(CodeSystem theCodeSystem, String theCode, List conceptList, boolean theCaseSensitive) { - String code = theCode; - if (theCaseSensitive == false) { - code = code.toUpperCase(); - } - - return testIfConceptIsInListInner(theCodeSystem, conceptList, theCaseSensitive, code); - } - - private CodeValidationResult testIfConceptIsInListInner(CodeSystem theCodeSystem, List conceptList, boolean theCaseSensitive, String code) { - CodeValidationResult retVal = null; - for (ConceptDefinitionComponent next : conceptList) { - String nextCandidate = next.getCode(); - if (theCaseSensitive == false) { - nextCandidate = nextCandidate.toUpperCase(); - } - if (nextCandidate.equals(code)) { - retVal = new CodeValidationResult(null, null, next, next.getDisplay()); - break; - } - - // recurse - retVal = testIfConceptIsInList(theCodeSystem, code, next.getConcept(), theCaseSensitive); - if (retVal != null) { - break; - } - } - - if (retVal != null) { - retVal.setCodeSystemName(theCodeSystem.getName()); - retVal.setCodeSystemVersion(theCodeSystem.getVersion()); - } - - return retVal; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - if (isNotBlank(theValueSetUrl)) { - ValueSetExpander expander = new ValueSetExpanderSimple(new HapiWorkerContext(theContext, this)); - try { - ValueSet valueSet = fetchValueSet(theContext, theValueSetUrl); - if (valueSet != null) { - ValueSetExpander.ValueSetExpansionOutcome expanded = expander.expand(valueSet, null); - Optional haveMatch = expanded - .getValueset() - .getExpansion() - .getContains() - .stream() - .filter(t -> (Constants.codeSystemNotNeeded(theCodeSystem) || t.getSystem().equals(theCodeSystem)) && t.getCode().equals(theCode)) - .findFirst(); - if (haveMatch.isPresent()) { - return new CodeValidationResult(new ConceptDefinitionComponent(new CodeType(theCode))); - } - } - } catch (Exception e) { - return new CodeValidationResult(IssueSeverity.WARNING, e.getMessage()); - } - - return null; - } - - if (theCodeSystem != null) { - CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); - if (cs != null) { - boolean caseSensitive = true; - if (cs.hasCaseSensitive()) { - caseSensitive = cs.getCaseSensitive(); - } - - CodeValidationResult retVal = testIfConceptIsInList(cs, theCode, cs.getConcept(), caseSensitive); - - if (retVal != null) { - return retVal; - } - } - } - - return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); - } - - @Override - public IContextValidationSupport.LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return validateCode(theContext, theSystem, theCode, null, null).asLookupCodeResult(theSystem, theCode); - } - -} diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/FhirR5.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/FhirR5.java index c9cad2b48c5..c4c2e210235 100644 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/FhirR5.java +++ b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/FhirR5.java @@ -24,17 +24,24 @@ import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.IVersionSpecificBundleFactory; import ca.uhn.fhir.util.ReflectionUtil; import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.instance.model.api.IBaseCoding; +import org.hl7.fhir.instance.model.api.IBaseReference; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.r5.hapi.fhirpath.FhirPathR5; import org.hl7.fhir.r5.hapi.rest.server.R5BundleFactory; -import org.hl7.fhir.r5.model.*; +import org.hl7.fhir.r5.model.Coding; +import org.hl7.fhir.r5.model.IdType; +import org.hl7.fhir.r5.model.Reference; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.StructureDefinition; import java.io.InputStream; import java.util.Date; @@ -49,11 +56,6 @@ public class FhirR5 implements IFhirVersion { return new FhirPathR5(theFhirContext); } - @Override - public IContextValidationSupport createValidationSupport() { - return ReflectionUtil.newInstanceOfFhirProfileValidationSupport("org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport"); - } - @Override public IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java index 0b4f58300f4..38a9e8a2560 100644 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java +++ b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java @@ -1,10 +1,9 @@ package org.hl7.fhir.r5.hapi.ctx; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.CoverageIgnore; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; @@ -21,19 +20,23 @@ import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent; import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.terminologies.ValueSetExpanderFactory; -import org.hl7.fhir.r5.terminologies.ValueSetExpanderSimple; import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.utilities.TerminologyServiceOptions; import org.hl7.fhir.utilities.TranslationServices; +import org.hl7.fhir.utilities.i18n.I18nBase; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationOptions; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.concurrent.TimeUnit; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory { +public final class HapiWorkerContext extends I18nBase implements IWorkerContext { private final FhirContext myCtx; private final Cache myFetchedResourceCache; private IValidationSupport myValidationSupport; @@ -52,11 +55,14 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } myFetchedResourceCache = Caffeine.newBuilder().expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS).build(); + + // Set a default locale + setValidationMessageLanguage(getLocale()); } @Override public List allStructures() { - return myValidationSupport.fetchAllStructureDefinitions(myCtx); + return myValidationSupport.fetchAllStructureDefinitions(); } @Override @@ -69,7 +75,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return null; } else { - return myValidationSupport.fetchCodeSystem(myCtx, theSystem); + return (CodeSystem) myValidationSupport.fetchCodeSystem(theSystem); } } @@ -83,13 +89,6 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander throw new UnsupportedOperationException(); } - @Override - public ValueSetExpander getExpander() { - ValueSetExpanderSimple retVal = new ValueSetExpanderSimple(this); - retVal.setMaxExpansionSize(Integer.MAX_VALUE); - return retVal; - } - @Override public org.hl7.fhir.r5.utils.INarrativeGenerator getNarrativeGenerator(String thePrefix, String theBasePath) { throw new UnsupportedOperationException(); @@ -140,19 +139,13 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander if (myValidationSupport == null) { return false; } else { - return myValidationSupport.isCodeSystemSupported(myCtx, theSystem); + return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem); } } - @Override - public Set typeTails() { - return new HashSet<>(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", - "Markdown", "Base64Binary", "Coding", "CodeableConcept", "Attachment", "Identifier", "Quantity", "SampledData", "Range", "Period", "Ratio", "HumanName", "Address", "ContactPoint", - "Timing", "Reference", "Annotation", "Signature", "Meta")); - } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, CodeableConcept theCode, ValueSet theVs) { + public ValidationResult validateCode(ValidationOptions theOptions, CodeableConcept theCode, ValueSet theVs) { for (Coding next : theCode.getCoding()) { ValidationResult retVal = validateCode(theOptions, next, theVs); if (retVal.isOk()) { @@ -164,7 +157,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, Coding theCode, ValueSet theVs) { + public ValidationResult validateCode(ValidationOptions theOptions, Coding theCode, ValueSet theVs) { String system = theCode.getSystem(); String code = theCode.getCode(); String display = theCode.getDisplay(); @@ -172,47 +165,27 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay) { - IContextValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, null); + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) { + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null); if (result == null) { return null; } - return new ValidationResult((IssueSeverity) result.getSeverity(), result.getMessage(), (ConceptDefinitionComponent) result.asConceptDefinition()); + IssueSeverity severity = null; + if (result.getSeverity() != null) { + severity = IssueSeverity.fromCode(result.getSeverityCode()); + } + ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode()); + return new ValidationResult(severity, result.getMessage(), definition); } @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay, ConceptSetComponent theVsi) { - throw new UnsupportedOperationException(); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String theSystem, String theCode, String theDisplay, ValueSet theVs) { - - /* - * The following valueset is a special case, since the BCP codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/languages".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } - - /* - * The following valueset is a special case, since the mime types codesystem is very difficult to expand - */ - if ("http://hl7.org/fhir/ValueSet/mimetypes".equals(theVs.getUrl())) { - ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); - definition.setCode(theSystem); - definition.setDisplay(theCode); - return new ValidationResult(definition); - } + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay, ValueSet theVs) { IValidationSupport.CodeValidationResult outcome; if (isNotBlank(theVs.getUrl())) { - outcome = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay, theVs.getUrl()); + outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl()); } else { - outcome = myValidationSupport.validateCodeInValueSet(myCtx, theSystem, theCode, theDisplay, theVs); + outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs); } if (outcome != null && outcome.isOk()) { @@ -225,20 +198,24 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander return new ValidationResult(IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" + Constants.codeSystemWithDefaultDescription(theSystem) + "]"); } - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, ValueSet vs) { + public ValidationResult validateCode(ValidationOptions theOptions, String code, ValueSet vs) { return validateCode(theOptions, null, code, null, vs); } @Override @CoverageIgnore - public List allConformanceResources() { + public List allConformanceResources() { throw new UnsupportedOperationException(); } @Override public void generateSnapshot(StructureDefinition p) throws FHIRException { + myValidationSupport.generateSnapshot(myValidationSupport, p, "", "", ""); + } + + @Override + public void generateSnapshot(StructureDefinition mr, boolean ifLogical) { } @@ -259,30 +236,26 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValueSetExpansionOutcome expand(ValueSet theSource, Parameters theProfile) { - ValueSetExpansionOutcome vso; - try { - vso = getExpander().expand(theSource, theProfile); - } catch (InvalidRequestException e) { - throw e; - } catch (Exception e) { - throw new InternalErrorException(e); - } - if (vso.getError() != null) { - throw new InvalidRequestException(vso.getError()); - } else { - return vso; - } - } - - @Override - public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHeiarchical) { + public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical) { throw new UnsupportedOperationException(); } @Override - public ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHeiarchical) throws TerminologyServiceException { - return myValidationSupport.expandValueSet(myCtx, theInc); + 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); + return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null); + } + + @Override + public Locale getLocale() { + return Locale.getDefault(); + } + + @Override + public void setLocale(Locale locale) { + // ignore } @Override @@ -345,6 +318,11 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander return fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); } + @Override + public StructureDefinition fetchRawProfile(String url) { + throw new UnsupportedOperationException(); + } + @Override public List getTypeNames() { throw new UnsupportedOperationException(); @@ -356,7 +334,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander return null; } else { @SuppressWarnings("unchecked") - T retVal = (T) myFetchedResourceCache.get(theUri, t -> myValidationSupport.fetchResource(myCtx, theClass, theUri)); + T retVal = (T) myFetchedResourceCache.get(theUri, t -> myValidationSupport.fetchResource(theClass, theUri)); return retVal; } } @@ -391,7 +369,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander } @Override - public ValueSetExpansionOutcome expandVS(ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHeiarchical) throws FHIRException { + public ValueSetExpander.ValueSetExpansionOutcome expandVS(ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException { throw new UnsupportedOperationException(); } @@ -400,4 +378,17 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander throw new UnsupportedOperationException(); } + @Override + public Map getBinaries() { + return null; + } + + public static ConceptValidationOptions convertConceptValidationOptions(ValidationOptions theOptions) { + ConceptValidationOptions retVal = new ConceptValidationOptions(); + if (theOptions.isGuessSystem()) { + retVal = retVal.setInferSystem(true); + } + return retVal; + } + } diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/IValidationSupport.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/IValidationSupport.java deleted file mode 100644 index 745a1357f6d..00000000000 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/IValidationSupport.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.hl7.fhir.r5.hapi.ctx; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.util.List; - -public interface IValidationSupport - extends IContextValidationSupport { - - /** - * Expands the given portion of a ValueSet - * - * @param theInclude The portion to include - * @return The expansion - */ - @Override - ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude); - - /** - * Load and return all possible structure definitions - */ - @Override - List fetchAllStructureDefinitions(FhirContext theContext); - - /** - * Fetch a code system by Uri - * - * @param uri Canonical Uri of the code system - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - CodeSystem fetchCodeSystem(FhirContext theContext, String uri); - - /** - * Fetch a valueset by Uri - * - * @param uri Canonical Uri of the ValueSet - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - @Override - ValueSet fetchValueSet(FhirContext theContext, String uri); - - /** - * Loads a resource needed by the validation (a StructureDefinition, or a - * ValueSet) - * - * @param theContext The HAPI FHIR Context object current in use by the validator - * @param theClass The type of the resource to load - * @param theUri The resource URI - * @return Returns the resource, or null if no resource with the - * given URI can be found - */ - @Override - T fetchResource(FhirContext theContext, Class theClass, String theUri); - - @Override - StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl); - - /** - * Returns true if codes in the given code system can be expanded - * or validated - * - * @param theSystem The URI for the code system, e.g. "http://loinc.org" - * @return Returns true if codes in the given code system can be - * validated - */ - @Override - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); - - /** - * Generate a snapshot from the given differential profile. - * - * @param theInput - * @param theUrl - * @param theWebUrl - * @param theProfileName - * @return Returns null if this module does not know how to handle this request - */ - StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName); - -} diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/fhirpath/FhirPathR5.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/fhirpath/FhirPathR5.java index 1d68df9bb84..1aab76cf9ed 100644 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/fhirpath/FhirPathR5.java +++ b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/fhirpath/FhirPathR5.java @@ -1,12 +1,12 @@ package org.hl7.fhir.r5.hapi.fhirpath; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.fluentpath.FluentPathExecutionException; import ca.uhn.fhir.fluentpath.IFluentPath; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; import org.hl7.fhir.r5.model.Base; import org.hl7.fhir.r5.utils.FHIRPathEngine; @@ -18,10 +18,7 @@ public class FhirPathR5 implements IFluentPath { private FHIRPathEngine myEngine; public FhirPathR5(FhirContext theCtx) { - if (!(theCtx.getValidationSupport() instanceof IValidationSupport)) { - throw new IllegalStateException("Validation support module configured on context appears to be for the wrong FHIR version- Does not extend " + IValidationSupport.class.getName()); - } - IValidationSupport validationSupport = (IValidationSupport) theCtx.getValidationSupport(); + IValidationSupport validationSupport = theCtx.getValidationSupport(); myEngine = new FHIRPathEngine(new HapiWorkerContext(theCtx, validationSupport)); } diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/rest/server/ServerCapabilityStatementProvider.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/rest/server/ServerCapabilityStatementProvider.java index 4cdbb9268e4..d0c9a708924 100644 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/rest/server/ServerCapabilityStatementProvider.java +++ b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/rest/server/ServerCapabilityStatementProvider.java @@ -1,5 +1,6 @@ package org.hl7.fhir.r5.hapi.rest.server; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; @@ -14,31 +15,51 @@ import ca.uhn.fhir.rest.server.IServerConformanceProvider; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.RestfulServerConfiguration; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import ca.uhn.fhir.rest.server.method.*; -import ca.uhn.fhir.rest.server.method.SearchParameter; +import ca.uhn.fhir.rest.server.method.BaseMethodBinding; +import ca.uhn.fhir.rest.server.method.IParameter; +import ca.uhn.fhir.rest.server.method.OperationMethodBinding; import ca.uhn.fhir.rest.server.method.OperationMethodBinding.ReturnType; +import ca.uhn.fhir.rest.server.method.OperationParameter; +import ca.uhn.fhir.rest.server.method.SearchMethodBinding; +import ca.uhn.fhir.rest.server.method.SearchParameter; import ca.uhn.fhir.rest.server.util.BaseServerCapabilityStatementProvider; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.model.CapabilityStatement.*; +import org.hl7.fhir.r5.model.CapabilityStatement; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.ConditionalDeleteStatus; +import org.hl7.fhir.r5.model.CapabilityStatement.ResourceInteractionComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.SystemRestfulInteraction; +import org.hl7.fhir.r5.model.CapabilityStatement.TypeRestfulInteraction; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Enumerations.PublicationStatus; +import org.hl7.fhir.r5.model.IdType; +import org.hl7.fhir.r5.model.OperationDefinition; import org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent; import org.hl7.fhir.r5.model.OperationDefinition.OperationKind; -import org.hl7.fhir.r5.model.OperationDefinition.OperationParameterUse; +import org.hl7.fhir.r5.model.ResourceType; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeSet; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -import ca.uhn.fhir.context.FhirContext; - /* * #%L * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) @@ -160,7 +181,7 @@ public class ServerCapabilityStatementProvider extends BaseServerCapabilityState .setUrl(serverBase) .setDescription(configuration.getImplementationDescription()); - retVal.setKind(CapabilityStatementKind.INSTANCE); + retVal.setKind(Enumerations.CapabilityStatementKind.INSTANCE); retVal.getSoftware().setName(configuration.getServerName()); retVal.getSoftware().setVersion(configuration.getServerVersion()); retVal.addFormat(Constants.CT_FHIR_XML_NEW); @@ -168,7 +189,7 @@ public class ServerCapabilityStatementProvider extends BaseServerCapabilityState retVal.setStatus(PublicationStatus.ACTIVE); CapabilityStatementRestComponent rest = retVal.addRest(); - rest.setMode(RestfulCapabilityMode.SERVER); + rest.setMode(Enumerations.RestfulCapabilityMode.SERVER); Set systemOps = new HashSet<>(); Set operationNames = new HashSet<>(); @@ -442,8 +463,8 @@ public class ServerCapabilityStatementProvider extends BaseServerCapabilityState continue; } OperationDefinitionParameterComponent param = op.addParameter(); - param.setUse(OperationParameterUse.IN); - param.setType("string"); + param.setUse(Enumerations.OperationParameterUse.IN); + param.setType(Enumerations.FHIRAllTypes.STRING); param.getSearchTypeElement().setValueAsString(nextParam.getParamType().getCode()); param.setMin(nextParam.isRequired() ? 1 : 0); param.setMax("1"); @@ -511,9 +532,9 @@ public class ServerCapabilityStatementProvider extends BaseServerCapabilityState if (!inParams.add(nextParam.getName())) { continue; } - param.setUse(OperationParameterUse.IN); + param.setUse(Enumerations.OperationParameterUse.IN); if (nextParam.getParamType() != null) { - param.setType(nextParam.getParamType()); + param.setType(Enumerations.FHIRAllTypes.fromCode(nextParam.getParamType())); } if (nextParam.getSearchParamType() != null) { param.getSearchTypeElement().setValueAsString(nextParam.getSearchParamType()); @@ -529,9 +550,9 @@ public class ServerCapabilityStatementProvider extends BaseServerCapabilityState continue; } OperationDefinitionParameterComponent param = op.addParameter(); - param.setUse(OperationParameterUse.OUT); + param.setUse(Enumerations.OperationParameterUse.OUT); if (nextParam.getType() != null) { - param.setType(nextParam.getType()); + param.setType(Enumerations.FHIRAllTypes.fromCode(nextParam.getType())); } param.setMin(nextParam.getMin()); param.setMax(nextParam.getMax() == -1 ? "*" : Integer.toString(nextParam.getMax())); diff --git a/hapi-fhir-structures-r5/src/main/resources/org/hl7/fhir/r5/model/fhirversion.properties b/hapi-fhir-structures-r5/src/main/resources/org/hl7/fhir/r5/model/fhirversion.properties index 22b831d13ce..2248296c8ae 100644 --- a/hapi-fhir-structures-r5/src/main/resources/org/hl7/fhir/r5/model/fhirversion.properties +++ b/hapi-fhir-structures-r5/src/main/resources/org/hl7/fhir/r5/model/fhirversion.properties @@ -1,5 +1,5 @@ # This file contains version definitions -# Generated: 2019-10-26T18:45:40.876-04:00 +# Generated: 2020-01-12T11:10:06.793+08:00 resource.Account=org.hl7.fhir.r5.model.Account resource.ActivityDefinition=org.hl7.fhir.r5.model.ActivityDefinition @@ -148,14 +148,16 @@ datatype.Address=org.hl7.fhir.r5.model.Address datatype.Age=org.hl7.fhir.r5.model.Age datatype.Annotation=org.hl7.fhir.r5.model.Annotation datatype.Attachment=org.hl7.fhir.r5.model.Attachment -datatype.BackboneElement=org.hl7.fhir.r5.model.BackboneType +datatype.BackboneType=org.hl7.fhir.r5.model.BackboneType datatype.CodeableConcept=org.hl7.fhir.r5.model.CodeableConcept +datatype.CodeableReference=org.hl7.fhir.r5.model.CodeableReference datatype.Coding=org.hl7.fhir.r5.model.Coding datatype.ContactDetail=org.hl7.fhir.r5.model.ContactDetail datatype.ContactPoint=org.hl7.fhir.r5.model.ContactPoint datatype.Contributor=org.hl7.fhir.r5.model.Contributor datatype.Count=org.hl7.fhir.r5.model.Count datatype.DataRequirement=org.hl7.fhir.r5.model.DataRequirement +datatype.DataType=org.hl7.fhir.r5.model.DataType datatype.Distance=org.hl7.fhir.r5.model.Distance datatype.Dosage=org.hl7.fhir.r5.model.Dosage datatype.Duration=org.hl7.fhir.r5.model.Duration @@ -199,6 +201,7 @@ datatype.decimal=org.hl7.fhir.r5.model.DecimalType datatype.id=org.hl7.fhir.r5.model.IdType datatype.instant=org.hl7.fhir.r5.model.InstantType datatype.integer=org.hl7.fhir.r5.model.IntegerType +datatype.integer64=org.hl7.fhir.r5.model.Integer64Type datatype.markdown=org.hl7.fhir.r5.model.MarkdownType datatype.oid=org.hl7.fhir.r5.model.OidType datatype.positiveInt=org.hl7.fhir.r5.model.PositiveIntType @@ -207,4 +210,5 @@ datatype.time=org.hl7.fhir.r5.model.TimeType datatype.unsignedInt=org.hl7.fhir.r5.model.UnsignedIntType datatype.uri=org.hl7.fhir.r5.model.UriType datatype.url=org.hl7.fhir.r5.model.UrlType +datatype.uuid=org.hl7.fhir.r5.model.UuidType datatype.xhtml=org.hl7.fhir.utilities.xhtml.XhtmlNode diff --git a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java index 2f814a229a8..9a384e576c2 100644 --- a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java +++ b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/server/ServerCapabilityStatementProviderR5Test.java @@ -3,13 +3,19 @@ package ca.uhn.fhir.rest.server; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.rest.annotation.*; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.param.*; +import ca.uhn.fhir.rest.param.DateRangeParam; +import ca.uhn.fhir.rest.param.QuantityParam; +import ca.uhn.fhir.rest.param.ReferenceAndListParam; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.param.TokenOrListParam; +import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.method.BaseMethodBinding; import ca.uhn.fhir.rest.server.method.IParameter; import ca.uhn.fhir.rest.server.method.SearchMethodBinding; @@ -21,26 +27,41 @@ import com.google.common.collect.Lists; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r5.hapi.rest.server.ServerCapabilityStatementProvider; import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.model.CapabilityStatement.*; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent; +import org.hl7.fhir.r5.model.CapabilityStatement.ConditionalDeleteStatus; +import org.hl7.fhir.r5.model.CapabilityStatement.SystemRestfulInteraction; +import org.hl7.fhir.r5.model.CapabilityStatement.TypeRestfulInteraction; import org.hl7.fhir.r5.model.Enumerations.PublicationStatus; import org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent; import org.hl7.fhir.r5.model.OperationDefinition.OperationKind; -import org.hl7.fhir.r5.model.OperationDefinition.OperationParameterUse; import org.junit.AfterClass; import org.junit.Ignore; import org.junit.Test; import javax.servlet.ServletConfig; import javax.servlet.http.HttpServletRequest; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import ca.uhn.fhir.model.api.annotation.ResourceDef; - public class ServerCapabilityStatementProviderR5Test { private static FhirContext ourCtx; @@ -265,9 +286,9 @@ public class ServerCapabilityStatementProviderR5Test { assertThat(types, containsInAnyOrder("Patient")); assertEquals(2, opDef.getParameter().size()); assertEquals("someOpParam1", opDef.getParameter().get(0).getName()); - assertEquals("date", opDef.getParameter().get(0).getType()); + assertEquals("date", opDef.getParameter().get(0).getType().toCode()); assertEquals("someOpParam2", opDef.getParameter().get(1).getName()); - assertEquals("Patient", opDef.getParameter().get(1).getType()); + assertEquals("Patient", opDef.getParameter().get(1).getType().toCode()); } { OperationDefinition opDef = sc.readOperationDefinition(new IdType("OperationDefinition/Encounter-i-someOp"), createRequestDetails(rs)); @@ -280,9 +301,9 @@ public class ServerCapabilityStatementProviderR5Test { assertThat(types, containsInAnyOrder("Encounter")); assertEquals(2, opDef.getParameter().size()); assertEquals("someOpParam1", opDef.getParameter().get(0).getName()); - assertEquals("date", opDef.getParameter().get(0).getType()); + assertEquals("date", opDef.getParameter().get(0).getType().toCode()); assertEquals("someOpParam2", opDef.getParameter().get(1).getName()); - assertEquals("Encounter", opDef.getParameter().get(1).getType()); + assertEquals("Encounter", opDef.getParameter().get(1).getType().toCode()); } { OperationDefinition opDef = sc.readOperationDefinition(new IdType("OperationDefinition/Patient-i-validate"), createRequestDetails(rs)); @@ -295,7 +316,7 @@ public class ServerCapabilityStatementProviderR5Test { assertThat(types, containsInAnyOrder("Patient")); assertEquals(1, opDef.getParameter().size()); assertEquals("resource", opDef.getParameter().get(0).getName()); - assertEquals("Patient", opDef.getParameter().get(0).getType()); + assertEquals("Patient", opDef.getParameter().get(0).getType().toCode()); } } @@ -672,11 +693,11 @@ public class ServerCapabilityStatementProviderR5Test { assertThat(parameters.size(), is(1)); OperationDefinitionParameterComponent param = parameters.get(0); assertThat(param.getName(), is(NamedQueryPlainProvider.SP_QUANTITY)); - assertThat(param.getType(), is("string")); + assertThat(param.getType().toCode(), is("string")); assertThat(param.getSearchTypeElement().asStringValue(), is(RestSearchParameterTypeEnum.QUANTITY.getCode())); assertThat(param.getMin(), is(1)); assertThat(param.getMax(), is("1")); - assertThat(param.getUse(), is(OperationParameterUse.IN)); + assertThat(param.getUse(), is(Enumerations.OperationParameterUse.IN)); } @Test @@ -710,11 +731,11 @@ public class ServerCapabilityStatementProviderR5Test { assertThat(parameters.size(), is(1)); OperationDefinitionParameterComponent param = parameters.get(0); assertThat(param.getName(), is(NamedQueryResourceProvider.SP_PARAM)); - assertThat(param.getType(), is("string")); + assertThat(param.getType().toCode(), is("string")); assertThat(param.getSearchTypeElement().asStringValue(), is(RestSearchParameterTypeEnum.STRING.getCode())); assertThat(param.getMin(), is(0)); assertThat(param.getMax(), is("1")); - assertThat(param.getUse(), is(OperationParameterUse.IN)); + assertThat(param.getUse(), is(Enumerations.OperationParameterUse.IN)); CapabilityStatementRestResourceComponent patientResource = restComponent.getResource().stream() .filter(r -> patientResourceName.equals(r.getType())) diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index d010e06b048..614e36ef8fd 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -19,17 +19,17 @@ ca.uhn.hapi.fhir hapi-fhir-base - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-server - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-client - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/BaseTest.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/BaseTest.java index 070df8612b0..0cbcf44f7b9 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/BaseTest.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/BaseTest.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.test; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/JettyUtil.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/JettyUtil.java index 3a4533c6ffa..913ad69d82f 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/JettyUtil.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/JettyUtil.java @@ -5,7 +5,7 @@ package ca.uhn.fhir.test.utilities; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/LoggingRule.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/LoggingRule.java index b6518887970..bd33d9a79a7 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/LoggingRule.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/LoggingRule.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.test.utilities; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/UnregisterScheduledProcessor.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/UnregisterScheduledProcessor.java index fd943024dce..0582dfd8e47 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/UnregisterScheduledProcessor.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/UnregisterScheduledProcessor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.test.utilities; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/HashMapResourceProviderRule.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/HashMapResourceProviderRule.java index 1b0e5d0c805..26912696de4 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/HashMapResourceProviderRule.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/HashMapResourceProviderRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.test.utilities.server; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/ResourceProviderRule.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/ResourceProviderRule.java index 0b7872fb94b..dd9b1da4666 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/ResourceProviderRule.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/ResourceProviderRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.test.utilities.server; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/RestfulServerRule.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/RestfulServerRule.java index e930e599eee..cfeb6487628 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/RestfulServerRule.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/server/RestfulServerRule.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.test.utilities.server; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/FhirObjectPrinter.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/FhirObjectPrinter.java index 01707dd184c..3a291b38f9f 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/FhirObjectPrinter.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/FhirObjectPrinter.java @@ -4,7 +4,7 @@ package ca.uhn.test.concurrency; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/IPointcutLatch.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/IPointcutLatch.java index 2bb6a1a5215..4ad27db14db 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/IPointcutLatch.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/IPointcutLatch.java @@ -4,7 +4,7 @@ package ca.uhn.test.concurrency; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java index 0d6c3d6bc3f..080b9238903 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java @@ -4,7 +4,7 @@ package ca.uhn.test.concurrency; * #%L * HAPI FHIR Test Utilities * %% - * Copyright (C) 2014 - 2019 University Health Network + * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -44,44 +45,61 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { private static final FhirObjectPrinter ourFhirObjectToStringMapper = new FhirObjectPrinter(); private final String name; - + private final AtomicLong myLastInvoke = new AtomicLong(); private final AtomicReference myCountdownLatch = new AtomicReference<>(); private final AtomicReference> myFailures = new AtomicReference<>(); private final AtomicReference> myCalledWith = new AtomicReference<>(); - private int myDefaultTimeoutSeconds = DEFAULT_TIMEOUT_SECONDS; private final Pointcut myPointcut; + private int myDefaultTimeoutSeconds = DEFAULT_TIMEOUT_SECONDS; private int myInitialCount; - - + private boolean myExactMatch; public PointcutLatch(Pointcut thePointcut) { this.name = thePointcut.name(); myPointcut = thePointcut; } + public PointcutLatch(String theName) { this.name = theName; myPointcut = null; } + public long getLastInvoke() { + return myLastInvoke.get(); + } + public PointcutLatch setDefaultTimeoutSeconds(int theDefaultTimeoutSeconds) { myDefaultTimeoutSeconds = theDefaultTimeoutSeconds; return this; } @Override - public void setExpectedCount(int count) { + public void setExpectedCount(int theCount) { + this.setExpectedCount(theCount, true); + } + + public void setExpectedCount(int theCount, boolean theExactMatch) { if (myCountdownLatch.get() != null) { throw new PointcutLatchException("setExpectedCount() called before previous awaitExpected() completed."); } - createLatch(count); - ourLog.info("Expecting {} calls to {} latch", count, name); + myExactMatch = theExactMatch; + createLatch(theCount); + if (theExactMatch) { + ourLog.info("Expecting exactly {} calls to {} latch", theCount, name); + } else { + ourLog.info("Expecting at least {} calls to {} latch", theCount, name); + } } - private void createLatch(int count) { + public void setExpectAtLeast(int theCount) { + setExpectedCount(theCount, false); + } + + private void createLatch(int theCount) { myFailures.set(Collections.synchronizedList(new ArrayList<>())); myCalledWith.set(Collections.synchronizedList(new ArrayList<>())); - myCountdownLatch.set(new CountDownLatch(count)); - myInitialCount = count; + myCountdownLatch.set(new CountDownLatch(theCount)); + myInitialCount = theCount; } private void addFailure(String failure) { @@ -152,11 +170,17 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { @Override public void invoke(Pointcut thePointcut, HookParams theArgs) { + myLastInvoke.set(System.currentTimeMillis()); + CountDownLatch latch = myCountdownLatch.get(); - if (latch == null) { - throw new PointcutLatchException("invoke() called outside of setExpectedCount() .. awaitExpected(). Probably got more invocations than expected or clear() was called before invoke() arrived.", theArgs); - } else if (latch.getCount() <= 0) { - addFailure("invoke() called when countdown was zero."); + if (myExactMatch) { + if (latch == null) { + throw new PointcutLatchException("invoke() called outside of setExpectedCount() .. awaitExpected(). Probably got more invocations than expected or clear() was called before invoke() arrived.", theArgs); + } else if (latch.getCount() <= 0) { + addFailure("invoke() called when countdown was zero."); + } + } else if (latch == null || latch.getCount() <= 0) { + return; } if (myCalledWith.get() != null) { @@ -171,6 +195,21 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { this.invoke(myPointcut, new HookParams(arg)); } + @Override + public String toString() { + return new ToStringBuilder(this) + .append("name", name) + .append("myCountdownLatch", myCountdownLatch) +// .append("myFailures", myFailures) +// .append("myCalledWith", myCalledWith) + .append("myInitialCount", myInitialCount) + .toString(); + } + + public Object getLatchInvocationParameter() { + return getLatchInvocationParameter(myCalledWith.get()); + } + private class PointcutLatchException extends IllegalStateException { private static final long serialVersionUID = 1372636272233536829L; @@ -187,21 +226,6 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { return hookParams.values().stream().map(ourFhirObjectToStringMapper).collect(Collectors.joining(", ")); } - @Override - public String toString() { - return new ToStringBuilder(this) - .append("name", name) - .append("myCountdownLatch", myCountdownLatch) -// .append("myFailures", myFailures) -// .append("myCalledWith", myCalledWith) - .append("myInitialCount", myInitialCount) - .toString(); - } - - public Object getLatchInvocationParameter() { - return getLatchInvocationParameter(myCalledWith.get()); - } - public static Object getLatchInvocationParameter(List theHookParams) { Validate.notNull(theHookParams); Validate.isTrue(theHookParams.size() == 1, "Expected Pointcut to be invoked 1 time"); diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index b8bca0e0dad..58ca47b8214 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml @@ -66,6 +66,10 @@ ${project.version} + + com.google.code.gson + gson + org.thymeleaf thymeleaf diff --git a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java index 9ed40191388..c0af8e3ea98 100644 --- a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java +++ b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java @@ -1,42 +1,59 @@ package ca.uhn.fhir.to; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.Include; +import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.client.impl.GenericClient; +import ca.uhn.fhir.rest.gclient.ICreateTyped; +import ca.uhn.fhir.rest.gclient.IHistory; +import ca.uhn.fhir.rest.gclient.IHistoryTyped; +import ca.uhn.fhir.rest.gclient.IHistoryUntyped; +import ca.uhn.fhir.rest.gclient.IQuery; +import ca.uhn.fhir.rest.gclient.IUntypedQuery; +import ca.uhn.fhir.rest.gclient.NumberClientParam.IMatches; +import ca.uhn.fhir.rest.gclient.QuantityClientParam; +import ca.uhn.fhir.rest.gclient.QuantityClientParam.IAndUnits; +import ca.uhn.fhir.rest.gclient.StringClientParam; +import ca.uhn.fhir.rest.gclient.TokenClientParam; +import ca.uhn.fhir.to.model.HomeRequest; +import ca.uhn.fhir.to.model.ResourceRequest; +import ca.uhn.fhir.to.model.TransactionRequest; +import com.google.gson.stream.JsonWriter; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.dstu3.model.CapabilityStatement; +import org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent; +import org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent; +import org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent; +import org.hl7.fhir.dstu3.model.StringType; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseConformance; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.TreeSet; + import static org.apache.commons.lang3.StringUtils.defaultIfEmpty; import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -import java.io.IOException; -import java.io.StringWriter; -import java.util.*; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; - -import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.dstu3.model.CapabilityStatement; -import org.hl7.fhir.dstu3.model.CapabilityStatement.*; -import org.hl7.fhir.dstu3.model.StringType; -import org.hl7.fhir.instance.model.api.*; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.RequestMapping; - -import com.google.gson.stream.JsonWriter; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.model.api.Include; -import ca.uhn.fhir.model.dstu2.resource.Conformance; -import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum; -import ca.uhn.fhir.model.primitive.*; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.EncodingEnum; -import ca.uhn.fhir.rest.client.impl.GenericClient; -import ca.uhn.fhir.rest.gclient.*; -import ca.uhn.fhir.rest.gclient.NumberClientParam.IMatches; -import ca.uhn.fhir.rest.gclient.QuantityClientParam.IAndUnits; -import ca.uhn.fhir.to.model.*; - @org.springframework.stereotype.Controller() public class Controller extends BaseController { static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(Controller.class); diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index ad05fd25d1a..2f55922f38f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index 45aa002c077..e537f31e90a 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/profiles.properties b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/profiles.properties new file mode 100644 index 00000000000..a299c930848 --- /dev/null +++ b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/profiles.properties @@ -0,0 +1,161 @@ +account.profile.xml=true +address.profile.xml=true +age.profile.xml=true +allergyintolerance.profile.xml=true +annotation.profile.xml=true +appointment.profile.xml=true +appointmentresponse.profile.xml=true +attachment.profile.xml=true +auditevent.profile.xml=true +backboneelement.profile.xml=true +base64binary.profile.xml=true +basic.profile.xml=true +binary.profile.xml=true +bodysite.profile.xml=true +boolean.profile.xml=true +bundle.profile.xml=true +careplan.profile.xml=true +cholesterol.profile.xml=true +claim.profile.xml=true +claimresponse.profile.xml=true +clinicaldocument.profile.xml=true +clinicalimpression.profile.xml=true +code.profile.xml=true +codeableconcept.profile.xml=true +coding.profile.xml=true +communication.profile.xml=true +communicationrequest.profile.xml=true +composition.profile.xml=true +conceptmap.profile.xml=true +condition.profile.xml=true +conformance.profile.xml=true +consentdirective.profile.xml=true +contactpoint.profile.xml=true +contract.profile.xml=true +contraindication.profile.xml=true +count.profile.xml=true +coverage.profile.xml=true +dataelement.profile.xml=true +date.profile.xml=true +datetime.profile.xml=true +decimal.profile.xml=true +definition.profile.xml=true +detectedissue.profile.xml=true +device.profile.xml=true +devicecomponent.profile.xml=true +devicemetric.profile.xml=true +devicemetricobservation.profile.xml=true +deviceuserequest.profile.xml=true +deviceusestatement.profile.xml=true +diagnosticorder.profile.xml=true +diagnosticreport.profile.xml=true +distance.profile.xml=true +documentmanifest.profile.xml=true +documentreference.profile.xml=true +domainresource.profile.xml=true +duration.profile.xml=true +element.profile.xml=true +elementdefinition-de.profile.xml=true +elementdefinition.profile.xml=true +eligibilityrequest.profile.xml=true +eligibilityresponse.profile.xml=true +encounter.profile.xml=true +enrollmentrequest.profile.xml=true +enrollmentresponse.profile.xml=true +episodeofcare.profile.xml=true +explanationofbenefit.profile.xml=true +extension.profile.xml=true +familymemberhistory-genetic.profile.xml=true +familymemberhistory.profile.xml=true +flag.profile.xml=true +genetics.profile.xml=true +geneticsmockup.profile.xml=true +goal.profile.xml=true +group.profile.xml=true +hdlcholesterol.profile.xml=true +healthcareservice.profile.xml=true +humanname.profile.xml=true +id.profile.xml=true +identifier.profile.xml=true +imagingobjectselection.profile.xml=true +imagingstudy.profile.xml=true +immunization.profile.xml=true +immunizationrecommendation.profile.xml=true +implementationguide.profile.xml=true +instant.profile.xml=true +integer.profile.xml=true +ldlcholesterol.profile.xml=true +lipidprofile.profile.xml=true +list.profile.xml=true +location.profile.xml=true +markdown.profile.xml=true +measurereport.profile.xml=true +media.profile.xml=true +medication.profile.xml=true +medicationadministration.profile.xml=true +medicationdispense.profile.xml=true +medicationorder.profile.xml=true +medicationstatement.profile.xml=true +messageheader.profile.xml=true +meta.profile.xml=true +money.profile.xml=true +namingsystem.profile.xml=true +narrative.profile.xml=true +nutritionorder.profile.xml=true +observation.profile.xml=true +oid.profile.xml=true +operationdefinition.profile.xml=true +operationoutcome.profile.xml=true +order.profile.xml=true +orderresponse.profile.xml=true +organization.profile.xml=true +parameters.profile.xml=true +patient.profile.xml=true +paymentnotice.profile.xml=true +paymentreconciliation.profile.xml=true +period.profile.xml=true +person.profile.xml=true +positiveint.profile.xml=true +practitioner.profile.xml=true +procedure.profile.xml=true +procedurerequest.profile.xml=true +processrequest.profile.xml=true +processresponse.profile.xml=true +provenance.profile.xml=true +quantity.profile.xml=true +questionnaire.profile.xml=true +questionnaireanswers.profile.xml=true +questionnaireresponse.profile.xml=true +range.profile.xml=true +ratio.profile.xml=true +reference.profile.xml=true +referralrequest.profile.xml=true +relatedperson.profile.xml=true +resource.profile.xml=true +riskassessment.profile.xml=true +sampleddata.profile.xml=true +schedule.profile.xml=true +searchparameter.profile.xml=true +shareablevalueset.profile.xml=true +signature.profile.xml=true +simplequantity.profile.xml=true +slot.profile.xml=true +specimen.profile.xml=true +string.profile.xml=true +structuredefinition.profile.xml=true +subscription.profile.xml=true +substance.profile.xml=true +supplydelivery.profile.xml=true +supplyrequest.profile.xml=true +testscript.profile.xml=true +time.profile.xml=true +timing.profile.xml=true +triglyceride.profile.xml=true +unsignedint.profile.xml=true +uri.profile.xml=true +uuid.profile.xml=true +valueset.profile.xml=true +visionprescription.profile.xml=true +xdsdocumentmanifest.profile.xml=true +xdsdocumentreference.profile.xml=true +xhtml.profile.xml=true diff --git a/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/xhtml.profile.xml b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/xhtml.profile.xml new file mode 100644 index 00000000000..605ba9eaf05 --- /dev/null +++ b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile/xhtml.profile.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index 566d901943a..a3c63ac2459 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index e0284321e23..a55d4a5fbf0 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index afa97d77f1c..e5510285b58 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension/extension-definitions.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension/extension-definitions.xml index ae46959d0cd..c9b3ca4ff61 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension/extension-definitions.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension/extension-definitions.xml @@ -1,121276 +1,121256 @@ - - - - - - - - - - - - - - - - - - - - - - - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The clinical course of the disease (how the disease behaves over time), such as acute versus chronic."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The clinical course of the disease"/> - <definition value="The clinical course of the disease (how the disease behaves over time), such as acute versus chronic."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-diseaseCourse"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionCourse"/> - </extension> - <strength value="example"/> - <description value="Codes that describe the clinical course of the disease."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-course"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The clinical course of the disease"/> - <definition value="The clinical course of the disease (how the disease behaves over time), such as acute versus chronic."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-diseaseCourse"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionCourse"/> - </extension> - <strength value="example"/> - <description value="Codes that describe the clinical course of the disease."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-course"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-citizenship"/> - <resource> - <StructureDefinition> - <id value="patient-citizenship"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-citizenship"/> - <version value="4.1.0"/> - <name value="citizenship"/> - <title value="citizenship"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The patient's legal status as citizen of a country."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Nation(s) where the patient claims citizenship"/> - <definition value="The patient's legal status as citizen of a country."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Nation code of citizenship"/> - <definition value="Nation code representing the citizenship of patient."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:period"> - <path value="Extension.extension"/> - <sliceName value="period"/> - <short value="Time period of citizenship"/> - <definition value="Period when citizenship was effective."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:period.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:period.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:period.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="period"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:period.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Period"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-citizenship"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Nation(s) where the patient claims citizenship"/> - <definition value="The patient's legal status as citizen of a country."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Nation code of citizenship"/> - <definition value="Nation code representing the citizenship of patient."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:period"> - <path value="Extension.extension"/> - <sliceName value="period"/> - <short value="Time period of citizenship"/> - <definition value="Period when citizenship was effective."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:period.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:period.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="period"/> - </element> - <element id="Extension.extension:period.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Period"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-citizenship"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-management"/> - <resource> - <StructureDefinition> - <id value="openEHR-management"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-management"/> - <version value="4.1.0"/> - <name value="management"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Text description about the clinical management provided."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical Management Description"/> - <definition value="Text description about the clinical management provided."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-management"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical Management Description"/> - <definition value="Text description about the clinical management provided."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-management"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/11179-objectClass"/> - <resource> - <StructureDefinition> - <id value="11179-objectClass"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/11179-objectClass"/> - <version value="4.1.0"/> - <name value="objectClass"/> - <title value="Object Class"/> - <status value="draft"/> - <date value="2014-04-21"/> - <publisher value="Health Level Seven International (Orders and Observations)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="A concept that represents a set of ideas, abstractions, or things in the real world that can be identified with explicit boundaries and meaning and whose properties and behavior follow the same rules. It may be either a single concept or a group of associated concepts, abstractions, or things."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <uri value="http://metadata-standards.org/11179/"/> - <name value="ISO 11179"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.mapping"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Object Class"/> - <definition value="A concept that represents a set of ideas, abstractions, or things in the real world that can be identified with explicit boundaries and meaning and whose properties and behavior follow the same rules. It may be either a single concept or a group of associated concepts, abstractions, or things."/> - <comment value="ObjectClass and Property are treated as a data model that can be mapped to, like any other. This extension merely captures the ObjectClass element as a discrete code. The information conveyed here should also be conveyed in human-readable form in the mapping.map element."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.meaning.object_class"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-objectClass"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="11179ObjectClass"/> - </extension> - <strength value="example"/> - <description value="A concept that represents a set of ideas, abstractions, or things in the real world that can be identified with explicit boundaries and meaning and whose properties and behavior follow the same rules; e.g. Person, Prescription, Encounter, etc."/> - <valueSet value="http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclass"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Object Class"/> - <definition value="A concept that represents a set of ideas, abstractions, or things in the real world that can be identified with explicit boundaries and meaning and whose properties and behavior follow the same rules. It may be either a single concept or a group of associated concepts, abstractions, or things."/> - <comment value="ObjectClass and Property are treated as a data model that can be mapped to, like any other. This extension merely captures the ObjectClass element as a discrete code. The information conveyed here should also be conveyed in human-readable form in the mapping.map element."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.meaning.object_class"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-objectClass"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="11179ObjectClass"/> - </extension> - <strength value="example"/> - <description value="A concept that represents a set of ideas, abstractions, or things in the real world that can be identified with explicit boundaries and meaning and whose properties and behavior follow the same rules; e.g. Person, Prescription, Encounter, etc."/> - <valueSet value="http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclass"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/location-distance"/> - <resource> - <StructureDefinition> - <id value="location-distance"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/location-distance"/> - <version value="4.1.0"/> - <name value="location-distance"/> - <title value="Distance"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A calculated distance between the resource and a provided location."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.entry.search"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The distance this resource is from a provided location (geocode point)"/> - <definition value="A calculated distance between the resource and a provided location."/> - <comment value="This may be used with the Location.near/near-distance search parameter."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/location-distance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Distance"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The distance this resource is from a provided location (geocode point)"/> - <definition value="A calculated distance between the resource and a provided location."/> - <comment value="This may be used with the Location.near/near-distance search parameter."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/location-distance"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Distance"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-conceptOrder"/> - <resource> - <StructureDefinition> - <id value="valueset-conceptOrder"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-conceptOrder"/> - <version value="4.1.0"/> - <name value="conceptOrder"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet.expansion.contains"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Appearance order for user selection"/> - <definition value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-conceptOrder"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Appearance order for user selection"/> - <definition value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-conceptOrder"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory"/> - <resource> - <StructureDefinition> - <id value="questionnaire-displayCategory"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory"/> - <version value="4.1.0"/> - <name value="displayCategory"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Describes the intended purpose of the rendered text. For example - instructions, guidance on access control, maintenance information, etc."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type!='display'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Purpose of rendered text"/> - <definition value="Describes the intended purpose of the rendered text. For example - instructions, guidance on access control, maintenance information, etc."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireDisplayCategory"/> - </extension> - <strength value="extensible"/> - <description value="Identifies the purpose for a "display" item."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-display-category"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Purpose of rendered text"/> - <definition value="Describes the intended purpose of the rendered text. For example - instructions, guidance on access control, maintenance information, etc."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireDisplayCategory"/> - </extension> - <strength value="extensible"/> - <description value="Identifies the purpose for a "display" item."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-display-category"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"/> - <resource> - <StructureDefinition> - <id value="family-member-history-genetics-sibling"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"/> - <version value="4.1.0"/> - <name value="sibling"/> - <status value="draft"/> - <date value="2019-05-29"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Identifies a sibling of the relative."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="natural brother(s) & natural sister(s) - genetic & other"/> - <definition value="Identifies a sibling of the relative."/> - <comment value="Some cases may have complex inner-pedigree-tree relationship. For instance, double cousin relationship need two extra link with In pedigree tree itself. This can't be revealed by relationship to subject."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="sibling | brother | sister | etc."/> - <definition value="Distinguishes between different types of sibling relationships with varying granularity to support capturing the relationship "to the degree known"."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SiblingRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Sibling relationship types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/sibling-relationship-codes|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Link to sibling relative(s)"/> - <definition value="Points to the FamilyMemberHistory record of the relation who is the sibling of this relation."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:reference.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="natural brother(s) & natural sister(s) - genetic & other"/> - <definition value="Identifies a sibling of the relative."/> - <comment value="Some cases may have complex inner-pedigree-tree relationship. For instance, double cousin relationship need two extra link with In pedigree tree itself. This can't be revealed by relationship to subject."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="sibling | brother | sister | etc."/> - <definition value="Distinguishes between different types of sibling relationships with varying granularity to support capturing the relationship "to the degree known"."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SiblingRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Sibling relationship types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/sibling-relationship-codes|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Link to sibling relative(s)"/> - <definition value="Points to the FamilyMemberHistory record of the relation who is the sibling of this relation."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"/> - <resource> - <StructureDefinition> - <id value="hla-genotyping-results-method"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"/> - <version value="4.1.0"/> - <name value="method"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="The platform, methodology and software applied at the time of the genotyping."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The platform, methodology and software applied at the time of the genotyping"/> - <definition value="The platform, methodology and software applied at the time of the genotyping."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The platform, methodology and software applied at the time of the genotyping"/> - <definition value="The platform, methodology and software applied at the time of the genotyping."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace"/> - <resource> - <StructureDefinition> - <id value="patient-birthPlace"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace"/> - <version value="4.1.0"/> - <name value="birthPlace"/> - <title value="Birth Place"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The registered place of birth of the patient. A sytem may use the address.text if they don't store the birthPlace address in discrete elements."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Place of Birth for patient"/> - <definition value="The registered place of birth of the patient. A sytem may use the address.text if they don't store the birthPlace address in discrete elements."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Address"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Place of Birth for patient"/> - <definition value="The registered place of birth of the patient. A sytem may use the address.text if they don't store the birthPlace address in discrete elements."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Address"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsVariant"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsVariant"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsVariant"/> - <version value="4.1.0"/> - <name value="Variant"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Variant information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Variant"/> - <definition value="Variant information."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="HGVS nomenclature for observed DNA sequence variant"/> - <definition value="Human Genome Variation Society (HGVS) nomenclature for a single or set of DNA Sequence Variation(s) identified in testing. The use of the nomenclature is also used to describe non-variations (aka. wild types). LOINC Code: ([48004-6](http://loinc.org/48004-6))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ClinVar-variant-database"/> - </extension> - <strength value="preferred"/> - <description value="NCBI central repository of potentially clinically relevant variants."/> - <valueSet value="http://hl7.org/fhir/ValueSet/clinvar"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Id"> - <path value="Extension.extension"/> - <sliceName value="Id"/> - <short value="DNA sequence variant ID"/> - <definition value="Identifier for DNA sequence variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC) LOINC Code: ([48003-8](http://loinc.org/48003-8))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Id.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Id.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Id.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Id"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Id.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type"> - <path value="Extension.extension"/> - <sliceName value="Type"/> - <short value="DNA sequence variant type"/> - <definition value="Codified type for associated DNA sequence variant. DNA sequence variants use the HGVS notation, which implies the DNA sequence variant type. LOINC Code: ([48019-4](http://loinc.org/48019-4))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsVariant"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Variant"/> - <definition value="Variant information."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="HGVS nomenclature for observed DNA sequence variant"/> - <definition value="Human Genome Variation Society (HGVS) nomenclature for a single or set of DNA Sequence Variation(s) identified in testing. The use of the nomenclature is also used to describe non-variations (aka. wild types). LOINC Code: ([48004-6](http://loinc.org/48004-6))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ClinVar-variant-database"/> - </extension> - <strength value="preferred"/> - <description value="NCBI central repository of potentially clinically relevant variants."/> - <valueSet value="http://hl7.org/fhir/ValueSet/clinvar"/> - </binding> - </element> - <element id="Extension.extension:Id"> - <path value="Extension.extension"/> - <sliceName value="Id"/> - <short value="DNA sequence variant ID"/> - <definition value="Identifier for DNA sequence variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC) LOINC Code: ([48003-8](http://loinc.org/48003-8))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Id.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Id.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Id"/> - </element> - <element id="Extension.extension:Id.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:Type"> - <path value="Extension.extension"/> - <sliceName value="Type"/> - <short value="DNA sequence variant type"/> - <definition value="Codified type for associated DNA sequence variant. DNA sequence variants use the HGVS notation, which implies the DNA sequence variant type. LOINC Code: ([48019-4](http://loinc.org/48019-4))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Type"/> - </element> - <element id="Extension.extension:Type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsVariant"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-abatement"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"/> - <version value="4.1.0"/> - <name value="abatement"/> - <title value="abatement"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The date or estimated date that the allergy or intolerance resolved. This is called abatement because of the many overloaded connotations associated with resolution."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When the allergy or intolerance resolved"/> - <definition value="The date or estimated date that the allergy or intolerance resolved. This is called abatement because of the many overloaded connotations associated with resolution."/> - <comment value="Age is generally used when the patient reports an age at which the allergy or intolerance abated. If there is no abatement element, the clinicalStatus can be used to convey whether allergy or intolerance has resolved or not. When abatementString exists, it conveys that the allergy or intolerance is abated."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When the allergy or intolerance resolved"/> - <definition value="The date or estimated date that the allergy or intolerance resolved. This is called abatement because of the many overloaded connotations associated with resolution."/> - <comment value="Age is generally used when the patient reports an age at which the allergy or intolerance abated. If there is no abatement element, the clinicalStatus can be used to convey whether allergy or intolerance has resolved or not. When abatementString exists, it conveys that the allergy or intolerance is abated."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/medicationdispense-quantityRemaining"/> - <resource> - <StructureDefinition> - <id value="medicationdispense-quantityRemaining"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="phx"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/medicationdispense-quantityRemaining"/> - <version value="4.1.0"/> - <name value="quantityRemaining"/> - <title value="quantityRemaining"/> - <status value="draft"/> - <date value="2019-03-23"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The quanity left to be dispensed after a dispensing event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="MedicationDispense"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Quanity of medication left to be dispensed after a dispensing event"/> - <definition value="The quanity left to be dispensed after a dispensing event."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/medicationdispense-quantityRemaining"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="A fixed quantity (no comparator)"/> - <definition value="The comparator is not used on a SimpleQuantity"/> - <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Quantity"/> - <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/> - </type> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="qty-3"/> - <severity value="error"/> - <human value="If a code for the unit is present, the system SHALL also be present"/> - <expression value="code.empty() or system.exists()"/> - <xpath value="not(exists(f:code)) or exists(f:system)"/> - <source value="http://hl7.org/fhir/StructureDefinition/Quantity"/> - </constraint> - <constraint> - <key value="sqty-1"/> - <severity value="error"/> - <human value="The comparator is not used on a SimpleQuantity"/> - <expression value="comparator.empty()"/> - <xpath value="not(exists(f:comparator))"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="SN (see also Range) or CQ"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Quanity of medication left to be dispensed after a dispensing event"/> - <definition value="The quanity left to be dispensed after a dispensing event."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/medicationdispense-quantityRemaining"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Quantity"/> - <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/language"/> - <resource> - <StructureDefinition> - <id value="language"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/language"/> - <version value="4.1.0"/> - <name value="Human Language"/> - <title value="Human Language of the item"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The Human Language of the item."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName"/> - </context> - <context> - <type value="element"/> - <expression value="Address"/> - </context> - <context> - <type value="element"/> - <expression value="Annotation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Human Language for the item"/> - <definition value="The Human Language of the item."/> - <comment value="This is used where an item may repeat to indicate the language of each repeat."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/language"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Human Language for the item"/> - <definition value="The Human Language of the item."/> - <comment value="This is used where an item may repeat to indicate the language of each repeat."/> - <min value="1"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/language"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty"/> - <resource> - <StructureDefinition> - <id value="11179-objectClassProperty"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty"/> - <version value="4.1.0"/> - <name value="objectClassProperty"/> - <title value="Object Class Property"/> - <status value="draft"/> - <date value="2014-04-21"/> - <publisher value="Health Level Seven International (Orders and Observations)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="A quality common to all members of an object class. A property may be any feature that humans naturally use to distinguish one individual object from another. It is the human perception of a single quality of an object class in the real world. It is conceptual and thus has no particular associated means of representation by which the property can be communicated."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <uri value="http://metadata-standards.org/11179/"/> - <name value="ISO 11179"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.mapping"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Object Class Property"/> - <definition value="A quality common to all members of an object class. A property may be any feature that humans naturally use to distinguish one individual object from another. It is the human perception of a single quality of an object class in the real world. It is conceptual and thus has no particular associated means of representation by which the property can be communicated."/> - <comment value="ObjectClass and Property are treated as a data model that can be mapped to like any other. This extension merely captures the Property element as a discrete code. The information conveyed here should also be conveyed in human-readable form in the mapping.map element."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.meaning.property"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="11179ObjectClassProperty"/> - </extension> - <strength value="example"/> - <description value="A quality common to all members of an object class. A property may be any feature that humans naturally use to distinguish one individual object from another. It is the human perception of a single quality of an object class in the real world; e.g. name, identifier, gender, creationDate."/> - <valueSet value="http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclassproperty"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Object Class Property"/> - <definition value="A quality common to all members of an object class. A property may be any feature that humans naturally use to distinguish one individual object from another. It is the human perception of a single quality of an object class in the real world. It is conceptual and thus has no particular associated means of representation by which the property can be communicated."/> - <comment value="ObjectClass and Property are treated as a data model that can be mapped to like any other. This extension merely captures the Property element as a discrete code. The information conveyed here should also be conveyed in human-readable form in the mapping.map element."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.meaning.property"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="11179ObjectClassProperty"/> - </extension> - <strength value="example"/> - <description value="A quality common to all members of an object class. A property may be any feature that humans naturally use to distinguish one individual object from another. It is the human perception of a single quality of an object class in the real world; e.g. name, identifier, gender, creationDate."/> - <valueSet value="http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclassproperty"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-related"/> - <resource> - <StructureDefinition> - <id value="condition-related"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-related"/> - <version value="4.1.0"/> - <name value="related"/> - <title value="related"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="This condition has an unspecified relationship with another condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Conditions associated with this condition"/> - <definition value="This condition has an unspecified relationship with another condition."/> - <comment value="When the relationship is specified, use the more specific extension, such as condition-dueTo, condition-occurredFollowing, or condition-part of."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-related"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Conditions associated with this condition"/> - <definition value="This condition has an unspecified relationship with another condition."/> - <comment value="When the relationship is specified, use the more specific extension, such as condition-dueTo, condition-occurredFollowing, or condition-part of."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-related"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"/> - <resource> - <StructureDefinition> - <id value="data-absent-reason"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"/> - <version value="4.1.0"/> - <name value="Data Absent Reason"/> - <title value="Why value is missing"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Provides a reason why the expected value or elements in the element that is extended are missing."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="unknown | asked | temp | notasked | masked | unsupported | astext | error"/> - <definition value="Provides a reason why the expected value or elements in the element that is extended are missing."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ANY.nullFlavor"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataAbsentReason"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="Used to specify why the normally expected content of the data element is missing."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="unknown | asked | temp | notasked | masked | unsupported | astext | error"/> - <definition value="Provides a reason why the expected value or elements in the element that is extended are missing."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="ANY.nullFlavor"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataAbsentReason"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="Used to specify why the normally expected content of the data element is missing."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-postBox"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-postBox"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-postBox"/> - <version value="4.1.0"/> - <name value="ADXP-postBox"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A numbered box located in a post station."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="postBox"/> - <definition value="A numbered box located in a post station."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=POB]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-postBox"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="postBox"/> - <definition value="A numbered box located in a post station."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=POB]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-postBox"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-expression"/> - <resource> - <StructureDefinition> - <id value="valueset-expression"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-expression"/> - <version value="4.1.0"/> - <name value="expression"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="An expression that provides an alternative definition of the content of the value set. There are two different ways to use this expression extension: If both an expression and a compose element is present, the compose is understood the make the same statement as the expression. If there is no compose, the expression is the only definition of the value set, and the value set can only be processed by a server that understands the expression syntax, it that is computable."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An alternative computable expression of the value set content"/> - <definition value="An expression that provides an alternative definition of the content of the value set. There are two different ways to use this expression extension: If both an expression and a compose element is present, the compose is understood the make the same statement as the expression. If there is no compose, the expression is the only definition of the value set, and the value set can only be processed by a server that understands the expression syntax, it that is computable."/> - <comment value="The expression may be a reference or the actual expression, and ss expected to be a computable format (use the [rules-text extension](extension-valueset-rules-text.html) for a non-computable description)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expression"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Expression"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An alternative computable expression of the value set content"/> - <definition value="An expression that provides an alternative definition of the content of the value set. There are two different ways to use this expression extension: If both an expression and a compose element is present, the compose is understood the make the same statement as the expression. If there is no compose, the expression is the only definition of the value set, and the value set can only be processed by a server that understands the expression syntax, it that is computable."/> - <comment value="The expression may be a reference or the actual expression, and ss expected to be a computable format (use the [rules-text extension](extension-valueset-rules-text.html) for a non-computable description)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expression"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Expression"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/consent-Witness"/> - <resource> - <StructureDefinition> - <id value="consent-Witness"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="cbcc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/consent-Witness"/> - <version value="4.1.0"/> - <name value="Witness"/> - <title value="Witness"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - CBCC WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm"/> - </telecom> - </contact> - <description value="Any witness to the consent."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Consent"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Witness to Consent"/> - <definition value="Any witness to the consent."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-Witness"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Witness to Consent"/> - <definition value="Any witness to the consent."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-Witness"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare"/> - <resource> - <StructureDefinition> - <id value="workflow-episodeOfCare"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare"/> - <version value="4.1.0"/> - <name value="episodeOfCare"/> - <title value="Episode of Care"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="The episode(s) of care that establishes the context for this {{title}}."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceUseStatement"/> - </context> - <context> - <type value="element"/> - <expression value="AdverseEvent"/> - </context> - <context> - <type value="element"/> - <expression value="CarePlan"/> - </context> - <context> - <type value="element"/> - <expression value="ClinicalImpression"/> - </context> - <context> - <type value="element"/> - <expression value="Communication"/> - </context> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated Encounter episode of care"/> - <definition value="The episode(s) of care that establishes the context for this {{title}}."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship(typeCode=COMP].source[classCode<=PCPR, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated Encounter episode of care"/> - <definition value="The episode(s) of care that establishes the context for this {{title}}."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship(typeCode=COMP].source[classCode<=PCPR, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-careplan"/> - <resource> - <StructureDefinition> - <id value="openEHR-careplan"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-careplan"/> - <version value="4.1.0"/> - <name value="careplan"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Additional details about the clinical management provided for this Reaction Event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical Management Details"/> - <definition value="Additional details about the clinical management provided for this Reaction Event."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-careplan"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical Management Details"/> - <definition value="Additional details about the clinical management provided for this Reaction Event."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-careplan"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-summaryOf"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-summaryOf"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-summaryOf"/> - <version value="4.1.0"/> - <name value="summaryOf"/> - <title value="Summary Of"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A summary report that points to subordinate target reports."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Summary Of Other Reports"/> - <definition value="A summary report that points to subordinate target reports."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-summaryOf"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Summary Of Other Reports"/> - <definition value="A summary report that points to subordinate target reports."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-summaryOf"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/goal-reasonRejected"/> - <resource> - <StructureDefinition> - <id value="goal-reasonRejected"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/goal-reasonRejected"/> - <version value="4.1.0"/> - <name value="reasonRejected"/> - <title value="reason rejected"/> - <status value="draft"/> - <date value="2014-12-07"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir"/> - </telecom> - </contact> - <description value="The reason the goal was not accepted. Applies only if the status of the goal is rejected."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="qdm"/> - <uri value="http://www.healthit.gov/quality-data-model"/> - <name value="Quality Data Model"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Goal"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The reason the goal was not accepted"/> - <definition value="The reason the goal was not accepted. Applies only if the status of the goal is rejected."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="qdm"/> - <map value="negation rationale"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-reasonRejected"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The reason the goal was not accepted"/> - <definition value="The reason the goal was not accepted. Applies only if the status of the goal is rejected."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="qdm"/> - <map value="negation rationale"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-reasonRejected"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-no-warnings"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-fmm-no-warnings"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-no-warnings"/> - <version value="4.1.0"/> - <name value="fmm-no-warnings"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The FMM level that would be assigned to the artifact if it had no warnings."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="FMM Level (if no warnings)"/> - <definition value="The FMM level that would be assigned to the artifact if it had no warnings."/> - <comment value="If an artifact is higher than level 0, it must have no warnings from the resource/profile validator. This is the logical level that will apply once warnings have been resolved."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-no-warnings"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="FMM Level (if no warnings)"/> - <definition value="The FMM level that would be assigned to the artifact if it had no warnings."/> - <comment value="If an artifact is higher than level 0, it must have no warnings from the resource/profile validator. This is the logical level that will apply once warnings have been resolved."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-no-warnings"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-houseNumber"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"/> - <version value="4.1.0"/> - <name value="ADXP-houseNumber"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="houseNumber"/> - <definition value="The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNR]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="houseNumber"/> - <definition value="The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNR]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-expand-group"/> - <resource> - <StructureDefinition> - <id value="valueset-expand-group"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-expand-group"/> - <version value="4.1.0"/> - <name value="expand-group"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This extension declares a group of concepts that is generated into the ValueSet.expansion.contains hierarchy when the expansion is generated for a UI. THere is no inherent assigned meaning to the hierarchy; it is used to help the user navigate the concepts. Each group has a display and/or a code, and a list of members, which are either concepts in the value set, or other groups (by code)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Defines a hierarchy structure (when in UI mode)"/> - <definition value="This extension declares a group of concepts that is generated into the ValueSet.expansion.contains hierarchy when the expansion is generated for a UI. THere is no inherent assigned meaning to the hierarchy; it is used to help the user navigate the concepts. Each group has a display and/or a code, and a list of members, which are either concepts in the value set, or other groups (by code)."/> - <comment value="Note that there are inter-relationships between concept status/properties and the way the groups are built; these are described and documented in the (value set hierarchical example)[d.html]. Note that this extension should be ignored when the expansion is not generated for UI."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Underlying code from the system"/> - <definition value="A reference to a code from the include.system that defines the meaning associated with the group. Note that including the code in this extension does not include the code in the value set; if the code is intended to be in the value set, it must be listed directly as well."/> - <comment value="If there is no code, the group purely exists for display, and has no underlying meaning."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:display"> - <path value="Extension.extension"/> - <sliceName value="display"/> - <short value="Display for the group"/> - <definition value="The description for the group (goes in ValueSet.expansion.contains.dispaly). All groups need a display; this can only be omitted if there is a code that can be used to determine the display."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:display.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:display.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:display.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="display"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:display.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:member"> - <path value="Extension.extension"/> - <sliceName value="member"/> - <short value="Codes or other groups in this group"/> - <definition value="One of more codes that identify codes in the expansion or other groups."/> - <comment value="A group without a code can be included by giving it an id and using #[id] in place of the code."/> - <min value="1"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:member.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:member.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:member.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="member"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:member.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expand-group"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Defines a hierarchy structure (when in UI mode)"/> - <definition value="This extension declares a group of concepts that is generated into the ValueSet.expansion.contains hierarchy when the expansion is generated for a UI. THere is no inherent assigned meaning to the hierarchy; it is used to help the user navigate the concepts. Each group has a display and/or a code, and a list of members, which are either concepts in the value set, or other groups (by code)."/> - <comment value="Note that there are inter-relationships between concept status/properties and the way the groups are built; these are described and documented in the (value set hierarchical example)[d.html]. Note that this extension should be ignored when the expansion is not generated for UI."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Underlying code from the system"/> - <definition value="A reference to a code from the include.system that defines the meaning associated with the group. Note that including the code in this extension does not include the code in the value set; if the code is intended to be in the value set, it must be listed directly as well."/> - <comment value="If there is no code, the group purely exists for display, and has no underlying meaning."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - </element> - <element id="Extension.extension:display"> - <path value="Extension.extension"/> - <sliceName value="display"/> - <short value="Display for the group"/> - <definition value="The description for the group (goes in ValueSet.expansion.contains.dispaly). All groups need a display; this can only be omitted if there is a code that can be used to determine the display."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:display.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:display.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="display"/> - </element> - <element id="Extension.extension:display.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:member"> - <path value="Extension.extension"/> - <sliceName value="member"/> - <short value="Codes or other groups in this group"/> - <definition value="One of more codes that identify codes in the expansion or other groups."/> - <comment value="A group without a code can be included by giving it an id and using #[id] in place of the code."/> - <min value="1"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:member.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:member.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="member"/> - </element> - <element id="Extension.extension:member.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expand-group"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author"/> - <resource> - <StructureDefinition> - <id value="questionnaireresponse-author"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author"/> - <version value="4.1.0"/> - <name value="author"/> - <title value="Author"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Allows capturing, on a specific question or group of questions, exactly who was responsible for providing the answer(s)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse.item"/> - </context> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Who answered question/group"/> - <definition value="Allows capturing, on a specific question or group of questions, exactly who was responsible for providing the answer(s)."/> - <comment value="This should be drawn from one of the resources identified as an author of the QuestionnaireResponse overall."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="./participation[typeCode=SBJ]/role"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Who answered question/group"/> - <definition value="Allows capturing, on a specific question or group of questions, exactly who was responsible for providing the answer(s)."/> - <comment value="This should be drawn from one of the resources identified as an author of the QuestionnaireResponse overall."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="./participation[typeCode=SBJ]/role"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-search-parameter-combination"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement2-search-parameter-combination"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-search-parameter-combination"/> - <version value="4.1.0"/> - <name value="search-parameter-combination"/> - <title value="Search Parameter Combination"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.resource"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An allowable parameter combination"/> - <definition value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <comment value="For example, on the Patient Resource you could use this to state support for searching by Patient.name and Patient.gender is required."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:required"> - <path value="Extension.extension"/> - <sliceName value="required"/> - <short value="A required search parameter name"/> - <definition value="A search parameter name in the combination which is required."/> - <min value="1"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:required.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:required.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="required"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional"> - <path value="Extension.extension"/> - <sliceName value="optional"/> - <short value="An optional search parameter name"/> - <definition value="A search parameter name in the combination which is optional."/> - <comment value="If a defined parameter is not listed as a required or optional parameter, the implication is that the parameter is not supported with this combination. Servers may ignore It, though some may return an error if it is used."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:optional.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:optional.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="optional"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-search-parameter-combination"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An allowable parameter combination"/> - <definition value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <comment value="For example, on the Patient Resource you could use this to state support for searching by Patient.name and Patient.gender is required."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required"> - <path value="Extension.extension"/> - <sliceName value="required"/> - <short value="A required search parameter name"/> - <definition value="A search parameter name in the combination which is required."/> - <min value="1"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:required.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="required"/> - </element> - <element id="Extension.extension:required.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:optional"> - <path value="Extension.extension"/> - <sliceName value="optional"/> - <short value="An optional search parameter name"/> - <definition value="A search parameter name in the combination which is optional."/> - <comment value="If a defined parameter is not listed as a required or optional parameter, the implication is that the parameter is not supported with this combination. Servers may ignore It, though some may return an error if it is used."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:optional.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="optional"/> - </element> - <element id="Extension.extension:optional.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-search-parameter-combination"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqm-ValidityPeriod"/> - <resource> - <StructureDefinition> - <id value="cqm-ValidityPeriod"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sd"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqm-ValidityPeriod"/> - <version value="4.1.0"/> - <name value="ValidityPeriod"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - Clinical Quality Information WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/cqi/index.cfm"/> - </telecom> - </contact> - <description value="The period in which the catalog is valid."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Composition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Validity Period"/> - <definition value="The period in which the catalog is valid."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqm-ValidityPeriod"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Validity Period"/> - <definition value="The period in which the catalog is valid."/> - <min value="1"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqm-ValidityPeriod"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address"/> - <resource> - <StructureDefinition> - <id value="iso21090-TEL-address"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address"/> - <version value="4.1.0"/> - <name value="TEL-address"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A V3 compliant, RFC 3966 conformant URI version of the telephone or fax number."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ContactPoint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="RFC 3966 compliant telephone or fax number"/> - <definition value="A V3 compliant, RFC 3966 conformant URI version of the telephone or fax number."/> - <comment value="Note that this form is supposed to be used in CDA, but many CDA documents are not actually conformant."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="TEL.address"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="url"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="RFC 3966 compliant telephone or fax number"/> - <definition value="A V3 compliant, RFC 3966 conformant URI version of the telephone or fax number."/> - <comment value="Note that this form is supposed to be used in CDA, but many CDA documents are not actually conformant."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="TEL.address"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="url"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure"/> - <resource> - <StructureDefinition> - <id value="procedure-approachBodyStructure"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure"/> - <version value="4.1.0"/> - <name value="approachBodyStructure"/> - <title value="approachBodyStructure"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The approach body site used for this procedure. Multiple locations are allowed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceUseStatement"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The access point or points used for this procedure"/> - <definition value="The approach body site used for this procedure. Multiple locations are allowed."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The access point or points used for this procedure"/> - <definition value="The approach body site used for this procedure. Multiple locations are allowed."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-template-status"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-template-status"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-template-status"/> - <version value="4.1.0"/> - <name value="template-status"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Status code taken from [HL7 template specification](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=377) - allows for alignment with the template DSTU, and has more authoring status codes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Template Status Code (more authoring statuses)"/> - <definition value="Status code taken from [HL7 template specification](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=377) - allows for alignment with the template DSTU, and has more authoring status codes."/> - <comment value="The Profile status has the codes that are relevant to end-users/developers, while this extension has the codes used by profile developers."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-template-status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="TemplateStatusCode"/> - </extension> - <strength value="required"/> - <description value="The status indicates the level of maturity of the design and may be used to manage the use of the design."/> - <valueSet value="http://hl7.org/fhir/ValueSet/template-status-code|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Template Status Code (more authoring statuses)"/> - <definition value="Status code taken from [HL7 template specification](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=377) - allows for alignment with the template DSTU, and has more authoring status codes."/> - <comment value="The Profile status has the codes that are relevant to end-users/developers, while this extension has the codes used by profile developers."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-template-status"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="TemplateStatusCode"/> - </extension> - <strength value="required"/> - <description value="The status indicates the level of maturity of the design and may be used to manage the use of the design."/> - <valueSet value="http://hl7.org/fhir/ValueSet/template-status-code|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-deprecated"/> - <resource> - <StructureDefinition> - <id value="valueset-deprecated"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-deprecated"/> - <version value="4.1.0"/> - <name value="deprecated"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="if ture, indicates that the concept is deprecated from the value set - that is, it should not be used, and is planned to be withdrawn."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The concept should not be used"/> - <definition value="if ture, indicates that the concept is deprecated from the value set - that is, it should not be used, and is planned to be withdrawn."/> - <comment value="Ths status relates to a concept's inclusion in the value set, and might be different to the underlying status of the concept itself."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-deprecated"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The concept should not be used"/> - <definition value="if ture, indicates that the concept is deprecated from the value set - that is, it should not be used, and is planned to be withdrawn."/> - <comment value="Ths status relates to a concept's inclusion in the value set, and might be different to the underlying status of the concept itself."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-deprecated"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-summary"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary"/> - <version value="4.1.0"/> - <name value="summary"/> - <title value="summary"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Additional text for the summary presentation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional text for the summary presentation"/> - <definition value="Additional text for the summary presentation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional text for the summary presentation"/> - <definition value="Additional text for the summary presentation."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"/> - <resource> - <StructureDefinition> - <id value="DiagnosticReport-geneticsAssessedCondition"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"/> - <version value="4.1.0"/> - <name value="AssessedCondition"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Used to denote condition context for genetic testing, which may influence reported variants and interpretation for large genomic testing panels e.g. lung cancer or familial breast cancer."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="AssessedCondition"/> - <definition value="Used to denote condition context for genetic testing, which may influence reported variants and interpretation for large genomic testing panels e.g. lung cancer or familial breast cancer."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="AssessedCondition"/> - <definition value="Used to denote condition context for genetic testing, which may influence reported variants and interpretation for large genomic testing panels e.g. lung cancer or familial breast cancer."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-additionalLocator"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator"/> - <version value="4.1.0"/> - <name value="ADXP-additionalLocator"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="additionalLocator"/> - <definition value="This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=ADL]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="additionalLocator"/> - <definition value="This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=ADL]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-author"/> - <resource> - <StructureDefinition> - <id value="valueset-author"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-author"/> - <version value="4.1.0"/> - <name value="author"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The entity or set of entities that create and may modify the Value Set Definition content. The name of a group or an individual, along with contact details."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Entity/entities that create and may modify the Value Set"/> - <definition value="The entity or set of entities that create and may modify the Value Set Definition content. The name of a group or an individual, along with contact details."/> - <comment value="This can be any combination of groups or individuals. When known and actively maintained, this should be populated. The information included about the Author may include contact information."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-author"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="ContactDetail"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Entity/entities that create and may modify the Value Set"/> - <definition value="The entity or set of entities that create and may modify the Value Set Definition content. The name of a group or an individual, along with contact details."/> - <comment value="This can be any combination of groups or individuals. When known and actively maintained, this should be populated. The information included about the Author may include contact information."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-author"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="ContactDetail"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/specimen-specialHandling"/> - <resource> - <StructureDefinition> - <id value="specimen-specialHandling"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/specimen-specialHandling"/> - <version value="4.1.0"/> - <name value="specialHandling"/> - <title value="Special handling"/> - <status value="draft"/> - <date value="2015-02-19"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Special handling during the collection, transport, or storage of the specimen."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Specimen.collection"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Special handling of the specimen"/> - <definition value="Special handling during the collection, transport, or storage of the specimen."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-specialHandling"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Special handling of the specimen"/> - <definition value="Special handling during the collection, transport, or storage of the specimen."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-specialHandling"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-system"/> - <resource> - <StructureDefinition> - <id value="valueset-system"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-system"/> - <version value="4.1.0"/> - <name value="system"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Allows a direct reference to the code system for FHIR query."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.system"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system resource"/> - <definition value="Allows a direct reference to the code system for FHIR query."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-system"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CodeSystem"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system resource"/> - <definition value="Allows a direct reference to the code system for FHIR query."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-system"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CodeSystem"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-MPPS"/> - <resource> - <StructureDefinition> - <id value="auditevent-MPPS"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-MPPS"/> - <version value="4.1.0"/> - <name value="MPPS"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="An MPPS Instance UID associated with this entity."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="MPPS instance UID"/> - <definition value="An MPPS Instance UID associated with this entity."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="MPPS"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-MPPS"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Identifier"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="MPPS instance UID"/> - <definition value="An MPPS Instance UID associated with this entity."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="dicom"/> - <map value="MPPS"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-MPPS"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Identifier"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-bodyPosition"/> - <resource> - <StructureDefinition> - <id value="observation-bodyPosition"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-bodyPosition"/> - <version value="4.1.0"/> - <name value="bodyPosition"/> - <title value="bodyPosition"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="The position of the body when the observation was done, e.g. standing, sitting. To be used only when the body position in not precoordinated in the observation code."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="Specimen.collection"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The body position during the observation"/> - <definition value="The position of the body when the observation was done, e.g. standing, sitting. To be used only when the body position in not precoordinated in the observation code."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-bodyPosition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The body position during the observation"/> - <definition value="The position of the body when the observation was done, e.g. standing, sitting. To be used only when the body position in not precoordinated in the observation code."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-bodyPosition"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsDNARegionName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"/> - <version value="4.1.0"/> - <name value="DNARegionName"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="A human readable name for the region of interest. Typically Exon #, Intron # or other. NOTE: This is not standardized and is mainly for convenience and display purposes. LOINC Code: ([47999-8](http://loinc.org/47999-8))."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="DNA region name"/> - <definition value="A human readable name for the region of interest. Typically Exon #, Intron # or other. NOTE: This is not standardized and is mainly for convenience and display purposes. LOINC Code: ([47999-8](http://loinc.org/47999-8))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="DNA region name"/> - <definition value="A human readable name for the region of interest. Typically Exon #, Intron # or other. NOTE: This is not standardized and is mainly for convenience and display purposes. LOINC Code: ([47999-8](http://loinc.org/47999-8))."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-prohibited"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement-prohibited"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-prohibited"/> - <version value="4.1.0"/> - <name value="prohibited"/> - <title value="Conformance prohibition"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.interaction"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.operation"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.document"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.interaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Functionality not allowed"/> - <definition value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="true"/> - <isModifierReason value="If true, this extension inverts the meaning of the conformance statement"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-prohibited"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Functionality not allowed"/> - <definition value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <min value="0"/> - <max value="1"/> - <isModifier value="true"/> - <isModifierReason value="If true, this extension inverts the meaning of the conformance statement"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-prohibited"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-administration"/> - <resource> - <StructureDefinition> - <id value="openEHR-administration"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-administration"/> - <version value="4.1.0"/> - <name value="administration"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Link to an actual medication administration record with the full details of the administration, if a link is known."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Actual medication record, if known"/> - <definition value="Link to an actual medication administration record with the full details of the administration, if a link is known."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-administration"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Actual medication record, if known"/> - <definition value="Link to an actual medication administration record with the full details of the administration, if a link is known."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-administration"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired"/> - <resource> - <StructureDefinition> - <id value="patient-interpreterRequired"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired"/> - <version value="4.1.0"/> - <name value="interpreterRequired"/> - <title value="interpreterRequired"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This Patient requires an interpreter to communicate healthcare information to the practitioner."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether the patient needs an interpreter"/> - <definition value="This Patient requires an interpreter to communicate healthcare information to the practitioner."/> - <comment value="The Patient does not speak the default language of the organization, and hence requires an interpreter. If the patient has other languages in the Communications list, then that would be the type of interpreter required."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether the patient needs an interpreter"/> - <definition value="This Patient requires an interpreter to communicate healthcare information to the practitioner."/> - <comment value="The Patient does not speak the default language of the organization, and hence requires an interpreter. If the patient has other languages in the Communications list, then that would be the type of interpreter required."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/usagecontext-group"/> - <resource> - <StructureDefinition> - <id value="usagecontext-group"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/usagecontext-group"/> - <version value="4.1.0"/> - <name value="group"/> - <title value="Context Group"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Defines the group in which this usage context is a member. Multiple groups are "OR'ed", contexts within a group are "AND'ed"."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="UsageContext"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The group which this usage context is part of"/> - <definition value="Defines the group in which this usage context is a member. Multiple groups are "OR'ed", contexts within a group are "AND'ed"."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/usagecontext-group"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The group which this usage context is part of"/> - <definition value="Defines the group in which this usage context is a member. Multiple groups are "OR'ed", contexts within a group are "AND'ed"."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/usagecontext-group"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-resolutionAge"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge"/> - <version value="4.1.0"/> - <name value="resolutionAge"/> - <title value="resolutionAge"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The estimated patient age at which the allergy or intolerance resolved. Should be specified only if the status is resolved."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Age that the allergy or intolerance resolved"/> - <definition value="The estimated patient age at which the allergy or intolerance resolved. Should be specified only if the status is resolved."/> - <comment value="Removed Date since it is hard to imagine knowing the date an allergy abated. The assertion date is already captured."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Age"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Age that the allergy or intolerance resolved"/> - <definition value="The estimated patient age at which the allergy or intolerance resolved. Should be specified only if the status is resolved."/> - <comment value="Removed Date since it is hard to imagine knowing the date an allergy abated. The assertion date is already captured."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Age"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/rendering-markdown"/> - <resource> - <StructureDefinition> - <id value="rendering-markdown"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/rendering-markdown"/> - <version value="4.1.0"/> - <name value="markdown"/> - <status value="draft"/> - <date value="2014-04-23"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="This is an equivalent of the string on which the extension is sent, but includes additional markdown (see documentation about [markdown](datatypes.html#markdown). Note that using HTML [xhtml](extension-rendering-xhtml.html) can allow for greater precision of display."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="string"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="String equivalent with markdown"/> - <definition value="This is an equivalent of the string on which the extension is sent, but includes additional markdown (see documentation about [markdown](datatypes.html#markdown). Note that using HTML [xhtml](extension-rendering-xhtml.html) can allow for greater precision of display."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ED can be markdown content"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-markdown"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="String equivalent with markdown"/> - <definition value="This is an equivalent of the string on which the extension is sent, but includes additional markdown (see documentation about [markdown](datatypes.html#markdown). Note that using HTML [xhtml](extension-rendering-xhtml.html) can allow for greater precision of display."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="ED can be markdown content"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-markdown"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-streetName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"/> - <version value="4.1.0"/> - <name value="ADXP-streetName"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="streetName."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="streetName"/> - <definition value="streetName."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STR]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="streetName"/> - <definition value="streetName."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STR]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationType"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryInstallationType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationType"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryInstallationType"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationType"/> - <definition value="Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINST]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationType"/> - <definition value="Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINST]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-isCommonBinding"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"/> - <version value="4.1.0"/> - <name value="isCommonBinding"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Whether the binding is used on multiple resources, or only on this resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.binding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether used on multiple resources"/> - <definition value="Whether the binding is used on multiple resources, or only on this resource."/> - <comment value="Some bindings are defined once internally and used in many places. This extension marks those bindings, to allow for generating the binding information once when generating code. When isCommonBinding is true, bindingName will be the same, and unique (e.g. identify re-uses by looking at bindingName)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether used on multiple resources"/> - <definition value="Whether the binding is used on multiple resources, or only on this resource."/> - <comment value="Some bindings are defined once internally and used in many places. This extension marks those bindings, to allow for generating the binding information once when generating code. When isCommonBinding is true, bindingName will be the same, and unique (e.g. identify re-uses by looking at bindingName)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/consent-location"/> - <resource> - <StructureDefinition> - <id value="consent-location"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="cbcc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/consent-location"/> - <version value="4.1.0"/> - <name value="location"/> - <title value="Location of Access restriction"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - CBCC WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm"/> - </telecom> - </contact> - <description value="Restricts this exception to only apply a specific location as defined."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Consent.provision"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A location specific constraint"/> - <definition value="Restricts this exception to only apply a specific location as defined."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-location"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A location specific constraint"/> - <definition value="Restricts this exception to only apply a specific location as defined."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-location"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-censusTract"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract"/> - <version value="4.1.0"/> - <name value="ADXP-censusTract"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A geographic sub-unit delineated for demographic purposes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="censusTract"/> - <definition value="A geographic sub-unit delineated for demographic purposes."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=CEN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="censusTract"/> - <definition value="A geographic sub-unit delineated for demographic purposes."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=CEN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-secondaryFinding"/> - <resource> - <StructureDefinition> - <id value="observation-secondaryFinding"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-secondaryFinding"/> - <version value="4.1.0"/> - <name value="secondaryFinding"/> - <title value="Secondary Finding"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="Secondary findings are genetic test results that provide information about variants in a gene unrelated to the primary purpose for the testing, most often discovered when [Whole Exome Sequencing (WES)](https://en.wikipedia.org/wiki/Exome_sequencing) or [Whole Genome Sequencing (WGS)](https://en.wikipedia.org/wiki/Whole_genome_sequencing) is performed. This extension should be used to denote when a genetic finding is being shared as a secondary finding, and ideally refer to a corresponding guideline or policy statement. For more detail, please see: https://ghr.nlm.nih.gov/primer/testing/secondaryfindings."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Secondary findings are genetic test results that provide information about variants in a gene unrelated to the primary purpose for the testing, most often discovered when [Whole Exome Sequencing (WES)](https://en.wikipedia.org/wiki/Exome_sequencing) or [Whole Genome Sequencing (WGS)](https://en.wikipedia.org/wiki/Whole_genome_sequencing) is performed. This extension should be used to denote when a genetic finding is being shared as a secondary finding, and ideally refer to a corresponding guideline or policy statement. For more detail, please see: https://ghr.nlm.nih.gov/primer/testing/secondaryfindings"/> - <definition value="Secondary findings are genetic test results that provide information about variants in a gene unrelated to the primary purpose for the testing, most often discovered when [Whole Exome Sequencing (WES)](https://en.wikipedia.org/wiki/Exome_sequencing) or [Whole Genome Sequencing (WGS)](https://en.wikipedia.org/wiki/Whole_genome_sequencing) is performed. This extension should be used to denote when a genetic finding is being shared as a secondary finding, and ideally refer to a corresponding guideline or policy statement. For more detail, please see: https://ghr.nlm.nih.gov/primer/testing/secondaryfindings."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-secondaryFinding"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SecondaryFinding"/> - </extension> - <strength value="extensible"/> - <description value="Codes to denote a guideline or policy statement.when a genetic test result is being shared as a secondary finding."/> - <valueSet value="http://hl7.org/fhir/ValueSet/secondary-finding"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Secondary findings are genetic test results that provide information about variants in a gene unrelated to the primary purpose for the testing, most often discovered when [Whole Exome Sequencing (WES)](https://en.wikipedia.org/wiki/Exome_sequencing) or [Whole Genome Sequencing (WGS)](https://en.wikipedia.org/wiki/Whole_genome_sequencing) is performed. This extension should be used to denote when a genetic finding is being shared as a secondary finding, and ideally refer to a corresponding guideline or policy statement. For more detail, please see: https://ghr.nlm.nih.gov/primer/testing/secondaryfindings"/> - <definition value="Secondary findings are genetic test results that provide information about variants in a gene unrelated to the primary purpose for the testing, most often discovered when [Whole Exome Sequencing (WES)](https://en.wikipedia.org/wiki/Exome_sequencing) or [Whole Genome Sequencing (WGS)](https://en.wikipedia.org/wiki/Whole_genome_sequencing) is performed. This extension should be used to denote when a genetic finding is being shared as a secondary finding, and ideally refer to a corresponding guideline or policy statement. For more detail, please see: https://ghr.nlm.nih.gov/primer/testing/secondaryfindings."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-secondaryFinding"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SecondaryFinding"/> - </extension> - <strength value="extensible"/> - <description value="Codes to denote a guideline or policy statement.when a genetic test result is being shared as a secondary finding."/> - <valueSet value="http://hl7.org/fhir/ValueSet/secondary-finding"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"/> - <resource> - <StructureDefinition> - <id value="iso21090-AD-use"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"/> - <version value="4.1.0"/> - <name value="AD-use"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Uses of Addresses - codes not defined as part of Address.use."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="BAD | CONF | HP | HV | DIR | PUB | PHYS | PST"/> - <definition value="Uses of Addresses - codes not defined as part of Address.use."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="AD.use"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PostalAddressUse"/> - </extension> - <strength value="required"/> - <description value="Uses of an address not included in Address.use."/> - <valueSet value="http://hl7.org/fhir/ValueSet/postal-address-use|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="BAD | CONF | HP | HV | DIR | PUB | PHYS | PST"/> - <definition value="Uses of Addresses - codes not defined as part of Address.use."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="AD.use"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PostalAddressUse"/> - </extension> - <strength value="required"/> - <description value="Uses of an address not included in Address.use."/> - <valueSet value="http://hl7.org/fhir/ValueSet/postal-address-use|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/rendering-xhtml"/> - <resource> - <StructureDefinition> - <id value="rendering-xhtml"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/rendering-xhtml"/> - <version value="4.1.0"/> - <name value="xhtml"/> - <status value="draft"/> - <date value="2014-04-23"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="This is an equivalent of the string on which the extension is sent, but includes additional XHTML markup, such as bold, italics, styles, tables, etc. Existing [restrictions on XHTML content](narrative.html#security) apply. Note that using [markdown](extension-rendering-markdown.html) allows for greater flexibility of display."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="string"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="String equivalent with html markup"/> - <definition value="This is an equivalent of the string on which the extension is sent, but includes additional XHTML markup, such as bold, italics, styles, tables, etc. Existing [restrictions on XHTML content](narrative.html#security) apply. Note that using [markdown](extension-rendering-markdown.html) allows for greater flexibility of display."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ED can be XHTML content"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-xhtml"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="String equivalent with html markup"/> - <definition value="This is an equivalent of the string on which the extension is sent, but includes additional XHTML markup, such as bold, italics, styles, tables, etc. Existing [restrictions on XHTML content](narrative.html#security) apply. Note that using [markdown](extension-rendering-markdown.html) allows for greater flexibility of display."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="ED can be XHTML content"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-xhtml"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/> - <resource> - <StructureDefinition> - <id value="patient-mothersMaidenName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/> - <version value="4.1.0"/> - <name value="mothersMaidenName"/> - <title value="Mother's Maiden Name"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Mother's maiden (unmarried) name, commonly collected to help verify patient identity."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Mother's Maiden name"/> - <definition value="Mother's maiden (unmarried) name, commonly collected to help verify patient identity."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="PID-6"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="Role relationship to entity with maiden name (?)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Mother's Maiden name"/> - <definition value="Mother's maiden (unmarried) name, commonly collected to help verify patient identity."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="PID-6"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="Role relationship to entity with maiden name (?)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/translation"/> - <resource> - <StructureDefinition> - <id value="translation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/translation"/> - <version value="4.1.0"/> - <name value="Translation"/> - <title value="Translation"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Language translation from base language of resource to another language."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="string"/> - </context> - <context> - <type value="element"/> - <expression value="code"/> - </context> - <context> - <type value="element"/> - <expression value="markdown"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Language Translation (Localization)"/> - <definition value="Language translation from base language of resource to another language."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ST.translation"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:lang"> - <path value="Extension.extension"/> - <sliceName value="lang"/> - <short value="Code for Language"/> - <definition value="Code for Language."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:lang.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:lang.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:lang.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="lang"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:lang.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:content"> - <path value="Extension.extension"/> - <sliceName value="content"/> - <short value="Content in other Language"/> - <definition value="Content in other Language."/> - <comment value="The type (string or markdown) must match the context in which it is used."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:content.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:content.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:content.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="content"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:content.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/translation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Language Translation (Localization)"/> - <definition value="Language translation from base language of resource to another language."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ST.translation"/> - </mapping> - </element> - <element id="Extension.extension:lang"> - <path value="Extension.extension"/> - <sliceName value="lang"/> - <short value="Code for Language"/> - <definition value="Code for Language."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:lang.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:lang.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="lang"/> - </element> - <element id="Extension.extension:lang.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - </element> - <element id="Extension.extension:content"> - <path value="Extension.extension"/> - <sliceName value="content"/> - <short value="Content in other Language"/> - <definition value="Content in other Language."/> - <comment value="The type (string or markdown) must match the context in which it is used."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:content.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:content.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="content"/> - </element> - <element id="Extension.extension:content.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - <type> - <code value="markdown"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/translation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/goal-relationship"/> - <resource> - <StructureDefinition> - <id value="goal-relationship"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/goal-relationship"/> - <version value="4.1.0"/> - <name value="relationship"/> - <title value="related goal"/> - <status value="draft"/> - <date value="2014-12-07"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir"/> - </telecom> - </contact> - <description value="Establishes a relationship between this goal and other goals."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Goal"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Goals related to this Goal"/> - <definition value="Establishes a relationship between this goal and other goals."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="predecessor | successor | replacement | other"/> - <definition value="Identifies what kind of relationship exists between source and target goal."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalRelationshipType"/> - </extension> - <strength value="extensible"/> - <description value="Types of relationships between two goals."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-relationship-type"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:target"> - <path value="Extension.extension"/> - <sliceName value="target"/> - <short value="Related goal"/> - <definition value="The goal the relationship exists with."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:target.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:target.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:target.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="target"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:target.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-relationship"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Goals related to this Goal"/> - <definition value="Establishes a relationship between this goal and other goals."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="predecessor | successor | replacement | other"/> - <definition value="Identifies what kind of relationship exists between source and target goal."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalRelationshipType"/> - </extension> - <strength value="extensible"/> - <description value="Types of relationships between two goals."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-relationship-type"/> - </binding> - </element> - <element id="Extension.extension:target"> - <path value="Extension.extension"/> - <sliceName value="target"/> - <short value="Related goal"/> - <definition value="The goal the relationship exists with."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:target.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:target.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="target"/> - </element> - <element id="Extension.extension:target.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-relationship"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired"/> - <resource> - <StructureDefinition> - <id value="questionnaire-signatureRequired"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired"/> - <version value="4.1.0"/> - <name value="signatureRequired"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Indicates that a signature (of the specified type) is needed when completing the QuestionnaireResponse."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Is signature needed?"/> - <definition value="Indicates that a signature (of the specified type) is needed when completing the QuestionnaireResponse."/> - <comment value="If this appears at the Questionnaire level, then the signature will be gathered for the entire form when it is marked complete. If it appears on a particular item, then it will be gathered on that question or group when it is filled in. (E.g. seeking the user's initials beside certain questions.) The signature can be captured using the http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature extension."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SignatureRequired"/> - </extension> - <strength value="preferred"/> - <description value="The type of signature needed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/signature-type"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Is signature needed?"/> - <definition value="Indicates that a signature (of the specified type) is needed when completing the QuestionnaireResponse."/> - <comment value="If this appears at the Questionnaire level, then the signature will be gathered for the entire form when it is marked complete. If it appears on a particular item, then it will be gathered on that question or group when it is filled in. (E.g. seeking the user's initials beside certain questions.) The signature can be captured using the http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature extension."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SignatureRequired"/> - </extension> - <strength value="preferred"/> - <description value="The type of signature needed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/signature-type"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-doNotPerform"/> - <resource> - <StructureDefinition> - <id value="request-doNotPerform"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-doNotPerform"/> - <version value="4.1.0"/> - <name value="doNotPerform"/> - <title value="Do Not Perfom"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="If true indicates that the request is asking for the specified action to not occur."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="true if request is prohibiting action"/> - <definition value="If true indicates that the request is asking for the specified action to not occur."/> - <comment value="The attributes provided with the request qualify what is not to be done. For example, if an effectiveTime is provided, the "do not" request only applies within the specified time. If a performerType is specified then the "do not" request only applies to performers of that type. Qualifiers include: code, subject, occurrence, perormerType and performer. In some cases, the Request.code may pre-coordinate prohibition into the requested action. E.g. "NPO" (nothing by mouth), "DNR" (do not recussitate). If this happens, doNotPerform SHALL NOT be set to true. I.e. The resource shall not have double negation. (E.g. "Do not DNR")."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="true"/> - <isModifierReason value="If true this element negates the specified action. For Example, instead of a request for a procedure, it is a request for the procedure to not occur."/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-doNotPerform"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="true if request is prohibiting action"/> - <definition value="If true indicates that the request is asking for the specified action to not occur."/> - <comment value="The attributes provided with the request qualify what is not to be done. For example, if an effectiveTime is provided, the "do not" request only applies within the specified time. If a performerType is specified then the "do not" request only applies to performers of that type. Qualifiers include: code, subject, occurrence, perormerType and performer. In some cases, the Request.code may pre-coordinate prohibition into the requested action. E.g. "NPO" (nothing by mouth), "DNR" (do not recussitate). If this happens, doNotPerform SHALL NOT be set to true. I.e. The resource shall not have double negation. (E.g. "Do not DNR")."/> - <min value="0"/> - <max value="1"/> - <isModifier value="true"/> - <isModifierReason value="If true this element negates the specified action. For Example, instead of a request for a procedure, it is a request for the procedure to not occur."/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-doNotPerform"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-systemName"/> - <resource> - <StructureDefinition> - <id value="valueset-systemName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-systemName"/> - <version value="4.1.0"/> - <name value="systemName"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The human-readable name for the code system."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system name"/> - <definition value="The human-readable name for the code system."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-systemName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system name"/> - <definition value="The human-readable name for the code system."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-systemName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAllele"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsAllele"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAllele"/> - <version value="4.1.0"/> - <name value="Allele"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Allele information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Allele"/> - <definition value="Allele information."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="Name of allele"/> - <definition value="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). This element is the common name for the allele. LOINC Code: ([48008-7](http://loinc.org/48008-7))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EBI-AlleleName"/> - </extension> - <strength value="preferred"/> - <description value="EMBL-EBI database of AlleleName."/> - <valueSet value="http://hl7.org/fhir/ValueSet/allelename"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:State"> - <path value="Extension.extension"/> - <sliceName value="State"/> - <short value="The level of occurrence of a single DNA sequence variant within a set of chromosomes: Heteroplasmic / Homoplasmic / Homozygous / Heterozygous / Hemizygous"/> - <definition value="The level of occurrence of a single DNA Sequence Variant within a set of chromosomes. Heterozygous indicates the DNA sequence variant is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variant is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variant exists in the only single copy of a gene in a non-homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variant is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variant is present in all of the copies of mitochondrial DNA. LOINC Code: ([53034-5](http://loinc.org/53034-5))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:State.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:State.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:State.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="State"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:State.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Frequency"> - <path value="Extension.extension"/> - <sliceName value="Frequency"/> - <short value="Allele frequency"/> - <definition value="A physical quality which inheres to the allele by virtue of the number instances of the allele within a population. LOINC Code: ([81258-6](http://loinc.org/81258-6))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Frequency.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Frequency.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Frequency.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Frequency"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Frequency.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAllele"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Allele"/> - <definition value="Allele information."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="Name of allele"/> - <definition value="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). This element is the common name for the allele. LOINC Code: ([48008-7](http://loinc.org/48008-7))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EBI-AlleleName"/> - </extension> - <strength value="preferred"/> - <description value="EMBL-EBI database of AlleleName."/> - <valueSet value="http://hl7.org/fhir/ValueSet/allelename"/> - </binding> - </element> - <element id="Extension.extension:State"> - <path value="Extension.extension"/> - <sliceName value="State"/> - <short value="The level of occurrence of a single DNA sequence variant within a set of chromosomes: Heteroplasmic / Homoplasmic / Homozygous / Heterozygous / Hemizygous"/> - <definition value="The level of occurrence of a single DNA Sequence Variant within a set of chromosomes. Heterozygous indicates the DNA sequence variant is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variant is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variant exists in the only single copy of a gene in a non-homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variant is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variant is present in all of the copies of mitochondrial DNA. LOINC Code: ([53034-5](http://loinc.org/53034-5))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:State.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:State.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="State"/> - </element> - <element id="Extension.extension:State.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:Frequency"> - <path value="Extension.extension"/> - <sliceName value="Frequency"/> - <short value="Allele frequency"/> - <definition value="A physical quality which inheres to the allele by virtue of the number instances of the allele within a population. LOINC Code: ([81258-6](http://loinc.org/81258-6))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Frequency.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Frequency.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Frequency"/> - </element> - <element id="Extension.extension:Frequency.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAllele"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-duration"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration"/> - <version value="4.1.0"/> - <name value="duration"/> - <title value="duration"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The amount of time that the Adverse Reaction persisted."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="How long Manifestations persisted"/> - <definition value="The amount of time that the Adverse Reaction persisted."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="How long Manifestations persisted"/> - <definition value="The amount of time that the Adverse Reaction persisted."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/subscription-topic-url"/> - <resource> - <StructureDefinition> - <id value="subscription-topic-url"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/subscription-topic-url"/> - <version value="4.1.0"/> - <name value="subscription-topic-url"/> - <title value="Subscription Topic URL"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The URL for the Topic this notification relates to (local to server - not canonical)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.meta"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The URL for the Topic this notification relates to"/> - <definition value="The URL for the Topic this notification relates to (local to server - not canonical)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-topic-url"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="url"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The URL for the Topic this notification relates to"/> - <definition value="The URL for the Topic this notification relates to (local to server - not canonical)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-topic-url"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="url"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/rendering-style"/> - <resource> - <StructureDefinition> - <id value="rendering-style"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/rendering-style"/> - <version value="4.1.0"/> - <name value="style"/> - <status value="draft"/> - <date value="2014-04-23"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Identifies how the specified element should be rendered when displayed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Html style value"/> - <definition value="Identifies how the specified element should be rendered when displayed."/> - <comment value="This extension would be equivalent to setting the HTML "style" attribute on the root element for the element containing the extension."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-style"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Html style value"/> - <definition value="Identifies how the specified element should be rendered when displayed."/> - <comment value="This extension would be equivalent to setting the HTML "style" attribute on the root element for the element containing the extension."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-style"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-table-name"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name"/> - <version value="4.1.0"/> - <name value="table-name"/> - <title value="table name"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A name to use to show mappings of this type in the generated summary tables."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition.mapping"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Show mappings in the summary table with this name"/> - <definition value="A name to use to show mappings of this type in the generated summary tables."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Show mappings in the summary table with this name"/> - <definition value="A name to use to show mappings of this type in the generated summary tables."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-equivalence"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-equivalence"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-equivalence"/> - <version value="4.1.0"/> - <name value="equivalence"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The level of equivalence between the element containing the mapping and the element mapped to."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.mapping"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint"/> - <definition value="The level of equivalence between the element containing the mapping and the element mapped to."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-equivalence"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConceptMapEquivalence"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="The degree of equivalence between concepts."/> - <valueSet value="http://hl7.org/fhir/ValueSet/concept-map-equivalence|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint"/> - <definition value="The level of equivalence between the element containing the mapping and the element mapped to."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-equivalence"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConceptMapEquivalence"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="The degree of equivalence between concepts."/> - <valueSet value="http://hl7.org/fhir/ValueSet/concept-map-equivalence|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertaintyType"/> - <resource> - <StructureDefinition> - <id value="iso21090-uncertaintyType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertaintyType"/> - <version value="4.1.0"/> - <name value="uncertaintyType"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A code specifying the type of probability distribution for the uncertainty."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Quantity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Probability Distribution Type for uncertainty"/> - <definition value="A code specifying the type of probability distribution for the uncertainty."/> - <comment value="This is only meaningful if there is also an uncertainty extension. If there is an uncertainty extension with no type, this means that the probability distribution type is unknown. In that case, the uncertainty has the meaning of an informal guess."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="PPD.distributionType"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertaintyType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProbabilityDistributionType"/> - </extension> - <strength value="required"/> - <description value="Codes specifying the type of probability distribution."/> - <valueSet value="http://hl7.org/fhir/ValueSet/probability-distribution-type|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Probability Distribution Type for uncertainty"/> - <definition value="A code specifying the type of probability distribution for the uncertainty."/> - <comment value="This is only meaningful if there is also an uncertainty extension. If there is an uncertainty extension with no type, this means that the probability distribution type is unknown. In that case, the uncertainty has the meaning of an informal guess."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="PPD.distributionType"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertaintyType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProbabilityDistributionType"/> - </extension> - <strength value="required"/> - <description value="Codes specifying the type of probability distribution."/> - <valueSet value="http://hl7.org/fhir/ValueSet/probability-distribution-type|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature"/> - <resource> - <StructureDefinition> - <id value="questionnaireresponse-signature"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature"/> - <version value="4.1.0"/> - <name value="signature"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Represents a wet or electronic signature for either the form overall or for the question or item it's associated with."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse.item"/> - </context> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A signature attesting to the content"/> - <definition value="Represents a wet or electronic signature for either the form overall or for the question or item it's associated with."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Signature"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A signature attesting to the content"/> - <definition value="Represents a wet or electronic signature for either the form overall or for the question or item it's associated with."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Signature"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-assembly-order"/> - <resource> - <StructureDefinition> - <id value="humanname-assembly-order"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-assembly-order"/> - <version value="4.1.0"/> - <name value="assembly-order"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A code that represents the preferred display order of the components of this human name."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Preferred display order of name parts"/> - <definition value="A code that represents the preferred display order of the components of this human name."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-assembly-order"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HumanNameAssemblyOrder"/> - </extension> - <strength value="required"/> - <description value="A code that represents the preferred display order of the components of a human name."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-assembly-order|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Preferred display order of name parts"/> - <definition value="A code that represents the preferred display order of the components of this human name."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-assembly-order"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HumanNameAssemblyOrder"/> - </extension> - <strength value="required"/> - <description value="A code that represents the preferred display order of the components of a human name."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-assembly-order|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter"/> - <resource> - <StructureDefinition> - <id value="questionnaire-referenceFilter"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter"/> - <version value="4.1.0"/> - <name value="referenceFilter"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Identifies a filter to apply when looking up candidate answers for the question."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='reference'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Filter to apply when looking up references"/> - <definition value="Identifies a filter to apply when looking up candidate answers for the question."/> - <comment value="The filter may include $subj and/or $encounter which should be substituted by the implementer with the subject and/or encounter id relevant in the context in which the questionnaire is being populated."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Filter to apply when looking up references"/> - <definition value="Identifies a filter to apply when looking up candidate answers for the question."/> - <comment value="The filter may include $subj and/or $encounter which should be substituted by the implementer with the subject and/or encounter id relevant in the context in which the questionnaire is being populated."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-label"/> - <resource> - <StructureDefinition> - <id value="valueset-label"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-label"/> - <version value="4.1.0"/> - <name value="label"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet.expansion.contains"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-label"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-label"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/regex"/> - <resource> - <StructureDefinition> - <id value="regex"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/regex"/> - <version value="4.1.0"/> - <name value="regex"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="A regular expression that defines the syntax for the data element to be considered valid."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Regular expression pattern"/> - <definition value="A regular expression that defines the syntax for the data element to be considered valid."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/regex"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Regular expression pattern"/> - <definition value="A regular expression that defines the syntax for the data element to be considered valid."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/regex"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/http-response-header"/> - <resource> - <StructureDefinition> - <id value="http-response-header"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/http-response-header"/> - <version value="4.1.0"/> - <name value="http-response-header"/> - <title value="HTTP Response header"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="In a transaction, every single interaction can have multiple HTTP response headers returned as a result of the interaction."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.entry.response"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="HTTP header returned by the interaction"/> - <definition value="In a transaction, every single interaction can have multiple HTTP response headers returned as a result of the interaction."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/http-response-header"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="HTTP header returned by the interaction"/> - <definition value="In a transaction, every single interaction can have multiple HTTP response headers returned as a result of the interaction."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/http-response-header"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation"/> - <resource> - <StructureDefinition> - <id value="iso21090-EN-representation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation"/> - <version value="4.1.0"/> - <name value="EN-representation"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Name Representation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="ABC | IDE | SYL"/> - <definition value="Name Representation."/> - <comment value="The transcription of the name - how it is represented (for e.g. Japanese names)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.use"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="NameRepresentationUse"/> - </extension> - <strength value="required"/> - <description value="A set of codes for each different representation of a name."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-v3-representation|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="ABC | IDE | SYL"/> - <definition value="Name Representation."/> - <comment value="The transcription of the name - how it is represented (for e.g. Japanese names)."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.use"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="NameRepresentationUse"/> - </extension> - <strength value="required"/> - <description value="A set of codes for each different representation of a name."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-v3-representation|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-prohibited"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement2-prohibited"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-prohibited"/> - <version value="4.1.0"/> - <name value="prohibited"/> - <title value="Conformance prohibition"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.resource.interaction"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.resource.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.operation"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.interaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Functionality not allowed"/> - <definition value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="true"/> - <isModifierReason value="If true, this extension inverts the meaning of the conformance statement"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-prohibited"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Functionality not allowed"/> - <definition value="If set to true, indicates that support for the specified behavior would make a system non-conformant with the specification."/> - <min value="0"/> - <max value="1"/> - <isModifier value="true"/> - <isModifierReason value="If true, this extension inverts the meaning of the conformance statement"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-prohibited"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive"/> - <resource> - <StructureDefinition> - <id value="questionnaire-optionExclusive"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive"/> - <version value="4.1.0"/> - <name value="optionExclusive"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="If true, indicates that if this answerOption is selected, no other possible answers may be selected, even if the item is a repeating question."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item.answerOption"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Option is exclusive"/> - <definition value="If true, indicates that if this answerOption is selected, no other possible answers may be selected, even if the item is a repeating question."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Option is exclusive"/> - <definition value="If true, indicates that if this answerOption is selected, no other possible answers may be selected, even if the item is a repeating question."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-keyWord"/> - <resource> - <StructureDefinition> - <id value="codesystem-keyWord"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-keyWord"/> - <version value="4.1.0"/> - <name value="keyWord"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Descriptors and key terms for search"/> - <definition value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-keyWord"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Descriptors and key terms for search"/> - <definition value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-keyWord"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-careOf"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf"/> - <version value="4.1.0"/> - <name value="ADXP-careOf"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="careOf"/> - <definition value="The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=CAR]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="careOf"/> - <definition value="The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=CAR]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/timing-exact"/> - <resource> - <StructureDefinition> - <id value="timing-exact"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/timing-exact"/> - <version value="4.1.0"/> - <name value="exact"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - MnM WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/MnM"/> - </telecom> - </contact> - <description value="If true, indicates that the specified times, frequencies, periods are expected to be adhered to as precisely as possible. If false, indicates that a typical degree of variability based on institutional and/or patient convenience is acceptable."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Timing.repeat"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether specified times must be followed as closely as possible"/> - <definition value="If true, indicates that the specified times, frequencies, periods are expected to be adhered to as precisely as possible. If false, indicates that a typical degree of variability based on institutional and/or patient convenience is acceptable."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="GTS.IsFlexible"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-exact"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether specified times must be followed as closely as possible"/> - <definition value="If true, indicates that the specified times, frequencies, periods are expected to be adhered to as precisely as possible. If false, indicates that a typical degree of variability based on institutional and/or patient convenience is acceptable."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="GTS.IsFlexible"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-exact"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-workflowStatus"/> - <resource> - <StructureDefinition> - <id value="codesystem-workflowStatus"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-workflowStatus"/> - <version value="4.1.0"/> - <name value="workflowStatus"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Workflow Status is used to represent details of the value set development process while the value set has an Activity Status of Preliminary. The development of a value set often follows a formal workflow process from initiation to completion, and this element carries the state variable for this state machine. The assumption is that when first created a value set would have a workflow state of Draft. Additional workflow states may be used."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicates the state of development of the value set"/> - <definition value="Workflow Status is used to represent details of the value set development process while the value set has an Activity Status of Preliminary. The development of a value set often follows a formal workflow process from initiation to completion, and this element carries the state variable for this state machine. The assumption is that when first created a value set would have a workflow state of Draft. Additional workflow states may be used."/> - <comment value="The values that this element may assume include phrases that capture various stages in review and approval. In addition to the minimum of ???Draft???, these include ???Proposed???, ???Approved???, ???Ready to Publish???. There may be additional states defined by different developers. This is an optional element because the use of Activity Status ???Preliminary??? may be sufficient for some implementations."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-workflowStatus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicates the state of development of the value set"/> - <definition value="Workflow Status is used to represent details of the value set development process while the value set has an Activity Status of Preliminary. The development of a value set often follows a formal workflow process from initiation to completion, and this element carries the state variable for this state machine. The assumption is that when first created a value set would have a workflow state of Draft. Additional workflow states may be used."/> - <comment value="The values that this element may assume include phrases that capture various stages in review and approval. In addition to the minimum of ???Draft???, these include ???Proposed???, ???Approved???, ???Ready to Publish???. There may be additional states defined by different developers. This is an optional element because the use of Activity Status ???Preliminary??? may be sufficient for some implementations."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-workflowStatus"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-ruledOut"/> - <resource> - <StructureDefinition> - <id value="condition-ruledOut"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-ruledOut"/> - <version value="4.1.0"/> - <name value="ruledOut"/> - <title value="ruledOut"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Identifies what potential diagnoses have been ruled out for this condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Conditions ruled out for this condition"/> - <definition value="Identifies what potential diagnoses have been ruled out for this condition."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-ruledOut"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Conditions ruled out for this condition"/> - <definition value="Identifies what potential diagnoses have been ruled out for this condition."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-ruledOut"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-cdsHooksEndpoint"/> - <resource> - <StructureDefinition> - <id value="cqf-cdsHooksEndpoint"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-cdsHooksEndpoint"/> - <version value="4.1.0"/> - <name value="cdsHooksEndpoint"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="Specifies the URI of a CDS Hooks service that uses this PlanDefinition as its implementation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="PlanDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Surface this ECA Rule here"/> - <definition value="Specifies the URI of a CDS Hooks service that uses this PlanDefinition as its implementation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-cdsHooksEndpoint"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Surface this ECA Rule here"/> - <definition value="Specifies the URI of a CDS Hooks service that uses this PlanDefinition as its implementation."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-cdsHooksEndpoint"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue"/> - <resource> - <StructureDefinition> - <id value="questionnaire-sliderStepValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue"/> - <version value="4.1.0"/> - <name value="sliderStepValue"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="For slider-based controls, indicates the step size to use when toggling the control up or down."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='integer'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Increment value for slider"/> - <definition value="For slider-based controls, indicates the step size to use when toggling the control up or down."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Increment value for slider"/> - <definition value="For slider-based controls, indicates the step size to use when toggling the control up or down."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-baseType"/> - <resource> - <StructureDefinition> - <id value="questionnaire-baseType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-baseType"/> - <version value="4.1.0"/> - <name value="baseType"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="This identifies the underlying type in a profile, when a questionnaire is generated from a profile."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Base Type for answer"/> - <definition value="This identifies the underlying type in a profile, when a questionnaire is generated from a profile."/> - <comment value="The extension may assist a questionnaire renderer to tune the UI, and it guides a QuestionnaireResponse processor when generating resources from the responses."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-baseType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="A version specific list of the data types defined by the FHIR specification for use as an element type (any of the FHIR defined data types)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-types|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Base Type for answer"/> - <definition value="This identifies the underlying type in a profile, when a questionnaire is generated from a profile."/> - <comment value="The extension may assist a questionnaire renderer to tune the UI, and it guides a QuestionnaireResponse processor when generating resources from the responses."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-baseType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="A version specific list of the data types defined by the FHIR specification for use as an element type (any of the FHIR defined data types)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-types|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/device-implantStatus"/> - <resource> - <StructureDefinition> - <id value="device-implantStatus"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/device-implantStatus"/> - <version value="4.1.0"/> - <name value="implantStatus"/> - <title value="Status of Implantable Devices"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Codes to represent the functional status of a device implanted in a patient. Both overall device status and an implant status need to be considered. The implant status should only be used when the [device status](device-definitions.html#Device.status) is `active `."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Device"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Implant Status"/> - <definition value="Codes to represent the functional status of a device implanted in a patient. Both overall device status and an implant status need to be considered. The implant status should only be used when the [device status](device-definitions.html#Device.status) is `active `."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/device-implantStatus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Implant Status"/> - </extension> - <strength value="required"/> - <description value="A set codes that define the functional status of an implanted device."/> - <valueSet value="http://hl7.org/fhir/ValueSet/implantStatus|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Implant Status"/> - <definition value="Codes to represent the functional status of a device implanted in a patient. Both overall device status and an implant status need to be considered. The implant status should only be used when the [device status](device-definitions.html#Device.status) is `active `."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/device-implantStatus"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Implant Status"/> - </extension> - <strength value="required"/> - <description value="A set codes that define the functional status of an implanted device."/> - <valueSet value="http://hl7.org/fhir/ValueSet/implantStatus|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-category"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-category"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-category"/> - <version value="4.1.0"/> - <name value="category"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The category under which the resource type is presented on the official resource list."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Category from official resource list"/> - <definition value="The category under which the resource type is presented on the official resource list."/> - <comment value="To allow tools to follow the same structure for user convenience."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-category"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Category from official resource list"/> - <definition value="The category under which the resource type is presented on the official resource list."/> - <comment value="To allow tools to follow the same structure for user convenience."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-category"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-precinct"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"/> - <version value="4.1.0"/> - <name value="ADXP-precinct"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A subsection of a municipality."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="precinct"/> - <definition value="A subsection of a municipality."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=PRE]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="precinct"/> - <definition value="A subsection of a municipality."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=PRE]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/contactpoint-country"/> - <resource> - <StructureDefinition> - <id value="contactpoint-country"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/contactpoint-country"/> - <version value="4.1.0"/> - <name value="country"/> - <title value="Country Code"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The country code as defined by the ITU. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ContactPoint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Country code as defined by the ITU"/> - <definition value="The country code as defined by the ITU. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-country"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Country code as defined by the ITU"/> - <definition value="The country code as defined by the ITU. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-country"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-nationality"/> - <resource> - <StructureDefinition> - <id value="patient-nationality"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-nationality"/> - <version value="4.1.0"/> - <name value="nationality"/> - <title value="nationality"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The nationality of the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Nationality"/> - <definition value="The nationality of the patient."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Nationality Code"/> - <definition value="Code representing nationality of patient."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:period"> - <path value="Extension.extension"/> - <sliceName value="period"/> - <short value="Nationality Period"/> - <definition value="Period when nationality was effective."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:period.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:period.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:period.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="period"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:period.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Period"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-nationality"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Nationality"/> - <definition value="The nationality of the patient."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Nationality Code"/> - <definition value="Code representing nationality of patient."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:period"> - <path value="Extension.extension"/> - <sliceName value="period"/> - <short value="Nationality Period"/> - <definition value="Period when nationality was effective."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:period.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:period.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="period"/> - </element> - <element id="Extension.extension:period.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Period"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-nationality"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/contactpoint-area"/> - <resource> - <StructureDefinition> - <id value="contactpoint-area"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/contactpoint-area"/> - <version value="4.1.0"/> - <name value="area"/> - <title value="Area Code"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The area/zone/city code that, in some areas, may be omitted when dialing locally within the zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ContactPoint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Area/zone/city code"/> - <definition value="The area/zone/city code that, in some areas, may be omitted when dialing locally within the zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-area"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Area/zone/city code"/> - <definition value="The area/zone/city code that, in some areas, may be omitted when dialing locally within the zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-area"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival"/> - <resource> - <StructureDefinition> - <id value="encounter-modeOfArrival"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival"/> - <version value="4.1.0"/> - <name value="modeOfArrival"/> - <title value="modeOfArrival"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Identifies whether a patient arrives at the reporting facility via ambulance and the type of ambulance that was used."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Encounter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The method of arrival of the patient into the facility"/> - <definition value="Identifies whether a patient arrives at the reporting facility via ambulance and the type of ambulance that was used."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="modeOfArrival"/> - </extension> - <strength value="example"/> - <description value="The method that the patient arrived at the facility."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v2-0430"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The method of arrival of the patient into the facility"/> - <definition value="Identifies whether a patient arrives at the reporting facility via ambulance and the type of ambulance that was used."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="modeOfArrival"/> - </extension> - <strength value="example"/> - <description value="The method that the patient arrived at the facility."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v2-0430"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionPrefix"/> - <resource> - <StructureDefinition> - <id value="questionnaire-optionPrefix"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionPrefix"/> - <version value="4.1.0"/> - <name value="optionPrefix"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item.answerOption"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionPrefix"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionPrefix"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/> - <resource> - <StructureDefinition> - <id value="encounter-reasonCancelled"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/> - <version value="4.1.0"/> - <name value="reasonCancelled"/> - <title value="reasonCancelled"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="If the encountered was cancelled after it was planned, why? Applies only if the status is cancelled."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Encounter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Explanation for cancellation"/> - <definition value="If the encountered was cancelled after it was planned, why? Applies only if the status is cancelled."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Explanation for cancellation"/> - <definition value="If the encountered was cancelled after it was planned, why? Applies only if the status is cancelled."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/flag-detail"/> - <resource> - <StructureDefinition> - <id value="flag-detail"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/flag-detail"/> - <version value="4.1.0"/> - <name value="detail"/> - <title value="Flag details"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - Patient Care WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Points to the Observation, AllergyIntolerance or other record that provides additional supporting information about this flag."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Flag"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Resource with details for flag"/> - <definition value="Points to the Observation, AllergyIntolerance or other record that provides additional supporting information about this flag."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/flag-detail"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Resource with details for flag"/> - <definition value="Points to the Observation, AllergyIntolerance or other record that provides additional supporting information about this flag."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/flag-detail"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"/> - <resource> - <StructureDefinition> - <id value="maxDecimalPlaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"/> - <version value="4.1.0"/> - <name value="maxDecimalPlaces"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Identifies the maximum number of decimal places that may be specified for the data element."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum digits after decimal"/> - <definition value="Identifies the maximum number of decimal places that may be specified for the data element."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum digits after decimal"/> - <definition value="Identifies the maximum number of decimal places that may be specified for the data element."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/devicerequest-patientInstruction"/> - <resource> - <StructureDefinition> - <id value="devicerequest-patientInstruction"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/devicerequest-patientInstruction"/> - <version value="4.1.0"/> - <name value="patientInstruction"/> - <title value="Directions"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Simple concise instructions to be read by the patient. For example “twice a day” rather than “BID.”."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DeviceRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Patient Friendly Insructions"/> - <definition value="Simple concise instructions to be read by the patient. For example “twice a day” rather than “BID.”."/> - <comment value="Should use only common terms and sentences. Use of unfamiliar words and jargon should be avoided."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:lang"> - <path value="Extension.extension"/> - <sliceName value="lang"/> - <short value="Language"/> - <definition value="Code for Language."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:lang.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:lang.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:lang.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="lang"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:lang.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:content"> - <path value="Extension.extension"/> - <sliceName value="content"/> - <short value="Text"/> - <definition value="The actual text containing the instructions."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:content.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:content.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:content.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="content"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:content.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/devicerequest-patientInstruction"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Patient Friendly Insructions"/> - <definition value="Simple concise instructions to be read by the patient. For example “twice a day” rather than “BID.”."/> - <comment value="Should use only common terms and sentences. Use of unfamiliar words and jargon should be avoided."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:lang"> - <path value="Extension.extension"/> - <sliceName value="lang"/> - <short value="Language"/> - <definition value="Code for Language."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:lang.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:lang.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="lang"/> - </element> - <element id="Extension.extension:lang.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - </element> - <element id="Extension.extension:content"> - <path value="Extension.extension"/> - <sliceName value="content"/> - <short value="Text"/> - <definition value="The actual text containing the instructions."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:content.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:content.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="content"/> - </element> - <element id="Extension.extension:content.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/devicerequest-patientInstruction"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile"/> - <resource> - <StructureDefinition> - <id value="questionnaire-referenceProfile"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile"/> - <version value="4.1.0"/> - <name value="referenceProfile"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Where the type for a question is "Reference", indicates a profile that the resource instances pointed to in answers to this question must be valid against."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='reference'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Allowed profile for reference"/> - <definition value="Where the type for a question is "Reference", indicates a profile that the resource instances pointed to in answers to this question must be valid against."/> - <comment value="If multiple profiles are present, then the resource must be valid against at least one of them."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Allowed profile for reference"/> - <definition value="Where the type for a question is "Reference", indicates a profile that the resource instances pointed to in answers to this question must be valid against."/> - <comment value="If multiple profiles are present, then the resource must be valid against at least one of them."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-workflowStatus"/> - <resource> - <StructureDefinition> - <id value="valueset-workflowStatus"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-workflowStatus"/> - <version value="4.1.0"/> - <name value="workflowStatus"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Workflow Status is used to represent details of the value set development process while in a single Activity Status."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicates the state of development of the value set"/> - <definition value="Workflow Status is used to represent details of the value set development process while in a single Activity Status."/> - <comment value="The values that are traditionally used for this element while the Value Set Definition has an Activity Status of Preliminary are assumed to include phrases that capture various stages in review and approval. It is expected that this would be used to manage maintenance activities, but that a terminology service would not be expected to expose this information. Different services might adopt different workflow status values reflecting their local practices."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-workflowStatus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicates the state of development of the value set"/> - <definition value="Workflow Status is used to represent details of the value set development process while in a single Activity Status."/> - <comment value="The values that are traditionally used for this element while the Value Set Definition has an Activity Status of Preliminary are assumed to include phrases that capture various stages in review and approval. It is expected that this would be used to manage maintenance activities, but that a terminology service would not be expected to expose this information. Different services might adopt different workflow status values reflecting their local practices."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-workflowStatus"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-maxValueSet"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"/> - <version value="4.1.0"/> - <name value="maxValueSet"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The maximum allowable value set, for use when the binding strength is 'extensible' or 'preferred'. This value set is the value set from which additional codes can be taken from. This defines a 'required' binding over the top of the extensible binding."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.binding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum Value Set (when strength = extensible)"/> - <definition value="The maximum allowable value set, for use when the binding strength is 'extensible' or 'preferred'. This value set is the value set from which additional codes can be taken from. This defines a 'required' binding over the top of the extensible binding."/> - <comment value="Typically, this will be an entire code system, e.g. SNOMED CT. The maximum binding needs to include all the codes in the extensible or preferred binding."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum Value Set (when strength = extensible)"/> - <definition value="The maximum allowable value set, for use when the binding strength is 'extensible' or 'preferred'. This value set is the value set from which additional codes can be taken from. This defines a 'required' binding over the top of the extensible binding."/> - <comment value="Typically, this will be an entire code system, e.g. SNOMED CT. The maximum binding needs to include all the codes in the extensible or preferred binding."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-reference"/> - <resource> - <StructureDefinition> - <id value="valueset-reference"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-reference"/> - <version value="4.1.0"/> - <name value="reference"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A logical reference (e.g. a reference to ValueSet.url) that identifies the value set/version that identifies the set of possible coded values this coding was chosen from or constrained by."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Coding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Url of Value set the code was chosen from"/> - <definition value="A logical reference (e.g. a reference to ValueSet.url) that identifies the value set/version that identifies the set of possible coded values this coding was chosen from or constrained by."/> - <comment value="If this extension is used with an [extensible binding](terminologies.html#extensible), and the concept comes from outside the bound valueset, the value set SHALL be different from the bound valueset."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="CWE."/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="CD.valueSet/CD.valueSetVersion"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-reference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Url of Value set the code was chosen from"/> - <definition value="A logical reference (e.g. a reference to ValueSet.url) that identifies the value set/version that identifies the set of possible coded values this coding was chosen from or constrained by."/> - <comment value="If this extension is used with an [extensible binding](terminologies.html#extensible), and the concept comes from outside the bound valueset, the value set SHALL be different from the bound valueset."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="CWE."/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="CD.valueSet/CD.valueSetVersion"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-reference"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/entryFormat"/> - <resource> - <StructureDefinition> - <id value="entryFormat"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/entryFormat"/> - <version value="4.1.0"/> - <name value="entryFormat"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Additional instructions for the user to guide their input (i.e. a human readable version of a regular expression like "nnn-nnn-nnn"). In most UIs this is the placeholder (or 'ghost') text placed directly inside the edit controls and that disappear when the control gets the focus."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="User prompt for format"/> - <definition value="Additional instructions for the user to guide their input (i.e. a human readable version of a regular expression like "nnn-nnn-nnn"). In most UIs this is the placeholder (or 'ghost') text placed directly inside the edit controls and that disappear when the control gets the focus."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/entryFormat"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="User prompt for format"/> - <definition value="Additional instructions for the user to guide their input (i.e. a human readable version of a regular expression like "nnn-nnn-nnn"). In most UIs this is the placeholder (or 'ghost') text placed directly inside the edit controls and that disappear when the control gets the focus."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/entryFormat"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/organization-preferredContact"/> - <resource> - <StructureDefinition> - <id value="organization-preferredContact"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/organization-preferredContact"/> - <version value="4.1.0"/> - <name value="preferredContact"/> - <title value="Preferred Contact"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="This Contact is the preferred contact at this organization for the purpose of the contact There can be multiple contacts on an Organizations record with this value set to true, but these should all have different purpose values."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Organization.contact"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="This Contact is the preferred contact at this organization for the purpose of the contact There can be multiple contacts on an Organizations record with this value set to true, but these should all have different purpose values."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organization-preferredContact"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="This Contact is the preferred contact at this organization for the purpose of the contact There can be multiple contacts on an Organizations record with this value set to true, but these should all have different purpose values."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organization-preferredContact"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilities"/> - <resource> - <StructureDefinition> - <id value="capabilities"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities"/> - <version value="4.1.0"/> - <name value="capabilities"/> - <status value="active"/> - <date value="2018-02-15"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="A set of codes that defines what the server is capable of."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.security"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Server Capabilities"/> - <definition value="A set of codes that defines what the server is capable of."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SmartCapabilities"/> - </extension> - <strength value="required"/> - <description value="Codes that define what the server is capable of."/> - <valueSet value="http://hl7.org/fhir/ValueSet/smart-capabilities|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Server Capabilities"/> - <definition value="A set of codes that defines what the server is capable of."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SmartCapabilities"/> - </extension> - <strength value="required"/> - <description value="Codes that define what the server is capable of."/> - <valueSet value="http://hl7.org/fhir/ValueSet/smart-capabilities|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-map"/> - <resource> - <StructureDefinition> - <id value="valueset-map"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-map"/> - <version value="4.1.0"/> - <name value="map"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A concept map relevant to interpret this value set"/> - <definition value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <comment value="One use of this extension is to use it to include a partial concept map inside an expansion, only containing maps for the concepts included in this particular expansion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-map"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A concept map relevant to interpret this value set"/> - <definition value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <comment value="One use of this extension is to use it to include a partial concept map inside an expansion, only containing maps for the concepts included in this particular expansion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-map"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-Accession"/> - <resource> - <StructureDefinition> - <id value="auditevent-Accession"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-Accession"/> - <version value="4.1.0"/> - <name value="Accession"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="An Accession Number associated with this participant object."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Accession Number"/> - <definition value="An Accession Number associated with this participant object."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="Accession"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Accession"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Identifier"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Accession Number"/> - <definition value="An Accession Number associated with this participant object."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="dicom"/> - <map value="Accession"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Accession"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Identifier"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-selector"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-selector"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-selector"/> - <version value="4.1.0"/> - <name value="selector"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A FHIRPath statement that defines whether an element is in the slice."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="FHIRPath that defines the selection criteria for a slice"/> - <definition value="A FHIRPath statement that defines whether an element is in the slice."/> - <comment value="This extension can only appear on element definitions that are part of a set of slices, and not on the slicing definition itself. If the selector appears in the presence of nominated slices discriminators, then the slicing defined by the discriminator(s) and the selector on each slice must agree. In the absence of any nominated discriminators, then an element is allowed to be in multiple slices."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-selector"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="FHIRPath that defines the selection criteria for a slice"/> - <definition value="A FHIRPath statement that defines whether an element is in the slice."/> - <comment value="This extension can only appear on element definitions that are part of a set of slices, and not on the slicing definition itself. If the selector appears in the presence of nominated slices discriminators, then the slicing defined by the discriminator(s) and the selector on each slice must agree. In the absence of any nominated discriminators, then an element is allowed to be in multiple slices."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-selector"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/coding-sctdescid"/> - <resource> - <StructureDefinition> - <id value="coding-sctdescid"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/coding-sctdescid"/> - <version value="4.1.0"/> - <name value="sctdescid"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The SNOMED CT Description ID for the display."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Coding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="SNOMED CT Description ID"/> - <definition value="The SNOMED CT Description ID for the display."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/coding-sctdescid"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="id"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="SNOMED CT Description ID"/> - <definition value="The SNOMED CT Description ID for the display."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/coding-sctdescid"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="id"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-reasonRefuted"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted"/> - <version value="4.1.0"/> - <name value="reasonRefuted"/> - <title value="reasonRefuted"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A code capturing the explanation of why the allergy or intolerance has been refuted. Should be specified only if the status is refuted."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Explanation associated with refuted status"/> - <definition value="A code capturing the explanation of why the allergy or intolerance has been refuted. Should be specified only if the status is refuted."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Explanation associated with refuted status"/> - <definition value="A code capturing the explanation of why the allergy or intolerance has been refuted. Should be specified only if the status is refuted."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding"/> - <resource> - <StructureDefinition> - <id value="iso21090-SC-coding"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding"/> - <version value="4.1.0"/> - <name value="SC-coding"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Provides a coded expression for the content represented in a string."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="string"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="code for string"/> - <definition value="Provides a coded expression for the content represented in a string."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="SC.code"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StringCoding"/> - </extension> - <strength value="example"/> - <description value="A coded representation for a string. Could be codes for country in a country address part, codes for prefixes in a name part, etc."/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="code for string"/> - <definition value="Provides a coded expression for the content represented in a string."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="SC.code"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StringCoding"/> - </extension> - <strength value="example"/> - <description value="A coded representation for a string. Could be codes for country in a country address part, codes for prefixes in a name part, etc."/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/display"/> - <resource> - <StructureDefinition> - <id value="display"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/display"/> - <version value="4.1.0"/> - <name value="Display Name"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The title or other name to display when referencing a resource by canonical URL."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="canonical"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Display name for canonical reference"/> - <definition value="The title or other name to display when referencing a resource by canonical URL."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/display"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Display name for canonical reference"/> - <definition value="The title or other name to display when referencing a resource by canonical URL."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/display"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-label"/> - <resource> - <StructureDefinition> - <id value="codesystem-label"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-label"/> - <version value="4.1.0"/> - <name value="label"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-label"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. "(a)", "1.", etc."/> - <definition value="The label to list in front of a code when presenting a list of possible values in a questionnaire-like fashion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-label"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-trusted-expansion"/> - <resource> - <StructureDefinition> - <id value="valueset-trusted-expansion"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-trusted-expansion"/> - <version value="4.1.0"/> - <name value="trusted-expansion"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Indicates an authoritative source for performing value set expansions."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a trusted expansion"/> - <definition value="Indicates an authoritative source for performing value set expansions."/> - <comment value="If the designated "authoritative source" (as specified in the valueset-authoritativeSource extension, if present) is unable to provide a valid expansion, this extension indicates an alternate authoritative source where the value set expansion may be obtained."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-trusted-expansion"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a trusted expansion"/> - <definition value="Indicates an authoritative source for performing value set expansions."/> - <comment value="If the designated "authoritative source" (as specified in the valueset-authoritativeSource extension, if present) is unable to provide a valid expansion, this extension indicates an alternate authoritative source where the value set expansion may be obtained."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-trusted-expansion"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-use"/> - <resource> - <StructureDefinition> - <id value="iso21090-EN-use"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-use"/> - <version value="4.1.0"/> - <name value="EN-use"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A set of codes advising a system or user which name in a set of names to select for a given purpose."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A | ANON | I | P | R | C | M | ABC | IDE | SYL | OLD | DN | OR | PHON | SRCH | T"/> - <definition value="A set of codes advising a system or user which name in a set of names to select for a given purpose."/> - <comment value="A name without specific use code might be a default name useful for any purpose, but a name with a specific use code would be preferred for that respective purpose."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.use"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-use"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EntityNameUse"/> - </extension> - <strength value="required"/> - <description value="A set of codes advising a system or user which name in a set of names to select for a given purpose."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-EntityNameUseR2|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A | ANON | I | P | R | C | M | ABC | IDE | SYL | OLD | DN | OR | PHON | SRCH | T"/> - <definition value="A set of codes advising a system or user which name in a set of names to select for a given purpose."/> - <comment value="A name without specific use code might be a default name useful for any purpose, but a name with a specific use code would be preferred for that respective purpose."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.use"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-use"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EntityNameUse"/> - </extension> - <strength value="required"/> - <description value="A set of codes advising a system or user which name in a set of names to select for a given purpose."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-EntityNameUseR2|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-expirationDate"/> - <resource> - <StructureDefinition> - <id value="valueset-expirationDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-expirationDate"/> - <version value="4.1.0"/> - <name value="expirationDate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value SHALL present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version should no longer be used"/> - <definition value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value SHALL present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <comment value="Upon reaching the Expiration Date, the value set Activity Status should be consdiered as inactive. An Inactive value set version may no longer be used to create new content, but it may be used to evaluate content created prior to the Expiration Date."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expirationDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version should no longer be used"/> - <definition value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value SHALL present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <comment value="Upon reaching the Expiration Date, the value set Activity Status should be consdiered as inactive. An Inactive value set version may no longer be used to create new content, but it may be used to evaluate content created prior to the Expiration Date."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expirationDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-reasonCode"/> - <resource> - <StructureDefinition> - <id value="workflow-reasonCode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-reasonCode"/> - <version value="4.1.0"/> - <name value="reasonCode"/> - <title value="Reason Code"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Describes why the event occurred in coded or textual form."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Why was event performed?"/> - <definition value="Describes why the event occurred in coded or textual form."/> - <comment value="For free text (uncoded data) use reasonCode.text."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.reasonCode"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.4 or by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".reasonCode"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-reasonCode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EventReason"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-cause"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Why was event performed?"/> - <definition value="Describes why the event occurred in coded or textual form."/> - <comment value="For free text (uncoded data) use reasonCode.text."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.reasonCode"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.4 or by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".reasonCode"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-reasonCode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EventReason"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-cause"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-relatedArtifact"/> - <resource> - <StructureDefinition> - <id value="workflow-relatedArtifact"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-relatedArtifact"/> - <version value="4.1.0"/> - <name value="relatedArtifact"/> - <title value="Related Artifact"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Documentation or 'knowledge artifacts' relevant to the base resource such as citations, supporting evidence, documentation of processes, caveats around testing methodology."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Documentation relevant to the 'parent' resource"/> - <definition value="Documentation or 'knowledge artifacts' relevant to the base resource such as citations, supporting evidence, documentation of processes, caveats around testing methodology."/> - <comment value="Note that in contrast this extension, the [supportingInfo extension](extension-workflow-supportinginfo.html) references other resources *from the patient record* that were used in creating the resource."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-relatedArtifact"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="RelatedArtifact"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Documentation relevant to the 'parent' resource"/> - <definition value="Documentation or 'knowledge artifacts' relevant to the base resource such as citations, supporting evidence, documentation of processes, caveats around testing methodology."/> - <comment value="Note that in contrast this extension, the [supportingInfo extension](extension-workflow-supportinginfo.html) references other resources *from the patient record* that were used in creating the resource."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-relatedArtifact"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="RelatedArtifact"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments"/> - <resource> - <StructureDefinition> - <id value="codesystem-concept-comments"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments"/> - <version value="4.1.0"/> - <name value="concept-comments"/> - <title value="Comment"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Comment about the use of this code in this context"/> - <definition value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Comment about the use of this code in this context"/> - <definition value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-codegen-super"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super"/> - <version value="4.1.0"/> - <name value="codegen-super"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A specific instruction to use an intermediate parent class when generating code for the classes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition.baseDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Use a different base when generating code"/> - <definition value="A specific instruction to use an intermediate parent class when generating code for the classes."/> - <comment value="This can be useful when setting up special common ancestor classes for shared code. At present the only use for this is for the special MetadataResource pattern."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Use a different base when generating code"/> - <definition value="A specific instruction to use an intermediate parent class when generating code for the classes."/> - <comment value="This can be useful when setting up special common ancestor classes for shared code. At present the only use for this is for the special MetadataResource pattern."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-timeOffset"/> - <resource> - <StructureDefinition> - <id value="observation-timeOffset"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-timeOffset"/> - <version value="4.1.0"/> - <name value="timeOffset"/> - <title value="Time-offset"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="A specific offset time in milliseconds from the stated time in the Observation.appliesDateTime to allow for representation of sequential recording of sampled data from the same lead or data stream. For example, an ECG recorder may record sequentially 3 leads four time to receive 12-lead ECG, see [ISO 22077](https://www.iso.org/obp/ui/#iso:std:61871:en)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation.component"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Time Offset for interlacing"/> - <definition value="A specific offset time in milliseconds from the stated time in the Observation.appliesDateTime to allow for representation of sequential recording of sampled data from the same lead or data stream. For example, an ECG recorder may record sequentially 3 leads four time to receive 12-lead ECG, see [ISO 22077](https://www.iso.org/obp/ui/#iso:std:61871:en)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-timeOffset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Time Offset for interlacing"/> - <definition value="A specific offset time in milliseconds from the stated time in the Observation.appliesDateTime to allow for representation of sequential recording of sampled data from the same lead or data stream. For example, an ECG recorder may record sequentially 3 leads four time to receive 12-lead ECG, see [ISO 22077](https://www.iso.org/obp/ui/#iso:std:61871:en)."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-timeOffset"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle"/> - <resource> - <StructureDefinition> - <id value="timing-daysOfCycle"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle"/> - <version value="4.1.0"/> - <name value="daysOfCycle"/> - <title value="Days of Cycle"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - MnM WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/MnM"/> - </telecom> - </contact> - <description value="Days of a possibly repeating cycle on which the action is to be performed. The cycle is defined by the first action with a timing element that is a parent of the daysOfCycle."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="PlanDefinition.action"/> - </context> - <context> - <type value="element"/> - <expression value="RequestGroup.action"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Days on which the action should be performed"/> - <definition value="Days of a possibly repeating cycle on which the action is to be performed. The cycle is defined by the first action with a timing element that is a parent of the daysOfCycle."/> - <comment value="The cycle is defined by a parent/containing action, and the daysOfCycle extension is used on individual actions within that cycle to indicate the days of the cycle on which the actions should be performed."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:day"> - <path value="Extension.extension"/> - <sliceName value="day"/> - <short value="What day to perform"/> - <definition value="An integer that specifies a day on which the action is to be performed (starting at one). In most cases, the first day of the first cycle will be day 1."/> - <min value="1"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:day.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:day.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:day.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="day"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:day.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Days on which the action should be performed"/> - <definition value="Days of a possibly repeating cycle on which the action is to be performed. The cycle is defined by the first action with a timing element that is a parent of the daysOfCycle."/> - <comment value="The cycle is defined by a parent/containing action, and the daysOfCycle extension is used on individual actions within that cycle to indicate the days of the cycle on which the actions should be performed."/> - <min value="1"/> - <max value="1"/> - </element> - <element id="Extension.extension:day"> - <path value="Extension.extension"/> - <sliceName value="day"/> - <short value="What day to perform"/> - <definition value="An integer that specifies a day on which the action is to be performed (starting at one). In most cases, the first day of the first cycle will be day 1."/> - <min value="1"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:day.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:day.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="day"/> - </element> - <element id="Extension.extension:day.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-expectation"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement2-expectation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-expectation"/> - <version value="4.1.0"/> - <name value="expectation"/> - <title value="Conformance expectation"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="Defines the level of expectation associated with a given system capability."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.resource.interaction"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.resource.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.operation"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest.interaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="SHALL | SHOULD | MAY |SHOULD-NOT"/> - <definition value="Defines the level of expectation associated with a given system capability."/> - <comment value="If "SHALL NOT" is desired, use the "prohibited" modifier extension. This extension should only be used with CapabilityStatement2s documenting requirements, not those documenting actual system capabilities."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-expectation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceExpectation"/> - </extension> - <strength value="required"/> - <description value="Indicates the degree of adherence to a specified behavior or capability expected for a system to be deemed conformant with a specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/conformance-expectation|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="SHALL | SHOULD | MAY |SHOULD-NOT"/> - <definition value="Defines the level of expectation associated with a given system capability."/> - <comment value="If "SHALL NOT" is desired, use the "prohibited" modifier extension. This extension should only be used with CapabilityStatement2s documenting requirements, not those documenting actual system capabilities."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-expectation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceExpectation"/> - </extension> - <strength value="required"/> - <description value="Indicates the degree of adherence to a specified behavior or capability expected for a system to be deemed conformant with a specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/conformance-expectation|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-hierarchy"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"/> - <version value="4.1.0"/> - <name value="hierarchy"/> - <title value="Hierarchy"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="For circular references (references back to the same type of resource): whether they are allowed to transitively point back to the same instance (false), or whether the relationship must be a strict one-way hierarchy (true)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.type"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether a circular reference is allowed to (transitively) point back to the same instance"/> - <definition value="For circular references (references back to the same type of resource): whether they are allowed to transitively point back to the same instance (false), or whether the relationship must be a strict one-way hierarchy (true)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether a circular reference is allowed to (transitively) point back to the same instance"/> - <definition value="For circular references (references back to the same type of resource): whether they are allowed to transitively point back to the same instance (false), or whether the relationship must be a strict one-way hierarchy (true)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-insurance"/> - <resource> - <StructureDefinition> - <id value="request-insurance"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-insurance"/> - <version value="4.1.0"/> - <name value="insurance"/> - <title value="Insurance"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated insurance coverage"/> - <definition value="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="IN1/IN2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=COVBY].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-insurance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Coverage"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated insurance coverage"/> - <definition value="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="IN1/IN2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=COVBY].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-insurance"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Coverage"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDuration"/> - <resource> - <StructureDefinition> - <id value="openEHR-exposureDuration"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDuration"/> - <version value="4.1.0"/> - <name value="exposureDuration"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="The amount of time the individual was exposed to the Substance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Amount of time individual was exposed to Substance"/> - <definition value="The amount of time the individual was exposed to the Substance."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDuration"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Amount of time individual was exposed to Substance"/> - <definition value="The amount of time the individual was exposed to the Substance."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDuration"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation"/> - <resource> - <StructureDefinition> - <id value="questionnaire-choiceOrientation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation"/> - <version value="4.1.0"/> - <name value="choiceOrientation"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Identifies the desired orientation when rendering a list of choices (typically radio-box or check-box lists)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='choice' or type='open-choice'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="horizontal | vertical"/> - <definition value="Identifies the desired orientation when rendering a list of choices (typically radio-box or check-box lists)."/> - <comment value="Systems may choose to wrap answers rather than attempting to display them all in one row or column. Language conventions may determine the order in which the choices are listed (left-to-right or right-to-left, etc.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ChoiceListOrientation"/> - </extension> - <strength value="required"/> - <description value="Direction in which lists of possible answers should be displayed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/choice-list-orientation|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="horizontal | vertical"/> - <definition value="Identifies the desired orientation when rendering a list of choices (typically radio-box or check-box lists)."/> - <comment value="Systems may choose to wrap answers rather than attempting to display them all in one row or column. Language conventions may determine the order in which the choices are listed (left-to-right or right-to-left, etc.)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ChoiceListOrientation"/> - </extension> - <strength value="required"/> - <description value="Direction in which lists of possible answers should be displayed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/choice-list-orientation|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/composition-section-subject"/> - <resource> - <StructureDefinition> - <id value="composition-section-subject"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sd"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/composition-section-subject"/> - <version value="4.1.0"/> - <name value="section-subject"/> - <title value="Overrides Composition.subject"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Specifies that the section has a different subject that the Composition, or it's container section."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Composition.section"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Section has a different subject that it's container"/> - <definition value="Specifies that the section has a different subject that the Composition, or it's container section."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-section-subject"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Section has a different subject that it's container"/> - <definition value="Specifies that the section has a different subject that the Composition, or it's container section."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-section-subject"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameType"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-streetNameType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameType"/> - <version value="4.1.0"/> - <name value="ADXP-streetNameType"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="streetNameType"/> - <definition value="The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STTYP]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="streetNameType"/> - <definition value="The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STTYP]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-authoritativeSource"/> - <resource> - <StructureDefinition> - <id value="valueset-authoritativeSource"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-authoritativeSource"/> - <version value="4.1.0"/> - <name value="authoritativeSource"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A reference to the authoritative accessible, persisted source of truth of the entire Value Set Definition, including textual information and available versions."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to the current trusted source of the ValueSet resource (metadata and definition)"/> - <definition value="A reference to the authoritative accessible, persisted source of truth of the entire Value Set Definition, including textual information and available versions."/> - <comment value="If this extension is not present, then the canonical URL (ValueSet.url) also serves the purpose of specifying the authoritative source. A difference between the canonical URL and the authoritiative source might arise in some cases due to ongoing organization restructuring, etc., and in those cases this extension may be used. The URL of the authoritative source is intended to be resolvable but that cannot be guaranteed. The designated "authoritative source" is normally expected to be able to generate a valid expansion of the value set, and if for some reason it cannot then the valueset-trusted-expansion should be used."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-authoritativeSource"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to the current trusted source of the ValueSet resource (metadata and definition)"/> - <definition value="A reference to the authoritative accessible, persisted source of truth of the entire Value Set Definition, including textual information and available versions."/> - <comment value="If this extension is not present, then the canonical URL (ValueSet.url) also serves the purpose of specifying the authoritative source. A difference between the canonical URL and the authoritiative source might arise in some cases due to ongoing organization restructuring, etc., and in those cases this extension may be used. The URL of the authoritative source is intended to be resolvable but that cannot be guaranteed. The designated "authoritative source" is normally expected to be able to generate a valid expansion of the value set, and if for some reason it cannot then the valueset-trusted-expansion should be used."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-authoritativeSource"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/medicationdispense-refillsRemaining"/> - <resource> - <StructureDefinition> - <id value="medicationdispense-refillsRemaining"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="phx"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/medicationdispense-refillsRemaining"/> - <version value="4.1.0"/> - <name value="refillsRemaining"/> - <title value="refillsRemaining"/> - <status value="draft"/> - <date value="2019-03-23"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The number of refills allowed or remaining after a dispensing event. Does not include the current dispense."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="MedicationDispense"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Number of refills allowed or remaining after a dispensing event."/> - <definition value="The number of refills allowed or remaining after a dispensing event. Does not include the current dispense."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/medicationdispense-refillsRemaining"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Number of refills allowed or remaining after a dispensing event."/> - <definition value="The number of refills allowed or remaining after a dispensing event. Does not include the current dispense."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/medicationdispense-refillsRemaining"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-locationPerformed"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed"/> - <version value="4.1.0"/> - <name value="locationPerformed"/> - <title value="locationPerformed"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Facility location where this report was prepared."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Location Performed"/> - <definition value="Facility location where this report was prepared."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Location Performed"/> - <definition value="Facility location where this report was prepared."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-effectiveDate"/> - <resource> - <StructureDefinition> - <id value="valueset-effectiveDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-effectiveDate"/> - <version value="4.1.0"/> - <name value="effectiveDate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version becomes Active and is available for use"/> - <definition value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-effectiveDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version becomes Active and is available for use"/> - <definition value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-effectiveDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryAddressLine"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryAddressLine"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryAddressLine"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryAddressLine"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryAddressLine"/> - <definition value="A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DAL]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryAddressLine"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryAddressLine"/> - <definition value="A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DAL]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryAddressLine"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap"/> - <resource> - <StructureDefinition> - <id value="11179-permitted-value-conceptmap"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap"/> - <version value="4.1.0"/> - <name value="permitted-value-conceptmap"/> - <title value="Permitted Values link"/> - <status value="draft"/> - <date value="2014-04-21"/> - <publisher value="Health Level Seven International (Orders and Observations)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Expresses the linkage between the internal codes used for storage and the codes used for exchange."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <uri value="http://metadata-standards.org/11179/"/> - <name value="ISO 11179"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition.snapshot.element.binding.valueSet"/> - </context> - <context> - <type value="element"/> - <expression value="StructureDefinition.differential.element.binding.valueSet"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.answerValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Mapping from permitted to transmitted"/> - <definition value="Expresses the linkage between the internal codes used for storage and the codes used for exchange."/> - <comment value="The permitted value set must have a 1..1 set of codes for each code in the value meaning value set. The source for the concept map is the value set the extension appears on. The target is the permitted-value-valueset."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.data_element_domain.member.meaning"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Mapping from permitted to transmitted"/> - <definition value="Expresses the linkage between the internal codes used for storage and the codes used for exchange."/> - <comment value="The permitted value set must have a 1..1 set of codes for each code in the value meaning value set. The source for the concept map is the value set the extension appears on. The target is the permitted-value-valueset."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.data_element_domain.member.meaning"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-applicable-version"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-applicable-version"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-applicable-version"/> - <version value="4.1.0"/> - <name value="applicable-version"/> - <title value="Applicable Version"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="An additional version that this profile apples to, other than the version explicitly stated in StructureDefinition.fhirVersion."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Another Version this applies to"/> - <definition value="An additional version that this profile apples to, other than the version explicitly stated in StructureDefinition.fhirVersion."/> - <comment value="This is typically only used where derivation = constraint. As the underlying resources become more stable, profiles on one version become applicable to other versions as well. It's possible to calculate automatically with the strutural features of a profile apply to a given version, but just because it's structurally ok doesn't mean that the meaning is correct. This extension allows a positive statement that the profile applies."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-applicable-version"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FHIRVersion"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="All published FHIR Versions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/FHIR-version|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Another Version this applies to"/> - <definition value="An additional version that this profile apples to, other than the version explicitly stated in StructureDefinition.fhirVersion."/> - <comment value="This is typically only used where derivation = constraint. As the underlying resources become more stable, profiles on one version become applicable to other versions as well. It's possible to calculate automatically with the strutural features of a profile apply to a given version, but just because it's structurally ok doesn't mean that the meaning is correct. This extension allows a positive statement that the profile applies."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-applicable-version"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FHIRVersion"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="All published FHIR Versions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/FHIR-version|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset"/> - <resource> - <StructureDefinition> - <id value="11179-permitted-value-valueset"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset"/> - <version value="4.1.0"/> - <name value="permitted-value-valueset"/> - <title value="Permitted Values"/> - <status value="draft"/> - <date value="2014-04-21"/> - <publisher value="Health Level Seven International (Orders and Observations)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Allows expressing the value set that must be stored internally by the system (as distinct from the base value set which defines values for exchange)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <uri value="http://metadata-standards.org/11179/"/> - <name value="ISO 11179"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition.snapshot.element.binding.valueSet"/> - </context> - <context> - <type value="element"/> - <expression value="StructureDefinition.differential.element.binding.valueSet"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.answerValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Permitted values"/> - <definition value="Allows expressing the value set that must be stored internally by the system (as distinct from the base value set which defines values for exchange)."/> - <comment value="The permitted value set must have a 1..1 set of codes for each code in the value meaning value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.data_element_domain.member"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Permitted values"/> - <definition value="Allows expressing the value set that must be stored internally by the system (as distinct from the base value set which defines values for exchange)."/> - <comment value="The permitted value set must have a 1..1 set of codes for each code in the value meaning value set."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="iso11179"/> - <map value="Data_Element.data_element_domain.member"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChange"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsAminoAcidChange"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChange"/> - <version value="4.1.0"/> - <name value="AminoAcidChange"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="AminoAcidChange information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="AminoAcidChange"/> - <definition value="AminoAcidChange information."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="HGVS nomenclature for observed Amino Acid Change"/> - <definition value="Human Genome Variation Society (HGVS) nomenclature for an amino acid change. Reference sequence ID used for HGVS naming must be annotated. An amino acid is a sequence feature that corresponds to a single amino acid residue in a polypeptide ([SO:0001237](http://www.sequenceontology.org/browser/current_svn/term/SO:0001237)). LOINC Code: ([48005-3](http://loinc.org/48005-3))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ClinVar-variant-database"/> - </extension> - <strength value="preferred"/> - <description value="NCBI central repository of potentially clinically relevant variants."/> - <valueSet value="http://hl7.org/fhir/ValueSet/clinvar"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type"> - <path value="Extension.extension"/> - <sliceName value="Type"/> - <short value="Amino Acid Change Type"/> - <definition value="Codified type for associated Amino Acid Change. LOINC Code: ([48006-1](http://loinc.org/48006-1))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChange"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="AminoAcidChange"/> - <definition value="AminoAcidChange information."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="HGVS nomenclature for observed Amino Acid Change"/> - <definition value="Human Genome Variation Society (HGVS) nomenclature for an amino acid change. Reference sequence ID used for HGVS naming must be annotated. An amino acid is a sequence feature that corresponds to a single amino acid residue in a polypeptide ([SO:0001237](http://www.sequenceontology.org/browser/current_svn/term/SO:0001237)). LOINC Code: ([48005-3](http://loinc.org/48005-3))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ClinVar-variant-database"/> - </extension> - <strength value="preferred"/> - <description value="NCBI central repository of potentially clinically relevant variants."/> - <valueSet value="http://hl7.org/fhir/ValueSet/clinvar"/> - </binding> - </element> - <element id="Extension.extension:Type"> - <path value="Extension.extension"/> - <sliceName value="Type"/> - <short value="Amino Acid Change Type"/> - <definition value="Codified type for associated Amino Acid Change. LOINC Code: ([48006-1](http://loinc.org/48006-1))."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Type"/> - </element> - <element id="Extension.extension:Type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChange"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-websocket"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement-websocket"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-websocket"/> - <version value="4.1.0"/> - <name value="websocket"/> - <title value="WebSocket"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="Where the server provides its web socket end-point."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where server websocket end point is found"/> - <definition value="Where the server provides its web socket end-point."/> - <comment value="Used for web-socket based subscriptions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-websocket"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where server websocket end point is found"/> - <definition value="Where the server provides its web socket end-point."/> - <comment value="Used for web-socket based subscriptions."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-websocket"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingPerson"/> - <resource> - <StructureDefinition> - <id value="cqf-initiatingPerson"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingPerson"/> - <version value="4.1.0"/> - <name value="initiatingPerson"/> - <title value="initiatingPerson"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The person initiating the request."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The person initiating the request."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingPerson"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Person"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The person initiating the request."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingPerson"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Person"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-identifier"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier"/> - <version value="4.1.0"/> - <name value="identifier"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="External Identifiers associated with this element - these are identifiers that are associated with the concept this element represents."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="External Identifier associated with this element"/> - <definition value="External Identifiers associated with this element - these are identifiers that are associated with the concept this element represents."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="Act.id, Role.id, Entity.id"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Identifier"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="External Identifier associated with this element"/> - <definition value="External Identifiers associated with this element - these are identifiers that are associated with the concept this element represents."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="Act.id, Role.id, Entity.id"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Identifier"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor"/> - <resource> - <StructureDefinition> - <id value="patient-cadavericDonor"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor"/> - <version value="4.1.0"/> - <name value="cadavericDonor"/> - <title value="cadavericDonor"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Flag indicating whether the patient authorized the donation of body parts after death."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Post-mortem donor status"/> - <definition value="Flag indicating whether the patient authorized the donation of body parts after death."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Post-mortem donor status"/> - <definition value="Flag indicating whether the patient authorized the donation of body parts after death."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix"/> - <resource> - <StructureDefinition> - <id value="humanname-partner-prefix"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix"/> - <version value="4.1.0"/> - <name value="partner-prefix"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The prefix portion (e.g. voorvoegsel) 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."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Voorvoegsel derived from person's partner's surname"/> - <definition value="The prefix portion (e.g. voorvoegsel) 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."/> - <comment value="An example of a voorvoegsel is the "van" in "Ludwig van Beethoven". Since the voorvoegsel doesn't sort completely alphabetically, it is reasonable to identify it as a separate sub-component."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="FN.4"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (VV, SP)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Voorvoegsel derived from person's partner's surname"/> - <definition value="The prefix portion (e.g. voorvoegsel) 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."/> - <comment value="An example of a voorvoegsel is the "van" in "Ludwig van Beethoven". Since the voorvoegsel doesn't sort completely alphabetically, it is reasonable to identify it as a separate sub-component."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="FN.4"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (VV, SP)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"/> - <resource> - <StructureDefinition> - <id value="hla-genotyping-results-haploid"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"/> - <version value="4.1.0"/> - <name value="haploid"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="haploid."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="haploid"/> - <definition value="haploid."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:locus"> - <path value="Extension.extension"/> - <sliceName value="locus"/> - <short value="haploid-locus"/> - <definition value="gene region."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:locus.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:locus.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:locus.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="locus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:locus.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="haploid-type"/> - <definition value="haploid type."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:method"> - <path value="Extension.extension"/> - <sliceName value="method"/> - <short value="haploid-method"/> - <definition value="haploid method."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:method.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:method.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:method.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="method"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:method.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="haploid"/> - <definition value="haploid."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:locus"> - <path value="Extension.extension"/> - <sliceName value="locus"/> - <short value="haploid-locus"/> - <definition value="gene region."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:locus.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:locus.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="locus"/> - </element> - <element id="Extension.extension:locus.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="haploid-type"/> - <definition value="haploid type."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:method"> - <path value="Extension.extension"/> - <sliceName value="method"/> - <short value="haploid-method"/> - <definition value="haploid method."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:method.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:method.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="method"/> - </element> - <element id="Extension.extension:method.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryModeIdentifier"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryModeIdentifier"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryModeIdentifier"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryModeIdentifier"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryModeIdentifier"/> - <definition value="Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DMODID]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryModeIdentifier"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryModeIdentifier"/> - <definition value="Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DMODID]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryModeIdentifier"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-keyWord"/> - <resource> - <StructureDefinition> - <id value="valueset-keyWord"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-keyWord"/> - <version value="4.1.0"/> - <name value="keyWord"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Descriptors and key terms for search"/> - <definition value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-keyWord"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Descriptors and key terms for search"/> - <definition value="Word or words used in an information retrieval system to indicate the content of the value set."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-keyWord"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs"/> - <resource> - <StructureDefinition> - <id value="questionnaire-minOccurs"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs"/> - <version value="4.1.0"/> - <name value="minOccurs"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="The minimum number of times the group must appear, or the minimum number of answers for a question - when greater than 1."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type!='display' and (required=true or %extension.valueInteger=0)"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Minimum repetitions"/> - <definition value="The minimum number of times the group must appear, or the minimum number of answers for a question - when greater than 1."/> - <comment value="Default assumption for "required" elements is minOccurs=1."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Minimum repetitions"/> - <definition value="The minimum number of times the group must appear, or the minimum number of answers for a question - when greater than 1."/> - <comment value="Default assumption for "required" elements is minOccurs=1."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-ParticipantObjectContainsStudy"/> - <resource> - <StructureDefinition> - <id value="auditevent-ParticipantObjectContainsStudy"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-ParticipantObjectContainsStudy"/> - <version value="4.1.0"/> - <name value="ParticipantObjectContainsStudy"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="A Study Instance ID, which may be used when the Entity type is not (110180, DCM, "Study Instance UID")."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Contains Study"/> - <definition value="A Study Instance ID, which may be used when the Entity type is not (110180, DCM, "Study Instance UID")."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="ParticipantObjectContainsStudy"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-ParticipantObjectContainsStudy"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Identifier"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Contains Study"/> - <definition value="A Study Instance ID, which may be used when the Entity type is not (110180, DCM, "Study Instance UID")."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="dicom"/> - <map value="ParticipantObjectContainsStudy"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-ParticipantObjectContainsStudy"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Identifier"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor"/> - <resource> - <StructureDefinition> - <id value="iso21090-nullFlavor"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor"/> - <version value="4.1.0"/> - <name value="nullFlavor"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="If the value is not a proper value, indicates the reason."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="NI | OTH | NINF | PINF | UNK | ASKU | NAV | NASK | TRC | MSK | NA | QS"/> - <definition value="If the value is not a proper value, indicates the reason."/> - <comment value="Considerable care must be used when using nullFlavor in this context of FHIR - more than any other concept, this is tied to the way v3 works, and FHIR is quite different. For instance, there is no notion of a "proper value" as opposed to any other value in FHIR. a NullFlavor should be understood to mean, "why information is missing", and the nulFlavors OTH, NINF, PINF, and TRC should not be used."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="n/a"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ANY.nullFlavor"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="NullFlavor"/> - </extension> - <strength value="required"/> - <description value="A collection of codes specifying why a valid value is not present."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-NullFlavor|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="NI | OTH | NINF | PINF | UNK | ASKU | NAV | NASK | TRC | MSK | NA | QS"/> - <definition value="If the value is not a proper value, indicates the reason."/> - <comment value="Considerable care must be used when using nullFlavor in this context of FHIR - more than any other concept, this is tied to the way v3 works, and FHIR is quite different. For instance, there is no notion of a "proper value" as opposed to any other value in FHIR. a NullFlavor should be understood to mean, "why information is missing", and the nulFlavors OTH, NINF, PINF, and TRC should not be used."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="n/a"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ANY.nullFlavor"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="NullFlavor"/> - </extension> - <strength value="required"/> - <description value="A collection of codes specifying why a valid value is not present."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-NullFlavor|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"/> - <resource> - <StructureDefinition> - <id value="hla-genotyping-results-allele-database"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"/> - <version value="4.1.0"/> - <name value="allele-database"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Allele Database."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Allele Database"/> - <definition value="Allele Database."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Allele Database"/> - <definition value="Allele Database."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement-supported-system"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system"/> - <version value="4.1.0"/> - <name value="supported-system"/> - <title value="Supported Code System"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="A code system that is supported by the system that is not defined in a value set resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system not defined in a value set"/> - <definition value="A code system that is supported by the system that is not defined in a value set resource."/> - <comment value="Typically, this is a large terminology such as LOINC, SNOMED CT."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system not defined in a value set"/> - <definition value="A code system that is supported by the system that is not defined in a value set resource."/> - <comment value="Typically, this is a large terminology such as LOINC, SNOMED CT."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-conceptOrder"/> - <resource> - <StructureDefinition> - <id value="codesystem-conceptOrder"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-conceptOrder"/> - <version value="4.1.0"/> - <name value="conceptOrder"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Appearance order for user selection"/> - <definition value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-conceptOrder"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Appearance order for user selection"/> - <definition value="Identifies the relative order in which concepts within the value set should be presented to a user."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-conceptOrder"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"/> - <resource> - <StructureDefinition> - <id value="humanname-own-prefix"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"/> - <version value="4.1.0"/> - <name value="own-prefix"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The prefix portion (e.g. voorvoegsel) 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."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Voorvoegsel derived from person's own surname"/> - <definition value="The prefix portion (e.g. voorvoegsel) 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."/> - <comment value="An example of a voorvoegsel is the "van" in "Ludwig van Beethoven". Since the voorvoegsel doesn't sort completely alphabetically, it is reasonable to specify it as a separate sub-component."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="FN.2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (VV, R)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Voorvoegsel derived from person's own surname"/> - <definition value="The prefix portion (e.g. voorvoegsel) 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."/> - <comment value="An example of a voorvoegsel is the "van" in "Ludwig van Beethoven". Since the voorvoegsel doesn't sort completely alphabetically, it is reasonable to specify it as a separate sub-component."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="FN.2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (VV, R)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-dueTo"/> - <resource> - <StructureDefinition> - <id value="condition-dueTo"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-dueTo"/> - <version value="4.1.0"/> - <name value="dueTo"/> - <title value="dueTo"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Causes for this Condition"/> - <definition value="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition."/> - <comment value="Although a condition may be caused by a substance, this is not intended to be used to record allergies/adverse reactions to substances."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value=".typeCode"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-dueTo"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionCause"/> - </extension> - <strength value="example"/> - <description value="Codes that describe causes of patient conditions; e.g. Surgical mishap, escalation of a previous condition, etc."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-cause"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Causes for this Condition"/> - <definition value="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition."/> - <comment value="Although a condition may be caused by a substance, this is not intended to be used to record allergies/adverse reactions to substances."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value=".typeCode"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-dueTo"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionCause"/> - </extension> - <strength value="example"/> - <description value="Codes that describe causes of patient conditions; e.g. Surgical mishap, escalation of a previous condition, etc."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-cause"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime"/> - <resource> - <StructureDefinition> - <id value="procedure-incisionDateTime"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime"/> - <version value="4.1.0"/> - <name value="incisionDateTime"/> - <title value="incisionDateTime"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The time of the first incision."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The first incision time"/> - <definition value="The time of the first incision."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The first incision time"/> - <definition value="The time of the first incision."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden"/> - <resource> - <StructureDefinition> - <id value="questionnaire-hidden"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden"/> - <version value="4.1.0"/> - <name value="hidden"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="If true, indicates that the extended item should not be displayed to the user."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Don't display to user"/> - <definition value="If true, indicates that the extended item should not be displayed to the user."/> - <comment value="If an item is hidden, all descendant items are hidden as well."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Don't display to user"/> - <definition value="If true, indicates that the extended item should not be displayed to the user."/> - <comment value="If an item is hidden, all descendant items are hidden as well."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-method"/> - <resource> - <StructureDefinition> - <id value="procedure-method"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-method"/> - <version value="4.1.0"/> - <name value="method"/> - <title value="method"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The method used to perform this procedure."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The method used to perform the procedure"/> - <definition value="The method used to perform this procedure."/> - <comment value="Improve definition. Add mappings."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-method"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The method used to perform the procedure"/> - <definition value="The method used to perform this procedure."/> - <comment value="Improve definition. Add mappings."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-method"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-explicit-type-name"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"/> - <version value="4.1.0"/> - <name value="explicit-type-name"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A name to use for the type, in implementations. This is a suggestion; it's not a normative part of the FHIR specification, but it does appear in the UML diagrams, and is used in generated code, schemas, etc.to identify the type."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Advisory - name of Type for implementations"/> - <definition value="A name to use for the type, in implementations. This is a suggestion; it's not a normative part of the FHIR specification, but it does appear in the UML diagrams, and is used in generated code, schemas, etc.to identify the type."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Advisory - name of Type for implementations"/> - <definition value="A name to use for the type, in implementations. This is a suggestion; it's not a normative part of the FHIR specification, but it does appear in the UML diagrams, and is used in generated code, schemas, etc.to identify the type."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber"/> - <resource> - <StructureDefinition> - <id value="composition-clinicaldocument-versionNumber"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sd"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber"/> - <version value="4.1.0"/> - <name value="versionNumber"/> - <status value="draft"/> - <date value="2015-03-17"/> - <publisher value="Health Level Seven, Inc. - Structured Documents WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/structure"/> - </telecom> - </contact> - <description value="Version specific identifier for the composition, assigned when each version is created/updated."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Composition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Version-specific identifier for composition"/> - <definition value="Version specific identifier for the composition, assigned when each version is created/updated."/> - <comment value="While each resource, including the composition itself, has its own version identifier, this is a formal identifier for the logical version of the composition as a whole. It would remain constant if the resources were moved to a new server, and all got new individual resource versions, for example."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Version-specific identifier for composition"/> - <definition value="Version specific identifier for the composition, assigned when each version is created/updated."/> - <comment value="While each resource, including the composition itself, has its own version identifier, this is a formal identifier for the logical version of the composition as a whole. It would remain constant if the resources were moved to a new server, and all got new individual resource versions, for example."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-progressStatus"/> - <resource> - <StructureDefinition> - <id value="procedure-progressStatus"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-progressStatus"/> - <version value="4.1.0"/> - <name value="progressStatus"/> - <title value="progressStatus"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A code to track a detailed progress of a procedure (e.g. In Recovery, Prepared for Surgery)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A details procedure progress"/> - <definition value="A code to track a detailed progress of a procedure (e.g. In Recovery, Prepared for Surgery)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-progressStatus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProcedureProgress"/> - </extension> - <strength value="example"/> - <description value="A code to describe a detailed status/stage of the procedure."/> - <valueSet value="http://hl7.org/fhir/ValueSet/procedure-progress-status-codes"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A details procedure progress"/> - <definition value="A code to track a detailed progress of a procedure (e.g. In Recovery, Prepared for Surgery)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-progressStatus"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProcedureProgress"/> - </extension> - <strength value="example"/> - <description value="A code to describe a detailed status/stage of the procedure."/> - <valueSet value="http://hl7.org/fhir/ValueSet/procedure-progress-status-codes"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/goal-acceptance"/> - <resource> - <StructureDefinition> - <id value="goal-acceptance"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/goal-acceptance"/> - <version value="4.1.0"/> - <name value="acceptance"/> - <title value="Goal acceptance"/> - <status value="draft"/> - <date value="2014-12-07"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir"/> - </telecom> - </contact> - <description value="Information about the acceptance and relative priority assigned to the goal by the patient, practitioners and other stake-holders."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Goal"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Individual acceptance of goal"/> - <definition value="Information about the acceptance and relative priority assigned to the goal by the patient, practitioners and other stake-holders."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:individual"> - <path value="Extension.extension"/> - <sliceName value="individual"/> - <short value="Individual whose acceptance is reflected"/> - <definition value="The person whose acceptance/priority is being reflected."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:individual.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:individual.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:individual.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="individual"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:individual.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:status"> - <path value="Extension.extension"/> - <sliceName value="status"/> - <short value="agree | disagree | pending"/> - <definition value="Indicates whether the specified individual has accepted the goal or not."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:status.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:status.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:status.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:status.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalAcceptanceStatus"/> - </extension> - <strength value="required"/> - <description value="Codes indicating whether the goal has been accepted by a stakeholder."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-acceptance-status|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:priority"> - <path value="Extension.extension"/> - <sliceName value="priority"/> - <short value="Priority of goal for individual"/> - <definition value="Indicates the relative priority assigned to the resource by the stakeholder."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:priority.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:priority.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:priority.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="priority"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:priority.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalAcceptancePriority"/> - </extension> - <strength value="example"/> - <description value="Codes indicating the relative priority assigned to a goal by a stakeholder."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-priority"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-acceptance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Individual acceptance of goal"/> - <definition value="Information about the acceptance and relative priority assigned to the goal by the patient, practitioners and other stake-holders."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:individual"> - <path value="Extension.extension"/> - <sliceName value="individual"/> - <short value="Individual whose acceptance is reflected"/> - <definition value="The person whose acceptance/priority is being reflected."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:individual.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:individual.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="individual"/> - </element> - <element id="Extension.extension:individual.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - <element id="Extension.extension:status"> - <path value="Extension.extension"/> - <sliceName value="status"/> - <short value="agree | disagree | pending"/> - <definition value="Indicates whether the specified individual has accepted the goal or not."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:status.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:status.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="status"/> - </element> - <element id="Extension.extension:status.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalAcceptanceStatus"/> - </extension> - <strength value="required"/> - <description value="Codes indicating whether the goal has been accepted by a stakeholder."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-acceptance-status|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:priority"> - <path value="Extension.extension"/> - <sliceName value="priority"/> - <short value="Priority of goal for individual"/> - <definition value="Indicates the relative priority assigned to the resource by the stakeholder."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:priority.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:priority.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="priority"/> - </element> - <element id="Extension.extension:priority.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GoalAcceptancePriority"/> - </extension> - <strength value="example"/> - <description value="Codes indicating the relative priority assigned to a goal by a stakeholder."/> - <valueSet value="http://hl7.org/fhir/ValueSet/goal-priority"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/goal-acceptance"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-streetNameBase"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase"/> - <version value="4.1.0"/> - <name value="ADXP-streetNameBase"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The base name of a roadway or artery recognized by a municipality (excluding street type and direction)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="streetNameBase"/> - <definition value="The base name of a roadway or artery recognized by a municipality (excluding street type and direction)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STB]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="streetNameBase"/> - <definition value="The base name of a roadway or artery recognized by a municipality (excluding street type and direction)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=STB]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-security-category"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category"/> - <version value="4.1.0"/> - <name value="security-category"/> - <title value="Security Category"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Provides general guidance around the kind of access Control to Read, Search, Create, Update, or Delete the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Security Categorization for Resource"/> - <definition value="Provides general guidance around the kind of access Control to Read, Search, Create, Update, or Delete the resource."/> - <comment value="This is only guidance; applications must perform their own analysis to meet their own requirements."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ResourceSecurityCategory"/> - </extension> - <strength value="required"/> - <description value="Provides general guidance around the kind of access Control to Read, Search, Create, Update, or Delete a resource."/> - <valueSet value="http://hl7.org/fhir/ValueSet/resource-security-category|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Security Categorization for Resource"/> - <definition value="Provides general guidance around the kind of access Control to Read, Search, Create, Update, or Delete the resource."/> - <comment value="This is only guidance; applications must perform their own analysis to meet their own requirements."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ResourceSecurityCategory"/> - </extension> - <strength value="required"/> - <description value="Provides general guidance around the kind of access Control to Read, Search, Create, Update, or Delete a resource."/> - <valueSet value="http://hl7.org/fhir/ValueSet/resource-security-category|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"/> - <resource> - <StructureDefinition> - <id value="familymemberhistory-type"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"/> - <version value="4.1.0"/> - <name value="type"/> - <title value="type"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Purpose of the family member history or why it was created, such as when family member history is targeted for cardiovascular health, mental health, or genetic counseling."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Purpose of the family member history"/> - <definition value="Purpose of the family member history or why it was created, such as when family member history is targeted for cardiovascular health, mental health, or genetic counseling."/> - <comment value="List.code can be used to capture the type across a list of family members' histories."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Purpose of the family member history"/> - <definition value="Purpose of the family member history or why it was created, such as when family member history is targeted for cardiovascular health, mental health, or genetic counseling."/> - <comment value="List.code can be used to capture the type across a list of family members' histories."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-type"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/identifier-validDate"/> - <resource> - <StructureDefinition> - <id value="identifier-validDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/identifier-validDate"/> - <version value="4.1.0"/> - <name value="validDate"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Indicates a date on which this identifier value was deemed to apply to this instance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Identifier"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="External Identifier associated with this element"/> - <definition value="Indicates a date on which this identifier value was deemed to apply to this instance."/> - <comment value="When referencing business objects where an identifier might not be globally unique but is instead re-used, allows determination of which object applies (on the presumption that the identifiers on the referenced object have an identifier.period or other metadata that indicates when that identifier was valid for the business object)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/identifier-validDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="External Identifier associated with this element"/> - <definition value="Indicates a date on which this identifier value was deemed to apply to this instance."/> - <comment value="When referencing business objects where an identifier might not be globally unique but is instead re-used, allows determination of which object applies (on the presumption that the identifiers on the referenced object have an identifier.period or other metadata that indicates when that identifier was valid for the business object)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/identifier-validDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-partner-name"/> - <resource> - <StructureDefinition> - <id value="humanname-partner-name"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-partner-name"/> - <version value="4.1.0"/> - <name value="partner-name"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="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."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion derived from person's partner's surname"/> - <definition value="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."/> - <comment value="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"."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="FN.5"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (SP)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-partner-name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion derived from person's partner's surname"/> - <definition value="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."/> - <comment value="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"."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="FN.5"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (SP)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-partner-name"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-Encrypted"/> - <resource> - <StructureDefinition> - <id value="auditevent-Encrypted"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-Encrypted"/> - <version value="4.1.0"/> - <name value="Encrypted"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="True or False indicating whether the data was encrypted."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Encrypted state"/> - <definition value="True or False indicating whether the data was encrypted."/> - <comment value="If there was a mix of encrypted and non-encrypted data, then create two AuditEvents."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="Encrypted"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Encrypted"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Encrypted state"/> - <definition value="True or False indicating whether the data was encrypted."/> - <comment value="If there was a mix of encrypted and non-encrypted data, then create two AuditEvents."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="dicom"/> - <map value="Encrypted"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Encrypted"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet"/> - <resource> - <StructureDefinition> - <id value="questionnaire-unitValueSet"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet"/> - <version value="4.1.0"/> - <name value="unitValueSet"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="A set of units that the user may choose when providing a quantity value."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='quantity'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit choices"/> - <definition value="A set of units that the user may choose when providing a quantity value."/> - <comment value="Provide either unit-option(s) or unit-valueSet. In the absence of either, any unit is valid."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit choices"/> - <definition value="A set of units that the user may choose when providing a quantity value."/> - <comment value="Provide either unit-option(s) or unit-valueSet. In the absence of either, any unit is valid."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAncestry"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsAncestry"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAncestry"/> - <version value="4.1.0"/> - <name value="Ancestry"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Ancestry information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Ancestry"/> - <definition value="Ancestry information."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="Ancestry name"/> - <definition value="A definition that describes the geographical origin of a patient."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Percentage"> - <path value="Extension.extension"/> - <sliceName value="Percentage"/> - <short value="Ancestry percentage"/> - <definition value="The ratio of this ancestry to all of the patient's ancestry."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Percentage.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Percentage.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Percentage.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Percentage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Percentage.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Source"> - <path value="Extension.extension"/> - <sliceName value="Source"/> - <short value="Source of ancestry report"/> - <definition value="In what way the ancestry is reported (e.g. Patient reported, Genetic test, Other, Unknown)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Source.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Source.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Source.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Source"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Source.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAncestry"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Ancestry"/> - <definition value="Ancestry information."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:Name"> - <path value="Extension.extension"/> - <sliceName value="Name"/> - <short value="Ancestry name"/> - <definition value="A definition that describes the geographical origin of a patient."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Name"/> - </element> - <element id="Extension.extension:Name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:Percentage"> - <path value="Extension.extension"/> - <sliceName value="Percentage"/> - <short value="Ancestry percentage"/> - <definition value="The ratio of this ancestry to all of the patient's ancestry."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Percentage.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Percentage.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Percentage"/> - </element> - <element id="Extension.extension:Percentage.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - <element id="Extension.extension:Source"> - <path value="Extension.extension"/> - <sliceName value="Source"/> - <short value="Source of ancestry report"/> - <definition value="In what way the ancestry is reported (e.g. Patient reported, Genetic test, Other, Unknown)."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Source.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Source.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Source"/> - </element> - <element id="Extension.extension:Source.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsAncestry"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/quantity-precision"/> - <resource> - <StructureDefinition> - <id value="quantity-precision"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/quantity-precision"/> - <version value="4.1.0"/> - <name value="precision"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Explicit precision of the number. This is the number of significant decimal places after the decimal point, irrespective of how many are actually present in the explicitly represented decimal."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="decimal"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Explicit precision (number of significant decimal places)"/> - <definition value="Explicit precision of the number. This is the number of significant decimal places after the decimal point, irrespective of how many are actually present in the explicitly represented decimal."/> - <comment value="The presence of this extension does not change conformance expectations with regard to rendering and calculations that use the number - these are still based on the raw decimal value. Applications that perform calculations SHALL ensure that this extension is removed or updated to the correct precision value if the number is changed. Applications should consider using the exponential form (e.g. 2.10e3) on the raw decimal to manage significant figures, but should be mindful of human display when doing so."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/quantity-precision"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Explicit precision (number of significant decimal places)"/> - <definition value="Explicit precision of the number. This is the number of significant decimal places after the decimal point, irrespective of how many are actually present in the explicitly represented decimal."/> - <comment value="The presence of this extension does not change conformance expectations with regard to rendering and calculations that use the number - these are still based on the raw decimal value. Applications that perform calculations SHALL ensure that this extension is removed or updated to the correct precision value if the number is changed. Applications should consider using the exponential form (e.g. 2.10e3) on the raw decimal to manage significant figures, but should be mindful of human display when doing so."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/quantity-precision"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/servicerequest-precondition"/> - <resource> - <StructureDefinition> - <id value="servicerequest-precondition"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/servicerequest-precondition"/> - <version value="4.1.0"/> - <name value="precondition"/> - <title value="precondition"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The condition or state of the patient, prior or during the diagnostic procedure or test, for example, fasting, at-rest, or post-operative. This captures circumstances that may influence the measured value and have bearing on the interpretation of the result."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The condition or state of the patient for this test"/> - <definition value="The condition or state of the patient, prior or during the diagnostic procedure or test, for example, fasting, at-rest, or post-operative. This captures circumstances that may influence the measured value and have bearing on the interpretation of the result."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-precondition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The condition or state of the patient for this test"/> - <definition value="The condition or state of the patient, prior or during the diagnostic procedure or test, for example, fasting, at-rest, or post-operative. This captures circumstances that may influence the measured value and have bearing on the interpretation of the result."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-precondition"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-display-hint"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"/> - <version value="4.1.0"/> - <name value="display-hint"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Hinting information for the narrative generator - a series of name: value; pairs."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Hinting information for the narrative generator"/> - <definition value="Hinting information for the narrative generator - a series of name: value; pairs."/> - <comment value="known names: default (default value - don't represent if this value)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Hinting information for the narrative generator"/> - <definition value="Hinting information for the narrative generator - a series of name: value; pairs."/> - <comment value="known names: default (default value - don't represent if this value)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-trusted-expansion"/> - <resource> - <StructureDefinition> - <id value="codesystem-trusted-expansion"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-trusted-expansion"/> - <version value="4.1.0"/> - <name value="trusted-expansion"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Indicates an authoritative source for performing value set expansions."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a trusted expansion"/> - <definition value="Indicates an authoritative source for performing value set expansions."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-trusted-expansion"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a trusted expansion"/> - <definition value="Indicates an authoritative source for performing value set expansions."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-trusted-expansion"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-replaces"/> - <resource> - <StructureDefinition> - <id value="request-replaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-replaces"/> - <version value="4.1.0"/> - <name value="replaces"/> - <title value="Replaces"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Completed or terminated request(s) whose function is taken by this new request."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Request(s) replaced by this request"/> - <definition value="Completed or terminated request(s) whose function is taken by this new request."/> - <comment value="The replacement could be because the initial request was immediately rejected (due to an issue) or because the previous request was completed, but the need for the action described by the request remains ongoing."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="Handled by message location of ORC (ORC.1=RO or RU)"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RPLC].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-replaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Request(s) replaced by this request"/> - <definition value="Completed or terminated request(s) whose function is taken by this new request."/> - <comment value="The replacement could be because the initial request was immediately rejected (due to an issue) or because the previous request was completed, but the need for the action described by the request remains ongoing."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="Handled by message location of ORC (ORC.1=RO or RU)"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RPLC].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-replaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/task-candidateList"/> - <resource> - <StructureDefinition> - <id value="task-candidateList"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/task-candidateList"/> - <version value="4.1.0"/> - <name value="candidateList"/> - <title value="Candidate List"/> - <status value="draft"/> - <date value="2017-02-16"/> - <publisher value="Health Level Seven, Inc. - FHIR I WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Identifies the individuals who are candidates for being the owner of the task."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Task"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="List of possible owners of Task"/> - <definition value="Identifies the individuals who are candidates for being the owner of the task."/> - <comment value="In some environments, this list might be binding (i.e. owner must be one of the listed individuals), in others it may be suggestive (i.e. preferred owner will be from this list, but business processes may allow assignment to someone not on the list."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.performer.actor, Request.performer"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=PRF].role"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/task-candidateList"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="List of possible owners of Task"/> - <definition value="Identifies the individuals who are candidates for being the owner of the task."/> - <comment value="In some environments, this list might be binding (i.e. owner must be one of the listed individuals), in others it may be suggestive (i.e. preferred owner will be from this list, but business processes may allow assignment to someone not on the list."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.performer.actor, Request.performer"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=PRF].role"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/task-candidateList"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-concept-definition"/> - <resource> - <StructureDefinition> - <id value="valueset-concept-definition"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-concept-definition"/> - <version value="4.1.0"/> - <name value="concept-definition"/> - <title value="Definition"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A definition that describes the meaning of this code when used as part of this value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet.expansion.contains"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A definition for this code"/> - <definition value="A definition that describes the meaning of this code when used as part of this value set."/> - <comment value="This is provided for when the source code system doesn't actually provide a definition (there are many such). Providing an definition for a code SHOULD NOT be done where the underlying code system provides a definition."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-concept-definition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A definition for this code"/> - <definition value="A definition that describes the meaning of this code when used as part of this value set."/> - <comment value="This is provided for when the source code system doesn't actually provide a definition (there are many such). Providing an definition for a code SHOULD NOT be done where the underlying code system provides a definition."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-concept-definition"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/consent-Transcriber"/> - <resource> - <StructureDefinition> - <id value="consent-Transcriber"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="cbcc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/consent-Transcriber"/> - <version value="4.1.0"/> - <name value="Transcriber"/> - <title value="Transcriber"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - CBCC WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm"/> - </telecom> - </contact> - <description value="Any person/thing who transcribed the consent into the system."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Consent"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Transcribed consent"/> - <definition value="Any person/thing who transcribed the consent into the system."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-Transcriber"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Transcribed consent"/> - <definition value="Any person/thing who transcribed the consent into the system."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-Transcriber"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserTaskContext"/> - <resource> - <StructureDefinition> - <id value="cqf-systemUserTaskContext"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserTaskContext"/> - <version value="4.1.0"/> - <name value="systemUserTaskContext"/> - <title value="systemUserTaskContext"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The task the system user is performing"/> - <definition value="The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserTaskContext"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The task the system user is performing"/> - <definition value="The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserTaskContext"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"/> - <resource> - <StructureDefinition> - <id value="humanname-mothers-family"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"/> - <version value="4.1.0"/> - <name value="mothers-family"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The portion of the family name that is derived from the person's mother."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion of family name derived from mother"/> - <definition value="The portion of the family name that is derived from the person's mother."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion of family name derived from mother"/> - <definition value="The portion of the family name that is derived from the person's mother."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-partOf"/> - <resource> - <StructureDefinition> - <id value="event-partOf"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-partOf"/> - <version value="4.1.0"/> - <name value="partOf"/> - <title value="Part Of"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="A larger event of which this particular event is a component or step."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Part of referenced event"/> - <definition value="A larger event of which this particular event is a component or step."/> - <comment value="Not to be used to link an event to an Encounter - use Event.context for that. [The allowed reference resources may be adjusted as appropriate for the event resource]."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.partOf"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-partOf"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Part of referenced event"/> - <definition value="A larger event of which this particular event is a component or step."/> - <comment value="Not to be used to link an event to an Encounter - use Event.context for that. [The allowed reference resources may be adjusted as appropriate for the event resource]."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.partOf"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-partOf"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-encounterType"/> - <resource> - <StructureDefinition> - <id value="cqf-encounterType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-encounterType"/> - <version value="4.1.0"/> - <name value="encounterType"/> - <title value="encounterType"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The type of the encounter."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The type of the encounter."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-encounterType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The type of the encounter."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-encounterType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/operationoutcome-authority"/> - <resource> - <StructureDefinition> - <id value="operationoutcome-authority"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/operationoutcome-authority"/> - <version value="4.1.0"/> - <name value="authority"/> - <title value="Rule Reference"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A reference to where the rule is defined (based on the authoritative URLs in the applicable conformance resources)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OperationOutcome.issue"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to where the rule is defined"/> - <definition value="A reference to where the rule is defined (based on the authoritative URLs in the applicable conformance resources)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-authority"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to where the rule is defined"/> - <definition value="A reference to where the rule is defined (based on the authoritative URLs in the applicable conformance resources)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-authority"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-pattern"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern"/> - <version value="4.1.0"/> - <name value="pattern"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A pattern that all the target resources follow - that is, a pattern that they all declare their relationship to."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.type"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A pattern that the target resources follow"/> - <definition value="A pattern that all the target resources follow - that is, a pattern that they all declare their relationship to."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A pattern that the target resources follow"/> - <definition value="A pattern that all the target resources follow - that is, a pattern that they all declare their relationship to."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserType"/> - <resource> - <StructureDefinition> - <id value="cqf-systemUserType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserType"/> - <version value="4.1.0"/> - <name value="systemUserType"/> - <title value="systemUserType"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The type of user initiating the request"/> - <definition value="The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The type of user initiating the request"/> - <definition value="The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-toocostly"/> - <resource> - <StructureDefinition> - <id value="valueset-toocostly"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-toocostly"/> - <version value="4.1.0"/> - <name value="toocostly"/> - <title value="Expansion Truncated"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Marks that the expansion is incomplete, because the full value set is too large to represent, and the client asked for an incomplete fragment."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.expansion"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The expansion is incomplete because the full expansion is too large"/> - <definition value="Marks that the expansion is incomplete, because the full value set is too large to represent, and the client asked for an incomplete fragment."/> - <comment value="Typically, servers will limit expansion to a number like 10000 codes."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-toocostly"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The expansion is incomplete because the full expansion is too large"/> - <definition value="Marks that the expansion is incomplete, because the full value set is too large to represent, and the client asked for an incomplete fragment."/> - <comment value="Typically, servers will limit expansion to a number like 10000 codes."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-toocostly"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-measureInfo"/> - <resource> - <StructureDefinition> - <id value="cqf-measureInfo"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-measureInfo"/> - <version value="4.1.0"/> - <name value="measureInfo"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The measure criteria that resulted in the resource being included in a particular evaluatedResources bundle."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Measure criteria for the resource"/> - <definition value="The measure criteria that resulted in the resource being included in a particular evaluatedResources bundle."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:measure"> - <path value="Extension.extension"/> - <sliceName value="measure"/> - <short value="The measure being calculated"/> - <definition value="The measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:measure.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:measure.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:measure.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="measure"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:measure.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Measure"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:groupId"> - <path value="Extension.extension"/> - <sliceName value="groupId"/> - <short value="The group identifier"/> - <definition value="The group within the measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:groupId.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:groupId.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:groupId.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="groupId"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:groupId.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:populationId"> - <path value="Extension.extension"/> - <sliceName value="populationId"/> - <short value="The population identifier"/> - <definition value="The population within the measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:populationId.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:populationId.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:populationId.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="populationId"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:populationId.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-measureInfo"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Measure criteria for the resource"/> - <definition value="The measure criteria that resulted in the resource being included in a particular evaluatedResources bundle."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:measure"> - <path value="Extension.extension"/> - <sliceName value="measure"/> - <short value="The measure being calculated"/> - <definition value="The measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:measure.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:measure.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="measure"/> - </element> - <element id="Extension.extension:measure.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Measure"/> - </type> - </element> - <element id="Extension.extension:groupId"> - <path value="Extension.extension"/> - <sliceName value="groupId"/> - <short value="The group identifier"/> - <definition value="The group within the measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:groupId.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:groupId.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="groupId"/> - </element> - <element id="Extension.extension:groupId.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:populationId"> - <path value="Extension.extension"/> - <sliceName value="populationId"/> - <short value="The population identifier"/> - <definition value="The population within the measure that resulted in this resource being included in the measure report."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:populationId.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:populationId.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="populationId"/> - </element> - <element id="Extension.extension:populationId.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-measureInfo"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-assertedDate"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-assertedDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-assertedDate"/> - <version value="4.1.0"/> - <name value="assertedDate"/> - <title value="assertedDate"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The date on which the existence of the AllergyIntolerance was first asserted or acknowledged."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Date the allergy or intolerance was first asserted"/> - <definition value="The date on which the existence of the AllergyIntolerance was first asserted or acknowledged."/> - <comment value="The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-assertedDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Date the allergy or intolerance was first asserted"/> - <definition value="The date on which the existence of the AllergyIntolerance was first asserted or acknowledged."/> - <comment value="The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-assertedDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice"/> - <resource> - <StructureDefinition> - <id value="observation-gatewayDevice"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice"/> - <version value="4.1.0"/> - <name value="gatewayDevice"/> - <title value="Gateway Device"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="The Provenance/AuditEvent resources can represent the same information. Note that the Provenance/AuditEvent resources can represent the same information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Gateway Device"/> - <definition value="The Provenance/AuditEvent resources can represent the same information. Note that the Provenance/AuditEvent resources can represent the same information."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Gateway Device"/> - <definition value="The Provenance/AuditEvent resources can represent the same information. Note that the Provenance/AuditEvent resources can represent the same information."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-replacedby"/> - <resource> - <StructureDefinition> - <id value="codesystem-replacedby"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-replacedby"/> - <version value="4.1.0"/> - <name value="replacedby"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A code that replaces this - use this code instead."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A code that replaces this"/> - <definition value="A code that replaces this - use this code instead."/> - <comment value="Usually such codes are deprecated (retired)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-replacedby"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A code that replaces this"/> - <definition value="A code that replaces this - use this code instead."/> - <comment value="Usually such codes are deprecated (retired)."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-replacedby"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/designNote"/> - <resource> - <StructureDefinition> - <id value="designNote"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/designNote"/> - <version value="4.1.0"/> - <name value="Design Note"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Information captured by the author/maintainer of the questionnaire for development purposes, not intended to be seen by users."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Design comments"/> - <definition value="Information captured by the author/maintainer of the questionnaire for development purposes, not intended to be seen by users."/> - <comment value="Allows capture of todos, rationale for design decisions, etc."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/designNote"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Design comments"/> - <definition value="Information captured by the author/maintainer of the questionnaire for development purposes, not intended to be seen by users."/> - <comment value="Allows capture of todos, rationale for design decisions, etc."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/designNote"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-encounterClass"/> - <resource> - <StructureDefinition> - <id value="cqf-encounterClass"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-encounterClass"/> - <version value="4.1.0"/> - <name value="encounterClass"/> - <title value="encounterClass"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The class of encounter (inpatient, outpatient, etc.)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The class of encounter (inpatient, outpatient, etc.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-encounterClass"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The class of encounter (inpatient, outpatient, etc.)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-encounterClass"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-relativeDateTime"/> - <resource> - <StructureDefinition> - <id value="cqf-relativeDateTime"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-relativeDateTime"/> - <version value="4.1.0"/> - <name value="relativeDateTime"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="A date/time value that is determined based on a duration offset from a target event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A date/time that is specified relative to another event"/> - <definition value="A date/time value that is determined based on a duration offset from a target event."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:target"> - <path value="Extension.extension"/> - <sliceName value="target"/> - <short value="Relative to what event"/> - <definition value="The event that the date/time value is relative to."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:target.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:target.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:target.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="target"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:target.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:targetPath"> - <path value="Extension.extension"/> - <sliceName value="targetPath"/> - <short value="Relative to which element on the event"/> - <definition value="The path to the element that defines the effective period for the event that the date/time value is relative to."/> - <comment value="The specified path must be resolvable from the type of the target. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:targetPath.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:targetPath.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:targetPath.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="targetPath"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:targetPath.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:relationship"> - <path value="Extension.extension"/> - <sliceName value="relationship"/> - <short value="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end"/> - <definition value="The relationship to the effective period of the target event that the date/time value is relative to."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:relationship.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:relationship.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:relationship.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="relationship"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:relationship.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ActionRelationshipType"/> - </extension> - <strength value="required"/> - <description value="A type that describes how two events are related in time."/> - <valueSet value="http://hl7.org/fhir/ValueSet/action-relationship-type|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:offset"> - <path value="Extension.extension"/> - <sliceName value="offset"/> - <short value="How long"/> - <definition value="A duration or range of durations that specifies the offset between the date/time value and the target event. For example, 30-60 minutes before."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:offset.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:offset.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:offset.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:offset.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <type> - <code value="Range"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-relativeDateTime"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A date/time that is specified relative to another event"/> - <definition value="A date/time value that is determined based on a duration offset from a target event."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:target"> - <path value="Extension.extension"/> - <sliceName value="target"/> - <short value="Relative to what event"/> - <definition value="The event that the date/time value is relative to."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:target.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:target.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="target"/> - </element> - <element id="Extension.extension:target.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - <element id="Extension.extension:targetPath"> - <path value="Extension.extension"/> - <sliceName value="targetPath"/> - <short value="Relative to which element on the event"/> - <definition value="The path to the element that defines the effective period for the event that the date/time value is relative to."/> - <comment value="The specified path must be resolvable from the type of the target. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:targetPath.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:targetPath.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="targetPath"/> - </element> - <element id="Extension.extension:targetPath.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:relationship"> - <path value="Extension.extension"/> - <sliceName value="relationship"/> - <short value="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end"/> - <definition value="The relationship to the effective period of the target event that the date/time value is relative to."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:relationship.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:relationship.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="relationship"/> - </element> - <element id="Extension.extension:relationship.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ActionRelationshipType"/> - </extension> - <strength value="required"/> - <description value="A type that describes how two events are related in time."/> - <valueSet value="http://hl7.org/fhir/ValueSet/action-relationship-type|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:offset"> - <path value="Extension.extension"/> - <sliceName value="offset"/> - <short value="How long"/> - <definition value="A duration or range of durations that specifies the offset between the date/time value and the target event. For example, 30-60 minutes before."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:offset.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:offset.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - </element> - <element id="Extension.extension:offset.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - <type> - <code value="Range"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-relativeDateTime"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-performerFunction"/> - <resource> - <StructureDefinition> - <id value="event-performerFunction"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-performerFunction"/> - <version value="4.1.0"/> - <name value="performerFunction"/> - <title value="Performer Function"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Distinguishes the type of involvement of the performer in the event. For example, 'author', 'verifier' or 'responsible party'."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation.performer"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport.performer"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference.author"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Type of performance"/> - <definition value="Distinguishes the type of involvement of the performer in the event. For example, 'author', 'verifier' or 'responsible party'."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.performer.function"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-performerFunction"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PerformerFunction"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://hl7.org/fhir/ValueSet/performer-function"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Type of performance"/> - <definition value="Distinguishes the type of involvement of the performer in the event. For example, 'author', 'verifier' or 'responsible party'."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="workflow"/> - <map value="Event.performer.function"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-performerFunction"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PerformerFunction"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://hl7.org/fhir/ValueSet/performer-function"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"/> - <resource> - <StructureDefinition> - <id value="family-member-history-genetics-parent"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"/> - <version value="4.1.0"/> - <name value="parent"/> - <status value="draft"/> - <date value="2019-05-29"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Identifies a parent of the relative."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Mother(s) & Father(s) - genetic & other"/> - <definition value="Identifies a parent of the relative."/> - <comment value="Some individuals may have more than two parents (e.g. genetic vs. adoptive parents). Even non-genetic relationships can be relevant in terms of genetic exposure."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="player[classCode<LIV, determinerCode=INSTANCE].scopesRole"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="mother | father | adoptive mother | etc."/> - <definition value="Distinguishes between different types of parental relationships with varying granularity to support capturing the relationship "to the degree known"."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="code"/> - </mapping> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ParentRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Parental relationship types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/parent-relationship-codes|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Link to parent relative(s)"/> - <definition value="Points to the FamilyMemberHistory record of the relation who is the parent of this relation."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="player.id"/> - </mapping> - </element> - <element id="Extension.extension:reference.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Mother(s) & Father(s) - genetic & other"/> - <definition value="Identifies a parent of the relative."/> - <comment value="Some individuals may have more than two parents (e.g. genetic vs. adoptive parents). Even non-genetic relationships can be relevant in terms of genetic exposure."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="player[classCode<LIV, determinerCode=INSTANCE].scopesRole"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="mother | father | adoptive mother | etc."/> - <definition value="Distinguishes between different types of parental relationships with varying granularity to support capturing the relationship "to the degree known"."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="code"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ParentRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Parental relationship types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/parent-relationship-codes|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Link to parent relative(s)"/> - <definition value="Points to the FamilyMemberHistory record of the relation who is the parent of this relation."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="player.id"/> - </mapping> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-bindingName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"/> - <version value="4.1.0"/> - <name value="bindingName"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A name that can be used for code generation when generating named enumerations for the binding."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.binding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Suggested Name for code generation"/> - <definition value="A name that can be used for code generation when generating named enumerations for the binding."/> - <comment value="There is no need to use this name for conformance to the specification, but implementers may prefer to match e.g. the schema enumeration name."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Suggested Name for code generation"/> - <definition value="A name that can be used for code generation when generating named enumerations for the binding."/> - <comment value="There is no need to use this name for conformance to the specification, but implementers may prefer to match e.g. the schema enumeration name."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/subscription-event-count"/> - <resource> - <StructureDefinition> - <id value="subscription-event-count"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/subscription-event-count"/> - <version value="4.1.0"/> - <name value="subscription-event-count"/> - <title value="Subscription Event Count"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The number of events this Subscription has attempted to fire (0 for handshake)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.meta"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The number of events this Subscription has attempted to fire"/> - <definition value="The number of events this Subscription has attempted to fire (0 for handshake)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-event-count"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="unsignedInt"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The number of events this Subscription has attempted to fire"/> - <definition value="The number of events this Subscription has attempted to fire (0 for handshake)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-event-count"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="unsignedInt"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-recipientType"/> - <resource> - <StructureDefinition> - <id value="cqf-recipientType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-recipientType"/> - <version value="4.1.0"/> - <name value="recipientType"/> - <title value="recipientType"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-recipientType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-recipientType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserLanguage"/> - <resource> - <StructureDefinition> - <id value="cqf-systemUserLanguage"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserLanguage"/> - <version value="4.1.0"/> - <name value="systemUserLanguage"/> - <title value="systemUserLanguage"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="Preferred language of the person using the system."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="Preferred language of the person using the system."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserLanguage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="Preferred language of the person using the system."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-systemUserLanguage"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-fhir-type"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"/> - <version value="4.1.0"/> - <name value="fhir-type"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The FHIR type of a property - used on the value property of a primitive type (for which there is no type in the FHIR typing system), and Element.id, Resource.id, and Extension.url. All of these have a non-FHIR type in thir structure definition, and this specifies the applicable FHIR type."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.type"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Base FHIR type (when a special property)"/> - <definition value="The FHIR type of a property - used on the value property of a primitive type (for which there is no type in the FHIR typing system), and Element.id, Resource.id, and Extension.url. All of these have a non-FHIR type in thir structure definition, and this specifies the applicable FHIR type."/> - <comment value="This is in effect, compiler magic for the typing system."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="A version specific list of the data types defined by the FHIR specification for use as an element type (any of the FHIR defined data types)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-types|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Base FHIR type (when a special property)"/> - <definition value="The FHIR type of a property - used on the value property of a primitive type (for which there is no type in the FHIR typing system), and Element.id, Resource.id, and Extension.url. All of these have a non-FHIR type in thir structure definition, and this specifies the applicable FHIR type."/> - <comment value="This is in effect, compiler magic for the typing system."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DataType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="A version specific list of the data types defined by the FHIR specification for use as an element type (any of the FHIR defined data types)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/data-types|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-expand-rules"/> - <resource> - <StructureDefinition> - <id value="valueset-expand-rules"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-expand-rules"/> - <version value="4.1.0"/> - <name value="expand-rules"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Defines how concepts are processed into the expansion when it's for UI presentation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="all-codes | ungrouped | groups-only"/> - <definition value="Defines how concepts are processed into the expansion when it's for UI presentation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expand-rules"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ExpansionProcessingRule"/> - </extension> - <strength value="required"/> - <description value="Defines how concepts are processed into the expansion when it's for UI presentation."/> - <valueSet value="http://hl7.org/fhir/ValueSet/expansion-processing-rule|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="all-codes | ungrouped | groups-only"/> - <definition value="Defines how concepts are processed into the expansion when it's for UI presentation."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expand-rules"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ExpansionProcessingRule"/> - </extension> - <strength value="required"/> - <description value="Defines how concepts are processed into the expansion when it's for UI presentation."/> - <valueSet value="http://hl7.org/fhir/ValueSet/expansion-processing-rule|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-rules-text"/> - <resource> - <StructureDefinition> - <id value="valueset-rules-text"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-rules-text"/> - <version value="4.1.0"/> - <name value="rules-text"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An alternative non-computable expression of the value set content"/> - <definition value="An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-rules-text"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An alternative non-computable expression of the value set content"/> - <definition value="An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-rules-text"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/contactpoint-extension"/> - <resource> - <StructureDefinition> - <id value="contactpoint-extension"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/contactpoint-extension"/> - <version value="4.1.0"/> - <name value="extension"/> - <title value="Extension"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The number that may be dialed within a private phone network or after successfully connecting to a private phone network. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ContactPoint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Number within private network"/> - <definition value="The number that may be dialed within a private phone network or after successfully connecting to a private phone network. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-extension"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Number within private network"/> - <definition value="The number that may be dialed within a private phone network or after successfully connecting to a private phone network. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-extension"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/maxSize"/> - <resource> - <StructureDefinition> - <id value="maxSize"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/maxSize"/> - <version value="4.1.0"/> - <name value="maxSize"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="For attachment answers, indicates the maximum size an attachment can be."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Max size in MB"/> - <definition value="For attachment answers, indicates the maximum size an attachment can be."/> - <comment value="This extension only has meaning if the element has a type of Attachment."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxSize"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Max size in MB"/> - <definition value="For attachment answers, indicates the maximum size an attachment can be."/> - <comment value="This extension only has meaning if the element has a type of Attachment."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxSize"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-location"/> - <resource> - <StructureDefinition> - <id value="openEHR-location"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-location"/> - <version value="4.1.0"/> - <name value="location"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="The anatomical location / body site(s) where the symptoms manifested."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Body site of manifestations"/> - <definition value="The anatomical location / body site(s) where the symptoms manifested."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-location"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="BodySite"/> - </extension> - <strength value="extensible"/> - <description value="Codes describing anatomical locations. May include laterality."/> - <valueSet value="http://hl7.org/fhir/ValueSet/body-site"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Body site of manifestations"/> - <definition value="The anatomical location / body site(s) where the symptoms manifested."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-location"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="BodySite"/> - </extension> - <strength value="extensible"/> - <description value="Codes describing anatomical locations. May include laterality."/> - <valueSet value="http://hl7.org/fhir/ValueSet/body-site"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/operationdefinition-profile"/> - <resource> - <StructureDefinition> - <id value="operationdefinition-profile"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/operationdefinition-profile"/> - <version value="4.1.0"/> - <name value="profile"/> - <title value="Profile"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OperationDefinition.parameter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Profiles (StructureDefinition or IG) - one must apply"/> - <definition value="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationdefinition-profile"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Profiles (StructureDefinition or IG) - one must apply"/> - <definition value="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationdefinition-profile"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-NumberOfInstances"/> - <resource> - <StructureDefinition> - <id value="auditevent-NumberOfInstances"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-NumberOfInstances"/> - <version value="4.1.0"/> - <name value="NumberOfInstances"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="The Number of SOP Instances referred to by this entity."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Number of SOP Instances referred to by this entity"/> - <definition value="The Number of SOP Instances referred to by this entity."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="NumberOfInstances"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-NumberOfInstances"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Number of SOP Instances referred to by this entity"/> - <definition value="The Number of SOP Instances referred to by this entity."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="dicom"/> - <map value="NumberOfInstances"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-NumberOfInstances"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/match-grade"/> - <resource> - <StructureDefinition> - <id value="match-grade"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/match-grade"/> - <version value="4.1.0"/> - <name value="match-grade"/> - <title value="Matching Grade"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Assessment of resource match outcome - how likely this resource is to be a match."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.entry.search"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="How likely this resource is to be a match"/> - <definition value="Assessment of resource match outcome - how likely this resource is to be a match."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/match-grade"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="MatchGrade"/> - </extension> - <strength value="required"/> - <description value="A Master Patient Index (MPI) assessment of whether a candidate patient record is a match or not."/> - <valueSet value="http://hl7.org/fhir/ValueSet/match-grade|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="How likely this resource is to be a match"/> - <definition value="Assessment of resource match outcome - how likely this resource is to be a match."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/match-grade"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="MatchGrade"/> - </extension> - <strength value="required"/> - <description value="A Master Patient Index (MPI) assessment of whether a candidate patient record is a match or not."/> - <valueSet value="http://hl7.org/fhir/ValueSet/match-grade|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-extensible"/> - <resource> - <StructureDefinition> - <id value="valueset-extensible"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-extensible"/> - <version value="4.1.0"/> - <name value="extensible"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Whether this is intended to be used with an extensible binding or not."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Intended to be used with an extensible binding (e.g. 'open')"/> - <definition value="Whether this is intended to be used with an extensible binding or not."/> - <comment value="Value sets intended for extensible bindings often are more selective about the concepts they include."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-extensible"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Intended to be used with an extensible binding (e.g. 'open')"/> - <definition value="Whether this is intended to be used with an extensible binding or not."/> - <comment value="Value sets intended for extensible bindings often are more selective about the concepts they include."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-extensible"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/subscription-url"/> - <resource> - <StructureDefinition> - <id value="subscription-url"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/subscription-url"/> - <version value="4.1.0"/> - <name value="subscription-url"/> - <title value="Subscription URL"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The URL for the Subscription this notification relates to (local to server)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.meta"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The URL for the Subscription this notification relates to"/> - <definition value="The URL for the Subscription this notification relates to (local to server)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-url"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="url"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The URL for the Subscription this notification relates to"/> - <definition value="The URL for the Subscription this notification relates to (local to server)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-url"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="url"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/> - <resource> - <StructureDefinition> - <id value="patient-birthTime"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/> - <version value="4.1.0"/> - <name value="birthTime"/> - <title value="Birth Time"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The time of day that the Patient was born. This includes the date to ensure that the timezone information can be communicated effectively."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient.birthDate"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Time of day of birth"/> - <definition value="The time of day that the Patient was born. This includes the date to ensure that the timezone information can be communicated effectively."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Time of day of birth"/> - <definition value="The time of day that the Patient was born. This includes the date to ensure that the timezone information can be communicated effectively."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-animal"/> - <resource> - <StructureDefinition> - <id value="patient-animal"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-animal"/> - <version value="4.1.0"/> - <name value="animal"/> - <title value="animal"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This patient is known to be an animal."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="This patient is known to be an animal (non-human)"/> - <definition value="This patient is known to be an animal."/> - <comment value="The absence of the animal extension does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required. (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="player[classCode=ANM]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:species"> - <path value="Extension.extension"/> - <sliceName value="species"/> - <short value="The animal species. E.g. Dog, Cow."/> - <definition value="Identifies the high level taxonomic categorization of the kind of animal."/> - <comment value="If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognized taxonomic classification. It might or might not be Linnaean taxonomy and might or might not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species. (The common example is that the word "Hereford" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for "Hereford Cattle Breed" does.)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="PID-35"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="code"/> - </mapping> - </element> - <element id="Extension.extension:species.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:species.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:species.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="species"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:species.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalSpecies"/> - </extension> - <strength value="example"/> - <description value="The species of an animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-species"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:breed"> - <path value="Extension.extension"/> - <sliceName value="breed"/> - <short value="The animal breed. E.g. Poodle, Angus."/> - <definition value="Identifies the detailed categorization of the kind of animal."/> - <comment value="Breed MAY be used to provide further taxonomic or non-taxonomic classification. It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="PID-35 (where more detailed value is present)"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code"/> - </mapping> - </element> - <element id="Extension.extension:breed.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:breed.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:breed.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="breed"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:breed.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalBreed"/> - </extension> - <strength value="example"/> - <description value="The breed of an animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-breeds"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:genderStatus"> - <path value="Extension.extension"/> - <sliceName value="genderStatus"/> - <short value="The status of the animal's reproductive parts. E.g. Neutered, Intact."/> - <definition value="Indicates the current state of the animal's reproductive organs."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="genderStatusCode"/> - </mapping> - </element> - <element id="Extension.extension:genderStatus.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:genderStatus.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:genderStatus.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="genderStatus"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:genderStatus.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalGenderStatus"/> - </extension> - <strength value="example"/> - <description value="The state of the animal's reproductive organs."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-genderstatus"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-animal"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="This patient is known to be an animal (non-human)"/> - <definition value="This patient is known to be an animal."/> - <comment value="The absence of the animal extension does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required. (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal)."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="player[classCode=ANM]"/> - </mapping> - </element> - <element id="Extension.extension:species"> - <path value="Extension.extension"/> - <sliceName value="species"/> - <short value="The animal species. E.g. Dog, Cow."/> - <definition value="Identifies the high level taxonomic categorization of the kind of animal."/> - <comment value="If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognized taxonomic classification. It might or might not be Linnaean taxonomy and might or might not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species. (The common example is that the word "Hereford" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for "Hereford Cattle Breed" does.)."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="PID-35"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="code"/> - </mapping> - </element> - <element id="Extension.extension:species.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:species.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="species"/> - </element> - <element id="Extension.extension:species.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalSpecies"/> - </extension> - <strength value="example"/> - <description value="The species of an animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-species"/> - </binding> - </element> - <element id="Extension.extension:breed"> - <path value="Extension.extension"/> - <sliceName value="breed"/> - <short value="The animal breed. E.g. Poodle, Angus."/> - <definition value="Identifies the detailed categorization of the kind of animal."/> - <comment value="Breed MAY be used to provide further taxonomic or non-taxonomic classification. It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="PID-35 (where more detailed value is present)"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code"/> - </mapping> - </element> - <element id="Extension.extension:breed.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:breed.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="breed"/> - </element> - <element id="Extension.extension:breed.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalBreed"/> - </extension> - <strength value="example"/> - <description value="The breed of an animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-breeds"/> - </binding> - </element> - <element id="Extension.extension:genderStatus"> - <path value="Extension.extension"/> - <sliceName value="genderStatus"/> - <short value="The status of the animal's reproductive parts. E.g. Neutered, Intact."/> - <definition value="Indicates the current state of the animal's reproductive organs."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="genderStatusCode"/> - </mapping> - </element> - <element id="Extension.extension:genderStatus.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:genderStatus.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="genderStatus"/> - </element> - <element id="Extension.extension:genderStatus.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalGenderStatus"/> - </extension> - <strength value="example"/> - <description value="The state of the animal's reproductive organs."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-genderstatus"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-animal"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/minValue"/> - <resource> - <StructureDefinition> - <id value="minValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/minValue"/> - <version value="4.1.0"/> - <name value="minValue"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The inclusive lower bound on the range of allowed values for the data element."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Must be >= this value"/> - <definition value="The inclusive lower bound on the range of allowed values for the data element."/> - <comment value="Data type specified must be the same as the data type for the data element."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/minValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Must be >= this value"/> - <definition value="The inclusive lower bound on the range of allowed values for the data element."/> - <comment value="Data type specified must be the same as the data type for the data element."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/minValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal"/> - <resource> - <StructureDefinition> - <id value="resource-pertainsToGoal"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal"/> - <version value="4.1.0"/> - <name value="pertainsToGoal"/> - <title value="pertains to goal"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Indicates that the resource is related to either the measurement, achievement or progress towards the referenced goal. For example, a Procedure to exercise pertainsToGoal of losing weight."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Resource"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Pertains to goal"/> - <definition value="Indicates that the resource is related to either the measurement, achievement or progress towards the referenced goal. For example, a Procedure to exercise pertainsToGoal of losing weight."/> - <comment value="This extension is limited to subject-specific activity-related resources (events & intents). I.e. This can't be put on Goal or Patient. This association isn't for the purpose of goal management, but for things such as noting that a particular observation result, prescription or other activity is pertinent to the achievement (or possibly non-achievement) of the referenced goal."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Pertains to goal"/> - <definition value="Indicates that the resource is related to either the measurement, achievement or progress towards the referenced goal. For example, a Procedure to exercise pertainsToGoal of losing weight."/> - <comment value="This extension is limited to subject-specific activity-related resources (events & intents). I.e. This can't be put on Goal or Patient. This association isn't for the purpose of goal management, but for things such as noting that a particular observation result, prescription or other activity is pertinent to the achievement (or possibly non-achievement) of the referenced goal."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-extends"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-extends"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-extends"/> - <version value="4.1.0"/> - <name value="extends"/> - <title value="Extends"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The report references related ("sibling") reports."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Related reports"/> - <definition value="The report references related ("sibling") reports."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-extends"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Related reports"/> - <definition value="The report references related ("sibling") reports."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-extends"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-usage"/> - <resource> - <StructureDefinition> - <id value="valueset-usage"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-usage"/> - <version value="4.1.0"/> - <name value="usage"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has used and how?"/> - <definition value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <comment value="This is likely to be a point-in-time view and should not be considered an authoritative listing of all uses of the value set."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:user"> - <path value="Extension.extension"/> - <sliceName value="user"/> - <short value="A consumer of or client for the value set"/> - <definition value="This is most likely to be an organization but can be an individual. It would not be a program, that information should be recorded in the usage.use."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:user.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:user.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:user.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="user"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:user.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Implementation/project/standard that uses value set"/> - <definition value="A descriptive name of the project or standard in which the value set is used."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-usage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has used and how?"/> - <definition value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <comment value="This is likely to be a point-in-time view and should not be considered an authoritative listing of all uses of the value set."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:user"> - <path value="Extension.extension"/> - <sliceName value="user"/> - <short value="A consumer of or client for the value set"/> - <definition value="This is most likely to be an organization but can be an individual. It would not be a program, that information should be recorded in the usage.use."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:user.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:user.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="user"/> - </element> - <element id="Extension.extension:user.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Implementation/project/standard that uses value set"/> - <definition value="A descriptive name of the project or standard in which the value set is used."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-usage"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingOrganization"/> - <resource> - <StructureDefinition> - <id value="cqf-initiatingOrganization"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingOrganization"/> - <version value="4.1.0"/> - <name value="initiatingOrganization"/> - <title value="initiatingOrganization"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The organization initiating the request."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The organization initiating the request."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingOrganization"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The organization initiating the request."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initiatingOrganization"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement-search-parameter-combination"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination"/> - <version value="4.1.0"/> - <name value="search-parameter-combination"/> - <title value="Search Parameter Combination"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An allowable parameter combination"/> - <definition value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <comment value="For example, on the Patient Resource you could use this to state support for searching by Patient.name and Patient.gender is required."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:required"> - <path value="Extension.extension"/> - <sliceName value="required"/> - <short value="A required search parameter name"/> - <definition value="A search parameter name in the combination which is required."/> - <min value="1"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:required.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:required.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="required"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional"> - <path value="Extension.extension"/> - <sliceName value="optional"/> - <short value="An optional search parameter name"/> - <definition value="A search parameter name in the combination which is optional."/> - <comment value="If a defined parameter is not listed as a required or optional parameter, the implication is that the parameter is not supported with this combination. Servers may ignore It, though some may return an error if it is used."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:optional.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:optional.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="optional"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An allowable parameter combination"/> - <definition value="This extension defines a possible search parameter combination, by listing a set of search parameters and indicating whether they are required or optional. If a search combination is specified, clients should expect that they must submit a search that meets one of the required combinations or the search will be unsuccessful. If multiple search parameter combinations are specified, a client may pick between them, and supply the minimal required parameters for any of the combinations."/> - <comment value="For example, on the Patient Resource you could use this to state support for searching by Patient.name and Patient.gender is required."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required"> - <path value="Extension.extension"/> - <sliceName value="required"/> - <short value="A required search parameter name"/> - <definition value="A search parameter name in the combination which is required."/> - <min value="1"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:required.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:required.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="required"/> - </element> - <element id="Extension.extension:required.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:optional"> - <path value="Extension.extension"/> - <sliceName value="optional"/> - <short value="An optional search parameter name"/> - <definition value="A search parameter name in the combination which is optional."/> - <comment value="If a defined parameter is not listed as a required or optional parameter, the implication is that the parameter is not supported with this combination. Servers may ignore It, though some may return an error if it is used."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:optional.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:optional.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="optional"/> - </element> - <element id="Extension.extension:optional.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-expression"/> - <resource> - <StructureDefinition> - <id value="cqf-expression"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-expression"/> - <version value="4.1.0"/> - <name value="expression"/> - <title value="expression"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="An expression that, when evaluated, provides the value for the element on which it appears."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An dynamic expression"/> - <definition value="An expression that, when evaluated, provides the value for the element on which it appears."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-expression"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Expression"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An dynamic expression"/> - <definition value="An expression that, when evaluated, provides the value for the element on which it appears."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-expression"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Expression"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity"/> - <resource> - <StructureDefinition> - <id value="familymemberhistory-severity"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity"/> - <version value="4.1.0"/> - <name value="severity"/> - <title value="severity"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A qualification of the seriousness or impact on health of the family member condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory.condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The seriousness of the family member condition"/> - <definition value="A qualification of the seriousness or impact on health of the family member condition."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionSeverity"/> - </extension> - <strength value="example"/> - <description value="A subjective assessment of the severity of the condition as evaluated by the clinician."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-severity"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The seriousness of the family member condition"/> - <definition value="A qualification of the seriousness or impact on health of the family member condition."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionSeverity"/> - </extension> - <strength value="example"/> - <description value="A subjective assessment of the severity of the condition as evaluated by the clinician."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-severity"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing"/> - <resource> - <StructureDefinition> - <id value="condition-occurredFollowing"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing"/> - <version value="4.1.0"/> - <name value="occurredFollowing"/> - <title value="occurredFollowing"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Precedent for this Condition"/> - <definition value="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value=".typeCode"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionPredecessor"/> - </extension> - <strength value="example"/> - <description value="Codes that describe activities or observations that occurred prior to the condition."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-predecessor"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Precedent for this Condition"/> - <definition value="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value=".typeCode"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionPredecessor"/> - </extension> - <strength value="example"/> - <description value="Codes that describe activities or observations that occurred prior to the condition."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-predecessor"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-Instance"/> - <resource> - <StructureDefinition> - <id value="auditevent-Instance"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-Instance"/> - <version value="4.1.0"/> - <name value="Instance"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="Th SOP Instance UID values."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="SOP Instance UID value"/> - <definition value="Th SOP Instance UID values."/> - <comment value="Including the list of SOP Instances can create a large audit message. Under most circumstances, the list of SOP Instance UIDs is not needed for audit purposes."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="Instance"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Instance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Identifier"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="SOP Instance UID value"/> - <definition value="Th SOP Instance UID values."/> - <comment value="Including the list of SOP Instances can create a large audit message. Under most circumstances, the list of SOP Instance UIDs is not needed for audit purposes."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="dicom"/> - <map value="Instance"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Instance"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Identifier"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryMode"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryMode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryMode"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryMode"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryMode"/> - <definition value="Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DMOD]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryMode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryMode"/> - <definition value="Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DMOD]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryMode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-steward"/> - <resource> - <StructureDefinition> - <id value="valueset-steward"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-steward"/> - <version value="4.1.0"/> - <name value="steward"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The entity that is responsible for the content of the Value Set Definition. This is a textual description of the organizational entity responsible for the content and maintenance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Entity responsible for Value Set"/> - <definition value="The entity that is responsible for the content of the Value Set Definition. This is a textual description of the organizational entity responsible for the content and maintenance."/> - <comment value="The information included should include contact information."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-steward"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="ContactDetail"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Entity responsible for Value Set"/> - <definition value="The entity that is responsible for the content of the Value Set Definition. This is a textual description of the organizational entity responsible for the content and maintenance."/> - <comment value="The information included should include contact information."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-steward"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="ContactDetail"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-bestpractice"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"/> - <version value="4.1.0"/> - <name value="bestpractice"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Mark that an invariant represents 'best practice' rule - a rule that implementers may choose to enforce at error level in some or all circumstances."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.constraint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Mark a warning invariant as 'best practice'"/> - <definition value="Mark that an invariant represents 'best practice' rule - a rule that implementers may choose to enforce at error level in some or all circumstances."/> - <comment value="Validators may/should offer implementers the choice to enforce invariants labeled as 'best practice' as errors not warnings."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceUseContext"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="extensible"/> - <description value="Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use."/> - <valueSet value="http://hl7.org/fhir/ValueSet/use-context"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Mark a warning invariant as 'best practice'"/> - <definition value="Mark that an invariant represents 'best practice' rule - a rule that implementers may choose to enforce at error level in some or all circumstances."/> - <comment value="Validators may/should offer implementers the choice to enforce invariants labeled as 'best practice' as errors not warnings."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceUseContext"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="extensible"/> - <description value="Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use."/> - <valueSet value="http://hl7.org/fhir/ValueSet/use-context"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"/> - <resource> - <StructureDefinition> - <id value="DiagnosticReport-geneticsAnalysis"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"/> - <version value="4.1.0"/> - <name value="Analysis"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Knowledge-based comments on the effect of the sequence on patient's condition/medication reaction."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Analysis"/> - <definition value="Knowledge-based comments on the effect of the sequence on patient's condition/medication reaction."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="Analysis type"/> - <definition value="Type of the analysis. E.g. for a drug, what is being analyzed - efficacy, reaction, the drug's effect on the user's metabolism, etc."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:interpretation"> - <path value="Extension.extension"/> - <sliceName value="interpretation"/> - <short value="Analysis interpretation"/> - <definition value="Interpretation of the sequence's effect on the patient's condition or reaction to a medication."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:interpretation.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:interpretation.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:interpretation.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="interpretation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:interpretation.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Analysis"/> - <definition value="Knowledge-based comments on the effect of the sequence on patient's condition/medication reaction."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="Analysis type"/> - <definition value="Type of the analysis. E.g. for a drug, what is being analyzed - efficacy, reaction, the drug's effect on the user's metabolism, etc."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:interpretation"> - <path value="Extension.extension"/> - <sliceName value="interpretation"/> - <short value="Analysis interpretation"/> - <definition value="Interpretation of the sequence's effect on the patient's condition or reaction to a medication."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:interpretation.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:interpretation.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="interpretation"/> - </element> - <element id="Extension.extension:interpretation.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-xml-no-order"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order"/> - <version value="4.1.0"/> - <name value="xml-no-order"/> - <title value="No Order in XML"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Whether elements can come in any order in XML."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether elements can come in any order (XML)"/> - <definition value="Whether elements can come in any order in XML."/> - <comment value="This is never set in FHIR Resources or Data types, but may be encountered in other structure definitions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether elements can come in any order (XML)"/> - <definition value="Whether elements can come in any order in XML."/> - <comment value="This is never set in FHIR Resources or Data types, but may be encountered in other structure definitions."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/nutritionorder-adaptiveFeedingDevice"/> - <resource> - <StructureDefinition> - <id value="nutritionorder-adaptiveFeedingDevice"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/nutritionorder-adaptiveFeedingDevice"/> - <version value="4.1.0"/> - <name value="adaptiveFeedingDevice"/> - <title value="Adaptive Feeding Device"/> - <status value="draft"/> - <date value="2017-10-18"/> - <publisher value="Health Level Seven, Inc. - Orders and Observations WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="Materials used or needed to feed the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="NutritionOrder.oralDiet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Adaptive Feeding Device"/> - <definition value="Materials used or needed to feed the patient."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/nutritionorder-adaptiveFeedingDevice"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FeedingDevice"/> - </extension> - <strength value="example"/> - <description value="Materials used or needed to feed the patient."/> - <valueSet value="http://hl7.org/fhir/ValueSet/feeding-device"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Adaptive Feeding Device"/> - <definition value="Materials used or needed to feed the patient."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/nutritionorder-adaptiveFeedingDevice"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FeedingDevice"/> - </extension> - <strength value="example"/> - <description value="Materials used or needed to feed the patient."/> - <valueSet value="http://hl7.org/fhir/ValueSet/feeding-device"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-preferenceType"/> - <resource> - <StructureDefinition> - <id value="patient-preferenceType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-preferenceType"/> - <version value="4.1.0"/> - <name value="preferenceType"/> - <title value="preferenceType"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Indicates what mode of communication the patient prefers to use for the indicated language."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient.communication.preferred"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The type of the patient's preferred language."/> - <definition value="Indicates what mode of communication the patient prefers to use for the indicated language."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-preferenceType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="LanguagePreferenceType"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://hl7.org/fhir/ValueSet/language-preference-type"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The type of the patient's preferred language."/> - <definition value="Indicates what mode of communication the patient prefers to use for the indicated language."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-preferenceType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="LanguagePreferenceType"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://hl7.org/fhir/ValueSet/language-preference-type"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/maxValue"/> - <resource> - <StructureDefinition> - <id value="maxValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/maxValue"/> - <version value="4.1.0"/> - <name value="maxValue"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The inclusive upper bound on the range of allowed values for the data element."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Must be <= this value"/> - <definition value="The inclusive upper bound on the range of allowed values for the data element."/> - <comment value="Data type specified must be the same as the data type for the data element."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Must be <= this value"/> - <definition value="The inclusive upper bound on the range of allowed values for the data element."/> - <comment value="Data type specified must be the same as the data type for the data element."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/maxValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/relative-date"/> - <resource> - <StructureDefinition> - <id value="relative-date"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/relative-date"/> - <version value="4.1.0"/> - <name value="Relative Date Criteria"/> - <title value="Relative Date Criteria"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Specifies that a date is relative to some event. The event happens [Duration] after [Event]."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="date"/> - </context> - <context> - <type value="element"/> - <expression value="dateTime"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Relative Date Criteria"/> - <definition value="Specifies that a date is relative to some event. The event happens [Duration] after [Event]."/> - <comment value="This extension is used when a precise date is not known, but rather, the date will be relative to some future event (e.g. Do this 2 weeks after an operation)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:event"> - <path value="Extension.extension"/> - <sliceName value="event"/> - <short value="Event that the date is relative to"/> - <definition value="The event that the date(time) is relative to."/> - <comment value="This can be a reference to a particular event, or a kind of event (usually where the kind would not happen very frequently)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:event.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:event.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:event.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="event"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:event.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:relationship"> - <path value="Extension.extension"/> - <sliceName value="relationship"/> - <short value="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end"/> - <definition value="Defines the relationship between the event and the date."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:relationship.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:relationship.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:relationship.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="relationship"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:relationship.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ActionRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Defines the types of relationships between actions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/action-relationship-type|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:offset"> - <path value="Extension.extension"/> - <sliceName value="offset"/> - <short value="Duration after the event"/> - <definition value="The duration after the event that the date(time) will happen."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:offset.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:offset.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:offset.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:offset.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/relative-date"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Relative Date Criteria"/> - <definition value="Specifies that a date is relative to some event. The event happens [Duration] after [Event]."/> - <comment value="This extension is used when a precise date is not known, but rather, the date will be relative to some future event (e.g. Do this 2 weeks after an operation)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:event"> - <path value="Extension.extension"/> - <sliceName value="event"/> - <short value="Event that the date is relative to"/> - <definition value="The event that the date(time) is relative to."/> - <comment value="This can be a reference to a particular event, or a kind of event (usually where the kind would not happen very frequently)."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:event.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:event.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="event"/> - </element> - <element id="Extension.extension:event.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:relationship"> - <path value="Extension.extension"/> - <sliceName value="relationship"/> - <short value="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end"/> - <definition value="Defines the relationship between the event and the date."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:relationship.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:relationship.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="relationship"/> - </element> - <element id="Extension.extension:relationship.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ActionRelationshipType"/> - </extension> - <strength value="required"/> - <description value="Defines the types of relationships between actions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/action-relationship-type|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:offset"> - <path value="Extension.extension"/> - <sliceName value="offset"/> - <short value="Duration after the event"/> - <definition value="The duration after the event that the date(time) will happen."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:offset.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:offset.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - </element> - <element id="Extension.extension:offset.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/relative-date"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-statusReason"/> - <resource> - <StructureDefinition> - <id value="event-statusReason"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-statusReason"/> - <version value="4.1.0"/> - <name value="statusReason"/> - <title value="Reason for current status"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Captures the reason for the current state of the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceUseStatement"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reason for current status"/> - <definition value="Captures the reason for the current state of the resource."/> - <comment value="This is generally only used for "exception" statuses such as "not-done", "suspended" or "cancelled". The reason for performing the event at all is captured in reasonCode, not here. (distinct reason codes for different statuses can be enforced using invariants if they are universal bindings)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.statusReason"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-statusReason"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StatusReason"/> - </extension> - <strength value="example"/> - <description value="Codes identifying the reason for the current state of an event."/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reason for current status"/> - <definition value="Captures the reason for the current state of the resource."/> - <comment value="This is generally only used for "exception" statuses such as "not-done", "suspended" or "cancelled". The reason for performing the event at all is captured in reasonCode, not here. (distinct reason codes for different statuses can be enforced using invariants if they are universal bindings)."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="workflow"/> - <map value="Event.statusReason"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-statusReason"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StatusReason"/> - </extension> - <strength value="example"/> - <description value="Codes identifying the reason for the current state of an event."/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence"/> - <resource> - <StructureDefinition> - <id value="cqf-qualityOfEvidence"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence"/> - <version value="4.1.0"/> - <name value="qualityOfEvidence"/> - <title value="qualityOfEvidence"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Attachment"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The quality of the evidence"/> - <definition value="The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QualityOfEvidenceRating"/> - </extension> - <strength value="example"/> - <description value="A rating system that describes the quality of evidence such as the GRADE, DynaMed, or Oxford CEBM systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/evidence-quality"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The quality of the evidence"/> - <definition value="The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QualityOfEvidenceRating"/> - </extension> - <strength value="example"/> - <description value="A rating system that describes the quality of evidence such as the GRADE, DynaMed, or Oxford CEBM systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/evidence-quality"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/replaces"/> - <resource> - <StructureDefinition> - <id value="replaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/replaces"/> - <version value="4.1.0"/> - <name value="replaces"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Indicates a resource that this resource is replacing."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ActivityDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement2"/> - </context> - <context> - <type value="element"/> - <expression value="ChargeItemDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <context> - <type value="element"/> - <expression value="CompartmentDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="ConceptMap"/> - </context> - <context> - <type value="element"/> - <expression value="ConditionDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="EventDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="Evidence"/> - </context> - <context> - <type value="element"/> - <expression value="EvidenceVariable"/> - </context> - <context> - <type value="element"/> - <expression value="ExampleScenario"/> - </context> - <context> - <type value="element"/> - <expression value="GraphDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="ImplementationGuide"/> - </context> - <context> - <type value="element"/> - <expression value="Library"/> - </context> - <context> - <type value="element"/> - <expression value="Measure"/> - </context> - <context> - <type value="element"/> - <expression value="MessageDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="NamingSystem"/> - </context> - <context> - <type value="element"/> - <expression value="OperationDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="PlanDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire"/> - </context> - <context> - <type value="element"/> - <expression value="SearchParameter"/> - </context> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="StructureMap"/> - </context> - <context> - <type value="element"/> - <expression value="TerminologyCapabilities"/> - </context> - <context> - <type value="element"/> - <expression value="TestScript"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="References a resource that this resource replaces"/> - <definition value="Indicates a resource that this resource is replacing."/> - <comment value="This is usually a versioned reference. Often, it will be to another version of the same resource."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/replaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="References a resource that this resource replaces"/> - <definition value="Indicates a resource that this resource is replacing."/> - <comment value="This is usually a versioned reference. Often, it will be to another version of the same resource."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/replaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason"/> - <resource> - <StructureDefinition> - <id value="questionnaireresponse-reason"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason"/> - <version value="4.1.0"/> - <name value="reason"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="The factor(s) that caused the questionnaire to be answered."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Why response was created"/> - <definition value="The factor(s) that caused the questionnaire to be answered."/> - <comment value="The reason for completion is typically implicit in the form design or may be explicit as a question in the form itself. This element exists when neither of these other two means suffice."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireResponseReason"/> - </extension> - <strength value="example"/> - <description value="Codes indicating why the response was captured. For example, admitting, referral, insurance claim, etc."/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Why response was created"/> - <definition value="The factor(s) that caused the questionnaire to be answered."/> - <comment value="The reason for completion is typically implicit in the form design or may be explicit as a question in the form itself. This element exists when neither of these other two means suffice."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireResponseReason"/> - </extension> - <strength value="example"/> - <description value="Codes indicating why the response was captured. For example, admitting, referral, insurance claim, etc."/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/careplan-activity-title"/> - <resource> - <StructureDefinition> - <id value="careplan-activity-title"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/careplan-activity-title"/> - <version value="4.1.0"/> - <name value="activity-title"/> - <title value="Title"/> - <status value="draft"/> - <date value="2015-03-27"/> - <publisher value="Health Level Seven, Inc. - Patient Care WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/patientcare.html"/> - </telecom> - </contact> - <description value="Human-friendly name for the activity."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CarePlan.activity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Label for activity"/> - <definition value="Human-friendly name for the activity."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/careplan-activity-title"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Label for activity"/> - <definition value="Human-friendly name for the activity."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/careplan-activity-title"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsCopyNumberEvent"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"/> - <version value="4.1.0"/> - <name value="CopyNumberEvent"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="A variation that increases or decreases the copy number of a given region ([SO:0001019](http://www.sequenceontology.org/browser/current_svn/term/SO:0001019)). Values: amplification/deletion/LOH."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Copy number variation"/> - <definition value="A variation that increases or decreases the copy number of a given region ([SO:0001019](http://www.sequenceontology.org/browser/current_svn/term/SO:0001019)). Values: amplification/deletion/LOH."/> - <comment value="Loss of heterozygosity (LOH) is a functional variant whereby the sequence alteration causes a loss of function of one allele of a gene ([SO:0001786](http://www.sequenceontology.org/browser/current_svn/term/SO:0001786))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Copy number variation"/> - <definition value="A variation that increases or decreases the copy number of a given region ([SO:0001019](http://www.sequenceontology.org/browser/current_svn/term/SO:0001019)). Values: amplification/deletion/LOH."/> - <comment value="Loss of heterozygosity (LOH) is a functional variant whereby the sequence alteration causes a loss of function of one allele of a gene ([SO:0001786](http://www.sequenceontology.org/browser/current_svn/term/SO:0001786))."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-standards-status"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"/> - <version value="4.1.0"/> - <name value="standards-status"/> - <title value="Standards Status"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The Current HL7 ballot/Standards status of this artifact."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="HL7 Ballot/Standards status of artifact"/> - <definition value="The Current HL7 ballot/Standards status of this artifact."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StandardsStatus"/> - </extension> - <strength value="required"/> - <description value="HL7 Ballot/Standards status of artifact."/> - <valueSet value="http://hl7.org/fhir/ValueSet/standards-status|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="HL7 Ballot/Standards status of artifact"/> - <definition value="The Current HL7 ballot/Standards status of this artifact."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StandardsStatus"/> - </extension> - <strength value="required"/> - <description value="HL7 Ballot/Standards status of artifact."/> - <valueSet value="http://hl7.org/fhir/ValueSet/standards-status|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation"/> - <resource> - <StructureDefinition> - <id value="iso21090-PQ-translation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation"/> - <version value="4.1.0"/> - <name value="PQ-translation"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="An alternative representation of the same physical quantity expressed in a different unit from a different unit code system and possibly with a different value."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Quantity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Same quantity with different units"/> - <definition value="An alternative representation of the same physical quantity expressed in a different unit from a different unit code system and possibly with a different value."/> - <comment value="It is not necessary for information processing entities to check and enforce that the translations are valid translations of the base unit, but they are allowed to do so, and to reject instances where the translations are not valid. NOTE Translations are allowed to contain other representations in UCUM units, but there is generally no point to this as it is possible to convert from one UCUM form to another."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="PQ.translation"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Quantity"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Same quantity with different units"/> - <definition value="An alternative representation of the same physical quantity expressed in a different unit from a different unit code system and possibly with a different value."/> - <comment value="It is not necessary for information processing entities to check and enforce that the translations are valid translations of the base unit, but they are allowed to do so, and to reject instances where the translations are not valid. NOTE Translations are allowed to contain other representations in UCUM units, but there is generally no point to this as it is possible to convert from one UCUM form to another."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="PQ.translation"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Quantity"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/consent-NotificationEndpoint"/> - <resource> - <StructureDefinition> - <id value="consent-NotificationEndpoint"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="cbcc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/consent-NotificationEndpoint"/> - <version value="4.1.0"/> - <name value="NotificationEndpoint"/> - <title value="Disclosure Notification Endpoint"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - CBCC WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm"/> - </telecom> - </contact> - <description value="Endpoint for sending Disclosure notifications in the form of FHIR AuditEvent records."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Consent"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Notification Endpoint"/> - <definition value="Endpoint for sending Disclosure notifications in the form of FHIR AuditEvent records."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-NotificationEndpoint"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Notification Endpoint"/> - <definition value="Endpoint for sending Disclosure notifications in the form of FHIR AuditEvent records."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-NotificationEndpoint"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-receivingPerson"/> - <resource> - <StructureDefinition> - <id value="cqf-receivingPerson"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-receivingPerson"/> - <version value="4.1.0"/> - <name value="receivingPerson"/> - <title value="receivingPerson"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The person in the receiving organization that will receive the response."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The person in the receiving organization that will receive the response."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-receivingPerson"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Person"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The person in the receiving organization that will receive the response."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-receivingPerson"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Person"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-performerOrder"/> - <resource> - <StructureDefinition> - <id value="request-performerOrder"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-performerOrder"/> - <version value="4.1.0"/> - <name value="performerOrder"/> - <title value="Performer Order"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Identifies the relative preference of alternative performers when the request lists multiple performers."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ServiceRequest.performer"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Performer Order"/> - <definition value="Identifies the relative preference of alternative performers when the request lists multiple performers."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-performerOrder"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Performer Order"/> - <definition value="Identifies the relative preference of alternative performers when the request lists multiple performers."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-performerOrder"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-map"/> - <resource> - <StructureDefinition> - <id value="codesystem-map"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-map"/> - <version value="4.1.0"/> - <name value="map"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A concept map relevant to interpret this value set"/> - <definition value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <comment value="One use of this extension is to use it to include a partial concept map inside an expansion, only containing maps for the concepts included in this particular expansion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-map"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A concept map relevant to interpret this value set"/> - <definition value="A reference to a concept map that is relevant for the interpretation of this value set."/> - <comment value="One use of this extension is to use it to include a partial concept map inside an expansion, only containing maps for the concepts included in this particular expansion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-map"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ConceptMap"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-focusCode"/> - <resource> - <StructureDefinition> - <id value="observation-focusCode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-focusCode"/> - <version value="4.1.0"/> - <name value="focusCode"/> - <title value="Focal Subject Code"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="A code representing the focus of an observation when the focus is not the patient of record. In other words, the focus of the observation is different from `Observation.subject`. An example use case would be using the *Observation* resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is focal subject referenced using this extension. Other example focal subjects include spouses, related persons, feti, or donors."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Focus Code"/> - <definition value="A code representing the focus of an observation when the focus is not the patient of record. In other words, the focus of the observation is different from `Observation.subject`. An example use case would be using the *Observation* resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is focal subject referenced using this extension. Other example focal subjects include spouses, related persons, feti, or donors."/> - <comment value="Use Observation.specimen element to describe the specimen. Only used if not implicit in code found in Observation.code."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-focusCode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FocusCode"/> - </extension> - <strength value="example"/> - <description value="Codes for observation targets. Derived from both HL7 v3 and SNOMED CT code systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/focal-subject"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Focus Code"/> - <definition value="A code representing the focus of an observation when the focus is not the patient of record. In other words, the focus of the observation is different from `Observation.subject`. An example use case would be using the *Observation* resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is focal subject referenced using this extension. Other example focal subjects include spouses, related persons, feti, or donors."/> - <comment value="Use Observation.specimen element to describe the specimen. Only used if not implicit in code found in Observation.code."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-focusCode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FocusCode"/> - </extension> - <strength value="example"/> - <description value="Codes for observation targets. Derived from both HL7 v3 and SNOMED CT code systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/focal-subject"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-namespace"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"/> - <version value="4.1.0"/> - <name value="namespace"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Use this extension to indicate tha the element has an XML namespace different to http://hl7.org/fhir."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="specify namespace other than http://hl7.org/fhir"/> - <definition value="Use this extension to indicate tha the element has an XML namespace different to http://hl7.org/fhir."/> - <comment value="If this is specified in a structure definition (logical models only), every element has the specified namespace."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="specify namespace other than http://hl7.org/fhir"/> - <definition value="Use this extension to indicate tha the element has an XML namespace different to http://hl7.org/fhir."/> - <comment value="If this is specified in a structure definition (logical models only), every element has the specified namespace."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-Anonymized"/> - <resource> - <StructureDefinition> - <id value="auditevent-Anonymized"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-Anonymized"/> - <version value="4.1.0"/> - <name value="Anonymized"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="True or False indicating whether all patient identifying information was removed from the data."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Anonymized state"/> - <definition value="True or False indicating whether all patient identifying information was removed from the data."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="Anonymized"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Anonymized"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Anonymized state"/> - <definition value="True or False indicating whether all patient identifying information was removed from the data."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="dicom"/> - <map value="Anonymized"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-Anonymized"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-dependencies"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies"/> - <version value="4.1.0"/> - <name value="dependencies"/> - <title value="Dependent Profiles"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Instances can only be valid against this StructureDefinition, if they also sucessfully validate against the dependent profile identified in this extension."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Dependent Profiles - must be valid against these too"/> - <definition value="Instances can only be valid against this StructureDefinition, if they also sucessfully validate against the dependent profile identified in this extension."/> - <comment value="Ideally, a profile will restate the constraints of it's base profile and all it's dependent profiles, but this can get pretty complicated once slicing enters the picture. Tools SHOULD not assume that this profile includes all the constraints from the dependent profile."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Dependent Profiles - must be valid against these too"/> - <definition value="Instances can only be valid against this StructureDefinition, if they also sucessfully validate against the dependent profile identified in this extension."/> - <comment value="Ideally, a profile will restate the constraints of it's base profile and all it's dependent profiles, but this can get pretty complicated once slicing enters the picture. Tools SHOULD not assume that this profile includes all the constraints from the dependent profile."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-initialValue"/> - <resource> - <StructureDefinition> - <id value="cqf-initialValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-initialValue"/> - <version value="4.1.0"/> - <name value="initialValue"/> - <title value="initialValue"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The name of an expression in a referenced library that determines an initial value."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An initial value expression"/> - <definition value="The name of an expression in a referenced library that determines an initial value."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initialValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An initial value expression"/> - <definition value="The name of an expression in a referenced library that determines an initial value."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-initialValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-delimiter"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-delimiter"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-delimiter"/> - <version value="4.1.0"/> - <name value="ADXP-delimiter"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="delimiter"/> - <definition value="Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."/> - <comment value="This really has no rationale for use in FHIR."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DEL]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-delimiter"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="delimiter"/> - <definition value="Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."/> - <comment value="This really has no rationale for use in FHIR."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DEL]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-delimiter"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-inheritedExtensibleValueSet"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-inheritedExtensibleValueSet"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-inheritedExtensibleValueSet"/> - <version value="4.1.0"/> - <name value="inheritedExtensibleValueSet"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A reference to an extensible value set specified in a parent profie in order to allow a conformance checking tool to validate that a code not in the extensible value set of the profile is not violating rules defined by parent profile bindings."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.binding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An extensible Value Set specified in a parent profile"/> - <definition value="A reference to an extensible value set specified in a parent profie in order to allow a conformance checking tool to validate that a code not in the extensible value set of the profile is not violating rules defined by parent profile bindings."/> - <comment value="This extension is only needed where the binding strength is 'extensible', the parents are also 'extensible'. This allows a validator to work around the fact that restricting extensible value sets in child profiles loses constraints out of the parent profiles, (e.g. codes to be used when appropriate)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-inheritedExtensibleValueSet"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An extensible Value Set specified in a parent profile"/> - <definition value="A reference to an extensible value set specified in a parent profie in order to allow a conformance checking tool to validate that a code not in the extensible value set of the profile is not violating rules defined by parent profile bindings."/> - <comment value="This extension is only needed where the binding strength is 'extensible', the parents are also 'extensible'. This allows a validator to work around the fact that restricting extensible value sets in child profiles loses constraints out of the parent profiles, (e.g. codes to be used when appropriate)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-inheritedExtensibleValueSet"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-basedOn"/> - <resource> - <StructureDefinition> - <id value="event-basedOn"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-basedOn"/> - <version value="4.1.0"/> - <name value="basedOn"/> - <title value="Based On"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="A plan, proposal or order that is fulfilled in whole or in part by this event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Fulfills plan, proposal or order"/> - <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.basedOn"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="ORC in proximity to EVN segment"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=FLFS].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-basedOn"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Fulfills plan, proposal or order"/> - <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.basedOn"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="ORC in proximity to EVN segment"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=FLFS].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-basedOn"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsInterpretation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"/> - <version value="4.1.0"/> - <name value="Interpretation"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Clinical Interpretations for variant. It's a reference to an Observation resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical interpretations for variant"/> - <definition value="Clinical Interpretations for variant. It's a reference to an Observation resource."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Clinical interpretations for variant"/> - <definition value="Clinical Interpretations for variant. It's a reference to an Observation resource."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-congregation"/> - <resource> - <StructureDefinition> - <id value="patient-congregation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-congregation"/> - <version value="4.1.0"/> - <name value="congregation"/> - <title value="congregation"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A group or place of religious practice that may provide services to the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A group of place of religious practice"/> - <definition value="A group or place of religious practice that may provide services to the patient."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-congregation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A group of place of religious practice"/> - <definition value="A group or place of religious practice that may provide services to the patient."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-congregation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDescription"/> - <resource> - <StructureDefinition> - <id value="openEHR-exposureDescription"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDescription"/> - <version value="4.1.0"/> - <name value="exposureDescription"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Text description about exposure to the Substance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Text description about exposure to the Substance"/> - <definition value="Text description about exposure to the Substance."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDescription"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Text description about exposure to the Substance"/> - <definition value="Text description about exposure to the Substance."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDescription"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-proficiency"/> - <resource> - <StructureDefinition> - <id value="patient-proficiency"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-proficiency"/> - <version value="4.1.0"/> - <name value="proficiency"/> - <title value="proficiency"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Proficiency level of the communication."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient.communication"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Proficiency level of the communication"/> - <definition value="Proficiency level of the communication."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:level"> - <path value="Extension.extension"/> - <sliceName value="level"/> - <short value="The proficiency level of the communication"/> - <definition value="How well the patient can communicate this communication (good, poor, etc.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:level.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:level.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:level.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="level"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:level.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProficiencyLevel"/> - </extension> - <strength value="preferred"/> - <description value="The proficiency level for the communication."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-LanguageAbilityProficiency"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="The proficiency type of the communication"/> - <definition value="What type of communication for the proficiency (spoken, written, etc.)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="proficiencyType"/> - </extension> - <strength value="preferred"/> - <description value="The proficiency type for the communication."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-LanguageAbilityMode"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-proficiency"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Proficiency level of the communication"/> - <definition value="Proficiency level of the communication."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:level"> - <path value="Extension.extension"/> - <sliceName value="level"/> - <short value="The proficiency level of the communication"/> - <definition value="How well the patient can communicate this communication (good, poor, etc.)."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:level.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:level.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="level"/> - </element> - <element id="Extension.extension:level.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ProficiencyLevel"/> - </extension> - <strength value="preferred"/> - <description value="The proficiency level for the communication."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-LanguageAbilityProficiency"/> - </binding> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="The proficiency type of the communication"/> - <definition value="What type of communication for the proficiency (spoken, written, etc.)."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="proficiencyType"/> - </extension> - <strength value="preferred"/> - <description value="The proficiency type for the communication."/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-LanguageAbilityMode"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-proficiency"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-caseSensitive"/> - <resource> - <StructureDefinition> - <id value="valueset-caseSensitive"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-caseSensitive"/> - <version value="4.1.0"/> - <name value="caseSensitive"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="If this a case sensitive code."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.expansion.contains"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="If code is case sensitive"/> - <definition value="If this a case sensitive code."/> - <comment value="See comments on ValueSet.codeSystem.caseSensitive. Systems should generally assume case sensitivity when dealing with expansions, and only consider case sensitivity when matching existing codes."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-caseSensitive"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="If code is case sensitive"/> - <definition value="If this a case sensitive code."/> - <comment value="See comments on ValueSet.codeSystem.caseSensitive. Systems should generally assume case sensitivity when dealing with expansions, and only consider case sensitivity when matching existing codes."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-caseSensitive"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/geolocation"/> - <resource> - <StructureDefinition> - <id value="geolocation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/geolocation"/> - <version value="4.1.0"/> - <name value="Geolocation"/> - <title value="Geolocation"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The absolute geographic location"/> - <definition value="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)."/> - <comment value="The extension can be further extended to include unique geolocation identifiers, confidence, altitude, etc."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:latitude"> - <path value="Extension.extension"/> - <sliceName value="latitude"/> - <short value="Latitude with WGS84 datum"/> - <definition value="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:latitude.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:latitude.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:latitude.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="latitude"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:latitude.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:longitude"> - <path value="Extension.extension"/> - <sliceName value="longitude"/> - <short value="Longitude with WGS84 datum"/> - <definition value="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:longitude.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:longitude.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:longitude.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="longitude"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:longitude.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/geolocation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The absolute geographic location"/> - <definition value="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)."/> - <comment value="The extension can be further extended to include unique geolocation identifiers, confidence, altitude, etc."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:latitude"> - <path value="Extension.extension"/> - <sliceName value="latitude"/> - <short value="Latitude with WGS84 datum"/> - <definition value="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:latitude.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:latitude.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="latitude"/> - </element> - <element id="Extension.extension:latitude.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - <element id="Extension.extension:longitude"> - <path value="Extension.extension"/> - <sliceName value="longitude"/> - <short value="Longitude with WGS84 datum"/> - <definition value="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:longitude.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:longitude.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="longitude"/> - </element> - <element id="Extension.extension:longitude.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/geolocation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-citation"/> - <resource> - <StructureDefinition> - <id value="cqf-citation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-citation"/> - <version value="4.1.0"/> - <name value="citation"/> - <title value="citation"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="A bibliographic citation for the related resource. This text SHOULD be formatted according to an accepted citation format."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Attachment"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Bibliographic citation for the resource"/> - <definition value="A bibliographic citation for the related resource. This text SHOULD be formatted according to an accepted citation format."/> - <comment value="Additional structured information about citations should be captured as extensions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-citation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Bibliographic citation for the resource"/> - <definition value="A bibliographic citation for the related resource. This text SHOULD be formatted according to an accepted citation format."/> - <comment value="Additional structured information about citations should be captured as extensions."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-citation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDate"/> - <resource> - <StructureDefinition> - <id value="openEHR-exposureDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDate"/> - <version value="4.1.0"/> - <name value="exposureDate"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Record of the date and/or time of the first exposure to the Substance for this Reaction Event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Date(/time) of first exposure to Substance"/> - <definition value="Record of the date and/or time of the first exposure to the Substance for this Reaction Event."/> - <comment value="Exposure can be more complicated by more than one exposure events leading to a reaction. Further details about the nature of the exposure can be provided in additional extensions, or as text in the Exposure Description extension."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Date(/time) of first exposure to Substance"/> - <definition value="Record of the date and/or time of the first exposure to the Substance for this Reaction Event."/> - <comment value="Exposure can be more complicated by more than one exposure events leading to a reaction. Further details about the nature of the exposure can be provided in additional extensions, or as text in the Exposure Description extension."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-exposureDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/auditevent-SOPClass"/> - <resource> - <StructureDefinition> - <id value="auditevent-SOPClass"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sec"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/auditevent-SOPClass"/> - <version value="4.1.0"/> - <name value="SOPClass"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - Security WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/security/index.cfm"/> - </telecom> - </contact> - <description value="Required if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") and any of the optional fields (AccessionNumber, ContainsMPPS, NumberOfInstances, ContainsSOPInstances,Encrypted,Anonymized) are present in this Participant Object. May be present if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") even though none of the optional fields are present."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="dicom"/> - <uri value="http://nema.org/dicom"/> - <name value="DICOM Tag Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AuditEvent.entity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="UIDs of SOP classes referred to"/> - <definition value="Required if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") and any of the optional fields (AccessionNumber, ContainsMPPS, NumberOfInstances, ContainsSOPInstances,Encrypted,Anonymized) are present in this Participant Object. May be present if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") even though none of the optional fields are present."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="dicom"/> - <map value="SOPClass"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-SOPClass"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="UIDs of SOP classes referred to"/> - <definition value="Required if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") and any of the optional fields (AccessionNumber, ContainsMPPS, NumberOfInstances, ContainsSOPInstances,Encrypted,Anonymized) are present in this Participant Object. May be present if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") even though none of the optional fields are present."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="dicom"/> - <map value="SOPClass"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/auditevent-SOPClass"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-relevantHistory"/> - <resource> - <StructureDefinition> - <id value="request-relevantHistory"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-relevantHistory"/> - <version value="4.1.0"/> - <name value="relevantHistory"/> - <title value="Relevant History"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Key events in history of request"/> - <definition value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource."/> - <comment value="This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a _revinclude. Referenced provenances should adhere to the provenance-relevant-history profile."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-relevantHistory"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Key events in history of request"/> - <definition value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource."/> - <comment value="This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a _revinclude. Referenced provenances should adhere to the provenance-relevant-history profile."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-relevantHistory"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-expirationDate"/> - <resource> - <StructureDefinition> - <id value="codesystem-expirationDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-expirationDate"/> - <version value="4.1.0"/> - <name value="expirationDate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value MUST present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version should no longer be used"/> - <definition value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value MUST present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <comment value="Upon reaching the Expiration Date, the value set Activity Status should be consdiered as inactive. An Inactive value set version may no longer be used to create new content, but it may be used to evaluate content created prior to the Expiration Date."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-expirationDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version should no longer be used"/> - <definition value="The date when the value set version is no longer expected to be used to create new content. This is the first date-time when the value set version becomes Inactive, so this value MUST present on all Inactive value set versions. The start Date_time is expected to be as of 0001 UTC of the Expiration Date."/> - <comment value="Upon reaching the Expiration Date, the value set Activity Status should be consdiered as inactive. An Inactive value set version may no longer be used to create new content, but it may be used to evaluate content created prior to the Expiration Date."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-expirationDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-disability"/> - <resource> - <StructureDefinition> - <id value="patient-disability"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-disability"/> - <version value="4.1.0"/> - <name value="disability"/> - <title value="disability"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Value(s) identifying physical or mental condition(s) that limits a person's movements, senses, or activities."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Condition(s) limiting movement, senses, or activities"/> - <definition value="Value(s) identifying physical or mental condition(s) that limits a person's movements, senses, or activities."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-disability"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Condition(s) limiting movement, senses, or activities"/> - <definition value="Value(s) identifying physical or mental condition(s) that limits a person's movements, senses, or activities."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-disability"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/specimen-processingTime"/> - <resource> - <StructureDefinition> - <id value="specimen-processingTime"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/specimen-processingTime"/> - <version value="4.1.0"/> - <name value="processingTime"/> - <title value="Processing Time"/> - <status value="draft"/> - <date value="2015-02-19"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Period or duration of processing."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Specimen.processing"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Time of processing"/> - <definition value="Period or duration of processing."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-processingTime"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Period"/> - </type> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Time of processing"/> - <definition value="Period or duration of processing."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-processingTime"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Period"/> - </type> - <type> - <code value="Duration"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue"/> - <resource> - <StructureDefinition> - <id value="cqf-calculatedValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue"/> - <version value="4.1.0"/> - <name value="calculatedValue"/> - <title value="calculatedValue"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The name of an expression in a referenced library that determines a calculated value."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A calculated value"/> - <definition value="The name of an expression in a referenced library that determines a calculated value."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A calculated value"/> - <definition value="The name of an expression in a referenced library that determines a calculated value."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"/> - <resource> - <StructureDefinition> - <id value="DiagnosticReport-geneticsFamilyMemberHistory"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"/> - <version value="4.1.0"/> - <name value="FamilyMemberHistory"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="FamilyHistory"/> - <definition value="Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="FamilyHistory"/> - <definition value="Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/mimeType"/> - <resource> - <StructureDefinition> - <id value="mimeType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/mimeType"/> - <version value="4.1.0"/> - <name value="mimeType"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Identifies the kind(s) of attachment allowed to be sent for an element."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Type of attachment"/> - <definition value="Identifies the kind(s) of attachment allowed to be sent for an element."/> - <comment value="This extension only has meaning if the element has a type of Attachment."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/mimeType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="MimeType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="The mime type of an attachment. Any valid mime type is allowed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/mimetypes|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Type of attachment"/> - <definition value="Identifies the kind(s) of attachment allowed to be sent for an element."/> - <comment value="This extension only has meaning if the element has a type of Attachment."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/mimeType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="MimeType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="The mime type of an attachment. Any valid mime type is allowed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/mimetypes|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-deviceCode"/> - <resource> - <StructureDefinition> - <id value="observation-deviceCode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-deviceCode"/> - <version value="4.1.0"/> - <name value="deviceCode"/> - <title value="Device Code"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="A code representing the the type of device used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A code representing the the type of device used for this observation. Should only be used if not implicit in the code found in `Observation.code`"/> - <definition value="A code representing the the type of device used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-deviceCode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DeviceCode"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/device-kind"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A code representing the the type of device used for this observation. Should only be used if not implicit in the code found in `Observation.code`"/> - <definition value="A code representing the the type of device used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-deviceCode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="DeviceCode"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/device-kind"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-special-status"/> - <resource> - <StructureDefinition> - <id value="valueset-special-status"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-special-status"/> - <version value="4.1.0"/> - <name value="special-status"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A special note for implementers about the status of the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Special note about status for implementers"/> - <definition value="A special note for implementers about the status of the resource."/> - <comment value="This is used in the build to mark that though a resource is normative, it changes with the build."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-special-status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Special note about status for implementers"/> - <definition value="A special note for implementers about the status of the resource."/> - <comment value="This is used in the build to mark that though a resource is normative, it changes with the build."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-special-status"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"/> - <resource> - <StructureDefinition> - <id value="humanname-fathers-family"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"/> - <version value="4.1.0"/> - <name value="fathers-family"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The portion of the family name that is derived from the person's father."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion of family name derived from father"/> - <definition value="The portion of the family name that is derived from the person's father."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion of family name derived from father"/> - <definition value="The portion of the family name that is derived from the person's father."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs"/> - <resource> - <StructureDefinition> - <id value="questionnaire-maxOccurs"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs"/> - <version value="4.1.0"/> - <name value="maxOccurs"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type!='display' and (repeats=true or %extension.valueInteger=1)"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum repetitions"/> - <definition value="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited."/> - <comment value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Maximum repetitions"/> - <definition value="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited."/> - <comment value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-reagent"/> - <resource> - <StructureDefinition> - <id value="observation-reagent"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-reagent"/> - <version value="4.1.0"/> - <name value="reagent"/> - <title value="Reagent"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="Reference to reagents used to generate this observation. This is intended for this for in-lab transactions between instruments and Laboratory Information Systems (LIS)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to reagents used to generate this observation."/> - <definition value="Reference to reagents used to generate this observation. This is intended for this for in-lab transactions between instruments and Laboratory Information Systems (LIS)."/> - <comment value="Note this extension may be superseded by elements in planned instrumentation management resource elements."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-reagent"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Substance"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to reagents used to generate this observation."/> - <definition value="Reference to reagents used to generate this observation. This is intended for this for in-lab transactions between instruments and Laboratory Information Systems (LIS)."/> - <comment value="Note this extension may be superseded by elements in planned instrumentation management resource elements."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-reagent"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Substance"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/flag-priority"/> - <resource> - <StructureDefinition> - <id value="flag-priority"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/flag-priority"/> - <version value="4.1.0"/> - <name value="priority"/> - <title value="Flag Priority"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - Patient Care WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A code that identifies the priority of the alert, for example the Alert Priority flags column in IHE PCD TF 2 Table B.8-4."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Flag"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="An alarm code"/> - <definition value="A code that identifies the priority of the alert, for example the Alert Priority flags column in IHE PCD TF 2 Table B.8-4."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/flag-priority"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FlagPriority"/> - </extension> - <strength value="example"/> - <description value="A code of the alarm."/> - <valueSet value="http://hl7.org/fhir/ValueSet/flag-priority"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="An alarm code"/> - <definition value="A code that identifies the priority of the alert, for example the Alert Priority flags column in IHE PCD TF 2 Table B.8-4."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/flag-priority"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FlagPriority"/> - </extension> - <strength value="example"/> - <description value="A code of the alarm."/> - <valueSet value="http://hl7.org/fhir/ValueSet/flag-priority"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-precondition"/> - <resource> - <StructureDefinition> - <id value="observation-precondition"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-precondition"/> - <version value="4.1.0"/> - <name value="precondition"/> - <title value="Precondition"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="Other preceding or concurrent observations that must be known to correctly interpret the the observation. For example an fiO2 measure taken alongside of a SpO2 measurement. See the [Observation notes](observation.html#notes) section for additional guidance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Other Observations needed to aid in the interpretation of the source observation."/> - <definition value="Other preceding or concurrent observations that must be known to correctly interpret the the observation. For example an fiO2 measure taken alongside of a SpO2 measurement. See the [Observation notes](observation.html#notes) section for additional guidance."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-precondition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Other Observations needed to aid in the interpretation of the source observation."/> - <definition value="Other preceding or concurrent observations that must be known to correctly interpret the the observation. For example an fiO2 measure taken alongside of a SpO2 measurement. See the [Observation notes](observation.html#notes) section for additional guidance."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-precondition"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-specimenCode"/> - <resource> - <StructureDefinition> - <id value="observation-specimenCode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-specimenCode"/> - <version value="4.1.0"/> - <name value="specimenCode"/> - <title value="Specimen Code"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="A code representing the the type of specimen used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A code representing the the type of specimen used for this observation. Should only be used if not implicit in the code found in `Observation.code`"/> - <definition value="A code representing the the type of specimen used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-specimenCode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SpecimenCode"/> - </extension> - <strength value="example"/> - <valueSet value="http://terminology.hl7.org/ValueSet/v2-0487"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A code representing the the type of specimen used for this observation. Should only be used if not implicit in the code found in `Observation.code`"/> - <definition value="A code representing the the type of specimen used for this observation. Should only be used if not implicit in the code found in `Observation.code`."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-specimenCode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SpecimenCode"/> - </extension> - <strength value="example"/> - <valueSet value="http://terminology.hl7.org/ValueSet/v2-0487"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-usage"/> - <resource> - <StructureDefinition> - <id value="codesystem-usage"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-usage"/> - <version value="4.1.0"/> - <name value="usage"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has used and how?"/> - <definition value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <comment value="This is likely to be a ???point in time??? view and should not be considered an authoritative listing of all uses of the value set."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:user"> - <path value="Extension.extension"/> - <sliceName value="user"/> - <short value="A consumer of or client for the value set"/> - <definition value="This is most likely to be an organization but can be an individual. It would not be a program, that information should be recorded in the usage.use."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:user.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:user.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:user.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="user"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:user.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Implementation/project/standard that uses value set"/> - <definition value="A descriptive name of the project or standard in which the value set is used."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-usage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has used and how?"/> - <definition value="Consumers of the value set and the implementations, projects or standards that the author has utilized the value set in."/> - <comment value="This is likely to be a ???point in time??? view and should not be considered an authoritative listing of all uses of the value set."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:user"> - <path value="Extension.extension"/> - <sliceName value="user"/> - <short value="A consumer of or client for the value set"/> - <definition value="This is most likely to be an organization but can be an individual. It would not be a program, that information should be recorded in the usage.use."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:user.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:user.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="user"/> - </element> - <element id="Extension.extension:user.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Implementation/project/standard that uses value set"/> - <definition value="A descriptive name of the project or standard in which the value set is used."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-usage"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/originalText"/> - <resource> - <StructureDefinition> - <id value="originalText"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/originalText"/> - <version value="4.1.0"/> - <name value="Original Text"/> - <title value="Original Text"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="A human language representation of the concept (resource/element) as seen/selected/uttered by the user who entered the data and/or which represents the full intended meaning of the user. This can be provided either directly as text, or as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Original Text that represents the data as seen/selected/uttered originally"/> - <definition value="A human language representation of the concept (resource/element) as seen/selected/uttered by the user who entered the data and/or which represents the full intended meaning of the user. This can be provided either directly as text, or as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <comment value="The data in the element does not always capture the correct meaning with all the nuances of the original text. In these cases, the text is used to capture the full meaning of the source. This is commonly used to provide "what did the user actually see/type". Note that this extension has the same definition as CodeableConcept.text and SHALL NOT be used on CodeableConcept with type = string in place of CodeableConcept.text but MAY be used with type url. If present on a CodeableConcept with type url as well as CodeableConcept.text, then the CodeableConcept.text SHALL match the referenced narrative. It's also possible to link to the resource narrative using the [narrativeLink extension](extension-narrativelink.html) which does not claim that the data is derived from the text."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/originalText"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Original Text that represents the data as seen/selected/uttered originally"/> - <definition value="A human language representation of the concept (resource/element) as seen/selected/uttered by the user who entered the data and/or which represents the full intended meaning of the user. This can be provided either directly as text, or as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <comment value="The data in the element does not always capture the correct meaning with all the nuances of the original text. In these cases, the text is used to capture the full meaning of the source. This is commonly used to provide "what did the user actually see/type". Note that this extension has the same definition as CodeableConcept.text and SHALL NOT be used on CodeableConcept with type = string in place of CodeableConcept.text but MAY be used with type url. If present on a CodeableConcept with type url as well as CodeableConcept.text, then the CodeableConcept.text SHALL match the referenced narrative. It's also possible to link to the resource narrative using the [narrativeLink extension](extension-narrativelink.html) which does not claim that the data is derived from the text."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/originalText"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"/> - <resource> - <StructureDefinition> - <id value="family-member-history-genetics-observation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"/> - <version value="4.1.0"/> - <name value="observation"/> - <status value="draft"/> - <date value="2019-05-29"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Allows capturing risk-relevant observations about the relative that aren't themselves a specific health condition; e.g. Certain ethnic ancestries that are disease-relevant, presence of particular genetic markers, etc."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Genetic markers, ethnicity, etc."/> - <definition value="Allows capturing risk-relevant observations about the relative that aren't themselves a specific health condition; e.g. Certain ethnic ancestries that are disease-relevant, presence of particular genetic markers, etc."/> - <comment value="This may be extended with additional genomics-specific resources when they are ready."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="inboundRelationship[typeCode=SUBJ].source"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Genetic markers, ethnicity, etc."/> - <definition value="Allows capturing risk-relevant observations about the relative that aren't themselves a specific health condition; e.g. Certain ethnic ancestries that are disease-relevant, presence of particular genetic markers, etc."/> - <comment value="This may be extended with additional genomics-specific resources when they are ready."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="inboundRelationship[typeCode=SUBJ].source"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/dosage-conditions"/> - <resource> - <StructureDefinition> - <id value="dosage-conditions"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/dosage-conditions"/> - <version value="4.1.0"/> - <name value="conditions"/> - <status value="draft"/> - <date value="2019-01-25"/> - <publisher value="Health Level Seven, Inc. - Pharmacy WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/Pharmacy"/> - </telecom> - </contact> - <description value="Conditions that apply to this set of dosing instructions."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Dosage"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Dosage conditions"/> - <definition value="Conditions that apply to this set of dosing instructions."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal"> - <path value="Extension.extension"/> - <sliceName value="meetGoal"/> - <short value="Extension"/> - <definition value="Follow the dosage instructions until the specified goal is met."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset"> - <path value="Extension.extension.extension"/> - <sliceName value="offset"/> - <short value="Extension"/> - <definition value="Specifies the offset before or after the goal is met to follow the instructions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension:offset.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension:offset.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension:goal"> - <path value="Extension.extension.extension"/> - <sliceName value="goal"/> - <short value="Extension"/> - <definition value="The specific goal to meet to follow the dosage instructions."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.extension:goal.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension:goal.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:meetGoal.extension:goal.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="goal"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.extension:goal.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="meetGoal"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:meetGoal.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger"> - <path value="Extension.extension"/> - <sliceName value="whenTrigger"/> - <short value="Extension"/> - <definition value="A condition that causes the dosage instructions to be followed."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset"> - <path value="Extension.extension.extension"/> - <sliceName value="offset"/> - <short value="Extension"/> - <definition value="Specifies the offset before or after the trigger happens to follow the instructions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Duration"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger"> - <path value="Extension.extension.extension"/> - <sliceName value="trigger"/> - <short value="Extension"/> - <definition value="The event that causes the dosage instruction to be followed."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="trigger"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="whenTrigger"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:whenTrigger.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition"> - <path value="Extension.extension"/> - <sliceName value="precondition"/> - <short value="Extension"/> - <definition value="A condition that must (or must not) be present for the dosage instructions to be followed."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur"> - <path value="Extension.extension.extension"/> - <sliceName value="doesNotOccur"/> - <short value="Extension"/> - <definition value="If set to 'true', indicates that the condition must not be present for the dosage instructions to be followed."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="doesNotOccur"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension:condition"> - <path value="Extension.extension.extension"/> - <sliceName value="condition"/> - <short value="Extension"/> - <definition value="The event that causes the dosage instruction to be followed."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.extension:condition.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension:condition.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:precondition.extension:condition.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="condition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition.extension:condition.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="precondition"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:precondition.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/dosage-conditions"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Dosage conditions"/> - <definition value="Conditions that apply to this set of dosing instructions."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:meetGoal"> - <path value="Extension.extension"/> - <sliceName value="meetGoal"/> - <definition value="Follow the dosage instructions until the specified goal is met."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:meetGoal.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset"> - <path value="Extension.extension.extension"/> - <sliceName value="offset"/> - <definition value="Specifies the offset before or after the goal is met to follow the instructions."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:meetGoal.extension:offset.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - </element> - <element id="Extension.extension:meetGoal.extension:offset.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - </element> - <element id="Extension.extension:meetGoal.extension:goal"> - <path value="Extension.extension.extension"/> - <sliceName value="goal"/> - <definition value="The specific goal to meet to follow the dosage instructions."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:meetGoal.extension:goal.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:meetGoal.extension:goal.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="goal"/> - </element> - <element id="Extension.extension:meetGoal.extension:goal.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal"/> - </type> - </element> - <element id="Extension.extension:meetGoal.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="meetGoal"/> - </element> - <element id="Extension.extension:meetGoal.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - <element id="Extension.extension:whenTrigger"> - <path value="Extension.extension"/> - <sliceName value="whenTrigger"/> - <definition value="A condition that causes the dosage instructions to be followed."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:whenTrigger.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset"> - <path value="Extension.extension.extension"/> - <sliceName value="offset"/> - <definition value="Specifies the offset before or after the trigger happens to follow the instructions."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="offset"/> - </element> - <element id="Extension.extension:whenTrigger.extension:offset.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Duration"/> - </type> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger"> - <path value="Extension.extension.extension"/> - <sliceName value="trigger"/> - <definition value="The event that causes the dosage instruction to be followed."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="trigger"/> - </element> - <element id="Extension.extension:whenTrigger.extension:trigger.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - <element id="Extension.extension:whenTrigger.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="whenTrigger"/> - </element> - <element id="Extension.extension:whenTrigger.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - <element id="Extension.extension:precondition"> - <path value="Extension.extension"/> - <sliceName value="precondition"/> - <definition value="A condition that must (or must not) be present for the dosage instructions to be followed."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:precondition.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur"> - <path value="Extension.extension.extension"/> - <sliceName value="doesNotOccur"/> - <definition value="If set to 'true', indicates that the condition must not be present for the dosage instructions to be followed."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="doesNotOccur"/> - </element> - <element id="Extension.extension:precondition.extension:doesNotOccur.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - <element id="Extension.extension:precondition.extension:condition"> - <path value="Extension.extension.extension"/> - <sliceName value="condition"/> - <definition value="The event that causes the dosage instruction to be followed."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:precondition.extension:condition.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:precondition.extension:condition.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="condition"/> - </element> - <element id="Extension.extension:precondition.extension:condition.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - <element id="Extension.extension:precondition.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="precondition"/> - </element> - <element id="Extension.extension:precondition.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/dosage-conditions"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"/> - <resource> - <StructureDefinition> - <id value="encounter-associatedEncounter"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"/> - <version value="4.1.0"/> - <name value="associatedEncounter"/> - <title value="associatedEncounter"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="This encounter occurs within the scope of the referenced encounter."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Encounter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated Encounter"/> - <definition value="This encounter occurs within the scope of the referenced encounter."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated Encounter"/> - <definition value="This encounter occurs within the scope of the referenced encounter."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-location"/> - <resource> - <StructureDefinition> - <id value="event-location"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-location"/> - <version value="4.1.0"/> - <name value="location"/> - <title value="Event Location"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="The principal physical location where the {{title}} was performed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where event occurred"/> - <definition value="The principal physical location where the {{title}} was performed."/> - <comment value="May reference only *Provenance* resources deemed “relevant” or important. This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.location"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.7"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=LOC].role"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-location"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where event occurred"/> - <definition value="The principal physical location where the {{title}} was performed."/> - <comment value="May reference only *Provenance* resources deemed “relevant” or important. This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="workflow"/> - <map value="Event.location"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.7"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=LOC].role"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-location"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-wg"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"/> - <version value="4.1.0"/> - <name value="wg"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The work group that owns and maintains this resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Owning Work Group"/> - <definition value="The work group that owns and maintains this resource."/> - <comment value="This is mostly used in the main specification."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HL7Workgroup"/> - </extension> - <strength value="required"/> - <description value="An HL7 administrative unit that owns artifacts in the FHIR specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/hl7-work-group|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Owning Work Group"/> - <definition value="The work group that owns and maintains this resource."/> - <comment value="This is mostly used in the main specification."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HL7Workgroup"/> - </extension> - <strength value="required"/> - <description value="An HL7 administrative unit that owns artifacts in the FHIR specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/hl7-work-group|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-concept-comments"/> - <resource> - <StructureDefinition> - <id value="valueset-concept-comments"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-concept-comments"/> - <version value="4.1.0"/> - <name value="concept-comments"/> - <title value="Comment"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Comment about the use of this code in this context"/> - <definition value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-concept-comments"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Comment about the use of this code in this context"/> - <definition value="A comment that explains how this code is used in this context (where the value set is expected to be used)."/> - <comment value="This is used in various FHIR value sets to make comments on how particular codes are used when the formal definition is a little abstract or vague, but it's not clear whether it belongs in the actual value set resource."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-concept-comments"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement"/> - <resource> - <StructureDefinition> - <id value="familymemberhistory-abatement"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement"/> - <version value="4.1.0"/> - <name value="abatement"/> - <title value="abatement"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The approximate date, age, or flag indicating that the condition of the family member resolved. The abatement should only be specified if the condition is stated in the positive sense, i.e., the didNotHave flag is false."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory.condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When (or if) the family member's condition resolved"/> - <definition value="The approximate date, age, or flag indicating that the condition of the family member resolved. The abatement should only be specified if the condition is stated in the positive sense, i.e., the didNotHave flag is false."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When (or if) the family member's condition resolved"/> - <definition value="The approximate date, age, or flag indicating that the condition of the family member resolved. The abatement should only be specified if the condition is stated in the positive sense, i.e., the didNotHave flag is false."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/careteam-alias"/> - <resource> - <StructureDefinition> - <id value="careteam-alias"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/careteam-alias"/> - <version value="4.1.0"/> - <name value="alias"/> - <title value="Alias"/> - <status value="draft"/> - <date value="2019-09-16"/> - <publisher value="Health Level Seven, Inc. - Patient Care WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/patientcare.html"/> - </telecom> - </contact> - <description value="Alternate names by which the team is also known."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CareTeam"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternate names by which the team is also known"/> - <definition value="Alternate names by which the team is also known."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/careteam-alias"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternate names by which the team is also known"/> - <definition value="Alternate names by which the team is also known."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/careteam-alias"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-expansionSource"/> - <resource> - <StructureDefinition> - <id value="valueset-expansionSource"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-expansionSource"/> - <version value="4.1.0"/> - <name value="expansionSource"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The logical URL of the ValueSet definition that was used to generate this expansion."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.expansion"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="ValueSet definition used to generate this expansion (logical URL)"/> - <definition value="The logical URL of the ValueSet definition that was used to generate this expansion."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expansionSource"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="ValueSet definition used to generate this expansion (logical URL)"/> - <definition value="The logical URL of the ValueSet definition that was used to generate this expansion."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-expansionSource"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/communication-media"/> - <resource> - <StructureDefinition> - <id value="communication-media"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/communication-media"/> - <version value="4.1.0"/> - <name value="media"/> - <title value="media"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="It contains enriched media representation of the alert message, such as a voice recording. This may be used, for example for compliance with jurisdictional accessibility requirements, literacy issues, or translations of the unstructured text content in other languages."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Communication"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Attached media"/> - <definition value="It contains enriched media representation of the alert message, such as a voice recording. This may be used, for example for compliance with jurisdictional accessibility requirements, literacy issues, or translations of the unstructured text content in other languages."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/communication-media"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Attachment"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Attached media"/> - <definition value="It contains enriched media representation of the alert message, such as a voice recording. This may be used, for example for compliance with jurisdictional accessibility requirements, literacy issues, or translations of the unstructured text content in other languages."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/communication-media"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Attachment"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"/> - <resource> - <StructureDefinition> - <id value="iso21090-EN-qualifier"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"/> - <version value="4.1.0"/> - <name value="EN-qualifier"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <context> - <type value="element"/> - <expression value="HumanName.given"/> - </context> - <context> - <type value="element"/> - <expression value="HumanName.prefix"/> - </context> - <context> - <type value="element"/> - <expression value="HumanName.suffix"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="LS | AC | NB | PR | HON | BR | AD | SP | MID | CL | IN | VV"/> - <definition value="A set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type."/> - <comment value="Used to indicate additional information about the name part and how it should be used."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.qualifier"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EntityNamePartQualifier"/> - </extension> - <strength value="required"/> - <description value="A set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-part-qualifier|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="LS | AC | NB | PR | HON | BR | AD | SP | MID | CL | IN | VV"/> - <definition value="A set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type."/> - <comment value="Used to indicate additional information about the name part and how it should be used."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ENXP.qualifier"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="EntityNamePartQualifier"/> - </extension> - <strength value="required"/> - <description value="A set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type."/> - <valueSet value="http://hl7.org/fhir/ValueSet/name-part-qualifier|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-fmm"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"/> - <version value="4.1.0"/> - <name value="fmm"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The FMM level assigned to the artifact."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="FMM Level"/> - <definition value="The FMM level assigned to the artifact."/> - <comment value="Though this is defined for resources, it can be used for any artifact."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="FMM Level"/> - <definition value="The FMM level assigned to the artifact."/> - <comment value="Though this is defined for resources, it can be used for any artifact."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption"/> - <resource> - <StructureDefinition> - <id value="questionnaire-unitOption"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption"/> - <version value="4.1.0"/> - <name value="unitOption"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="A unit that the user may choose when providing a quantity value."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='quantity'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit choice"/> - <definition value="A unit that the user may choose when providing a quantity value."/> - <comment value="Provide either unit-option(s) or unit-valueSet. In the absence of either, any unit is valid."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit choice"/> - <definition value="A unit that the user may choose when providing a quantity value."/> - <comment value="Provide either unit-option(s) or unit-valueSet. In the absence of either, any unit is valid."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/specimen-collectionPriority"/> - <resource> - <StructureDefinition> - <id value="specimen-collectionPriority"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/specimen-collectionPriority"/> - <version value="4.1.0"/> - <name value="collectionPriority"/> - <title value="Collection Priority"/> - <status value="draft"/> - <date value="2015-02-19"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The urgency of sample collection, such as STAT, ASAP, ASAP-ED, ROUTINE, ROUTINE-AM, etc…."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Specimen.collection"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Urgency for collection"/> - <definition value="The urgency of sample collection, such as STAT, ASAP, ASAP-ED, ROUTINE, ROUTINE-AM, etc…."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-collectionPriority"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PriorityExample"/> - </extension> - <strength value="example"/> - <description value="Type representing the priority for specimen collection."/> - <valueSet value="http://hl7.org/fhir/ValueSet/specimen-collection-priority"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Urgency for collection"/> - <definition value="The urgency of sample collection, such as STAT, ASAP, ASAP-ED, ROUTINE, ROUTINE-AM, etc…."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-collectionPriority"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="PriorityExample"/> - </extension> - <strength value="example"/> - <description value="Type representing the priority for specimen collection."/> - <valueSet value="http://hl7.org/fhir/ValueSet/specimen-collection-priority"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-supplement"/> - <resource> - <StructureDefinition> - <id value="valueset-supplement"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-supplement"/> - <version value="4.1.0"/> - <name value="supplement"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This extension declares that a value set depends on a particular supplement and should not be used in its absence."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Declares dependency on a particular supplment"/> - <definition value="This extension declares that a value set depends on a particular supplement and should not be used in its absence."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-supplement"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CodeSystem"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Declares dependency on a particular supplment"/> - <definition value="This extension declares that a value set depends on a particular supplement and should not be used in its absence."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-supplement"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CodeSystem"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationQualifier"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryInstallationQualifier"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationQualifier"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryInstallationQualifier"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A number, letter or name identifying a delivery installation. For example, for Station A, the delivery installation qualifier would be 'A'."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationQualifier"/> - <definition value="A number, letter or name identifying a delivery installation. For example, for Station A, the delivery installation qualifier would be 'A'."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINSTQ]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationQualifier"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationQualifier"/> - <definition value="A number, letter or name identifying a delivery installation. For example, for Station A, the delivery installation qualifier would be 'A'."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINSTQ]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationQualifier"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-recipientLanguage"/> - <resource> - <StructureDefinition> - <id value="cqf-recipientLanguage"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-recipientLanguage"/> - <version value="4.1.0"/> - <name value="recipientLanguage"/> - <title value="recipientLanguage"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="Preferred language of the person that will consume the content."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="Preferred language of the person that will consume the content."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-recipientLanguage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="Preferred language of the person that will consume the content."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-recipientLanguage"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="preferred"/> - <description value="A human language."/> - <valueSet value="http://hl7.org/fhir/ValueSet/languages"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-importance"/> - <resource> - <StructureDefinition> - <id value="patient-importance"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-importance"/> - <version value="4.1.0"/> - <name value="importance"/> - <title value="importance"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The importance of the patient (e.g. VIP)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Special status given the patient"/> - <definition value="The importance of the patient (e.g. VIP)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-importance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Special status given the patient"/> - <definition value="The importance of the patient (e.g. VIP)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-importance"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth"/> - <resource> - <StructureDefinition> - <id value="timing-dayOfMonth"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth"/> - <version value="4.1.0"/> - <name value="dayOfMonth"/> - <title value="Day Of Month"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - MnM WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/MnM"/> - </telecom> - </contact> - <description value="When present, this extension indicate that the event actually only occurs on the specified days of the month, on the times as otherwise specified by the timing schedule."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Timing.repeat"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Day of Month for schedule"/> - <definition value="When present, this extension indicate that the event actually only occurs on the specified days of the month, on the times as otherwise specified by the timing schedule."/> - <comment value="The value must be an integer in thr range of 0 to 31. Its at the discretion of the implementer what to do if the value of the day is higher than the number of days in a given month."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="positiveInt"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Day of Month for schedule"/> - <definition value="When present, this extension indicate that the event actually only occurs on the specified days of the month, on the times as otherwise specified by the timing schedule."/> - <comment value="The value must be an integer in thr range of 0 to 31. Its at the discretion of the implementer what to do if the value of the day is higher than the number of days in a given month."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="positiveInt"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-receivingOrganization"/> - <resource> - <StructureDefinition> - <id value="cqf-receivingOrganization"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-receivingOrganization"/> - <version value="4.1.0"/> - <name value="receivingOrganization"/> - <title value="receivingOrganization"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The organization that will receive the response."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Basic"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The organization that will receive the response."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-receivingOrganization"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The organization that will receive the response."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-receivingOrganization"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/concept-bidirectional"/> - <resource> - <StructureDefinition> - <id value="concept-bidirectional"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/concept-bidirectional"/> - <version value="4.1.0"/> - <name value="bidirectional"/> - <title value="Bi-directional"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Set to true if the concept map can be safely intepreted in reversse."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ConceptMap"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether the map can be interpreted in reverse"/> - <definition value="Set to true if the concept map can be safely intepreted in reversse."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/concept-bidirectional"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether the map can be interpreted in reverse"/> - <definition value="Set to true if the concept map can be safely intepreted in reversse."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/concept-bidirectional"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-use-markdown"/> - <resource> - <StructureDefinition> - <id value="codesystem-use-markdown"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-use-markdown"/> - <version value="4.1.0"/> - <name value="use-markdown"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="If true, the definitions of the concepts can be treated and rendered as markdown for improved presentation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicate that definitions can be processed as markdown"/> - <definition value="If true, the definitions of the concepts can be treated and rendered as markdown for improved presentation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-use-markdown"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicate that definitions can be processed as markdown"/> - <definition value="If true, the definitions of the concepts can be treated and rendered as markdown for improved presentation."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-use-markdown"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-direction"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-direction"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-direction"/> - <version value="4.1.0"/> - <name value="ADXP-direction"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Direction (e.g., N, S, W, E)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="direction"/> - <definition value="Direction (e.g., N, S, W, E)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DIR]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-direction"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="direction"/> - <definition value="Direction (e.g., N, S, W, E)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DIR]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-direction"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-adoptionInfo"/> - <resource> - <StructureDefinition> - <id value="patient-adoptionInfo"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-adoptionInfo"/> - <version value="4.1.0"/> - <name value="adoptionInfo"/> - <title value="adoptionInfo"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Code indication the adoption status of the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The adoption status of the patient"/> - <definition value="Code indication the adoption status of the patient."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-adoptionInfo"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The adoption status of the patient"/> - <definition value="Code indication the adoption status of the patient."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-adoptionInfo"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/variable"/> - <resource> - <StructureDefinition> - <id value="variable"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/variable"/> - <version value="4.1.0"/> - <name value="Variable"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Variable for processing"/> - <definition value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension."/> - <comment value="Ordering of variable extension declarations is significant as variables declared in one repetition of this extension might be used in subsequent extension repetitions."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/variable"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Expression"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Variable for processing"/> - <definition value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension."/> - <comment value="Ordering of variable extension declarations is significant as variables declared in one repetition of this extension might be used in subsequent extension repetitions."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/variable"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Expression"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate"/> - <resource> - <StructureDefinition> - <id value="codesystem-effectiveDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate"/> - <version value="4.1.0"/> - <name value="effectiveDate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version becomes Active and is available for use"/> - <definition value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When the value set version becomes Active and is available for use"/> - <definition value="This is the first date-time when the value set version becomes active, so this value is present on Inactive value set versions as well. The start Date_time is expected to be as of 0001 UTC of the Effective Date."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-preferred"/> - <resource> - <StructureDefinition> - <id value="iso21090-preferred"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-preferred"/> - <version value="4.1.0"/> - <name value="preferred"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Flag denoting whether parent item is preferred - e.g., a preferred address or telephone number."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Preferred"/> - <definition value="Flag denoting whether parent item is preferred - e.g., a preferred address or telephone number."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-preferred"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Preferred"/> - <definition value="Flag denoting whether parent item is preferred - e.g., a preferred address or telephone number."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-preferred"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/bundle-event-count"/> - <resource> - <StructureDefinition> - <id value="bundle-event-count"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/bundle-event-count"/> - <version value="4.1.0"/> - <name value="bundle-event-count"/> - <title value="Bundle Event Count"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The number of events included in this Subscription notification (0 for handshake and heartbeat)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.meta"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The number of events included in this Subscription notification"/> - <definition value="The number of events included in this Subscription notification (0 for handshake and heartbeat)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/bundle-event-count"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="unsignedInt"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The number of events included in this Subscription notification"/> - <definition value="The number of events included in this Subscription notification (0 for handshake and heartbeat)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/bundle-event-count"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="unsignedInt"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/communicationrequest-initiatingLocation"/> - <resource> - <StructureDefinition> - <id value="communicationrequest-initiatingLocation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/communicationrequest-initiatingLocation"/> - <version value="4.1.0"/> - <name value="initiatingLocation"/> - <title value="initiatingLocation"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Location where the information being requested to be communicated happened."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Location where the CommunicationRequest was initiated"/> - <definition value="Location where the information being requested to be communicated happened."/> - <comment value="Use when the location of initiation is important for interpretation of the communication. Do not use for general Provenance purposes."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/communicationrequest-initiatingLocation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Location where the CommunicationRequest was initiated"/> - <definition value="Location where the information being requested to be communicated happened."/> - <comment value="Use when the location of initiation is important for interpretation of the communication. Do not use for general Provenance purposes."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/communicationrequest-initiatingLocation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/contactpoint-local"/> - <resource> - <StructureDefinition> - <id value="contactpoint-local"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/contactpoint-local"/> - <version value="4.1.0"/> - <name value="local"/> - <title value="Local Number"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The local number that must be dialed to connect within the area/city/zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ContactPoint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Local number that must always be dialled"/> - <definition value="The local number that must be dialed to connect within the area/city/zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-local"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Local number that must always be dialled"/> - <definition value="The local number that must be dialed to connect within the area/city/zone. This extension is used when a system wishes to designate specific parts of a phone number (and potentially place constraints on which components must be present and how they're filled in)."/> - <comment value="The ContactPoint.value element SHOULD still be populated even if the extension is present."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/contactpoint-local"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-patient-record"/> - <resource> - <StructureDefinition> - <id value="familymemberhistory-patient-record"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-patient-record"/> - <version value="4.1.0"/> - <name value="patient-record"/> - <title value="Patient Record"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A link to one to more patient records for the relation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Link to patient record"/> - <definition value="A link to one to more patient records for the relation."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-patient-record"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Link to patient record"/> - <definition value="A link to one to more patient records for the relation."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/familymemberhistory-patient-record"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source"/> - <resource> - <StructureDefinition> - <id value="operationoutcome-issue-source"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source"/> - <version value="4.1.0"/> - <name value="issue-source"/> - <title value="Source of Issue"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Helps a user track down the source of the problem."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OperationOutcome.issue"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Source of a validation message"/> - <definition value="Helps a user track down the source of the problem."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Source of a validation message"/> - <definition value="Helps a user track down the source of the problem."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/tz-code"/> - <resource> - <StructureDefinition> - <id value="tz-code"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/tz-code"/> - <version value="4.1.0"/> - <name value="Timezone Code"/> - <title value="An IANA timezone code for the timezone offset per BCP 175"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="An IANA timezone code for the timezone offset per [BCP 175](https://www.iana.org/go/rfc6557). The offset is specified as part of a dateTime/instant (or using the tzOffset extension on a date if necessary). The timezone code may also be provided to allow for human display of the location associated with the offset."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="date"/> - </context> - <context> - <type value="element"/> - <expression value="dateTime"/> - </context> - <context> - <type value="element"/> - <expression value="instant"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="IANA Timezone Code per BCP 175"/> - <definition value="An IANA timezone code for the timezone offset per [BCP 175](https://www.iana.org/go/rfc6557). The offset is specified as part of a dateTime/instant (or using the tzOffset extension on a date if necessary). The timezone code may also be provided to allow for human display of the location associated with the offset."/> - <comment value="See [https://www.iana.org/time-zones](https://www.iana.org/time-zones)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/tz-code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="IANATimezone"/> - </extension> - <strength value="required"/> - <description value="IANA Timezones (BCP 175)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/timezones|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="IANA Timezone Code per BCP 175"/> - <definition value="An IANA timezone code for the timezone offset per [BCP 175](https://www.iana.org/go/rfc6557). The offset is specified as part of a dateTime/instant (or using the tzOffset extension on a date if necessary). The timezone code may also be provided to allow for human display of the location associated with the offset."/> - <comment value="See [https://www.iana.org/time-zones](https://www.iana.org/time-zones)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/tz-code"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="IANATimezone"/> - </extension> - <strength value="required"/> - <description value="IANA Timezones (BCP 175)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/timezones|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-otherName"/> - <resource> - <StructureDefinition> - <id value="codesystem-otherName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-otherName"/> - <version value="4.1.0"/> - <name value="otherName"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Human readable names for the codesystem."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternative names"/> - <definition value="Human readable names for the codesystem."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="Human readable, short and specific"/> - <definition value="This name is intended to be human readable, short and as specific as possible and to convey the purpose of the value set. It is considered to be the name of the value set."/> - <comment value="This need not be unique. However, some use cases require uniqueness within a namespace and therefore best practice would be to make the name unique."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:preferred"> - <path value="Extension.extension"/> - <sliceName value="preferred"/> - <short value="Which name is preferred for this language"/> - <definition value="Flag that this Name in this Name Language is the preferred human-readable signifier in this language."/> - <comment value="There may be multiple human readable names in a given language, and this flag indicates which of them is preferred for the given language."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:preferred.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:preferred.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:preferred.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="preferred"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:preferred.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-otherName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternative names"/> - <definition value="Human readable names for the codesystem."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="Human readable, short and specific"/> - <definition value="This name is intended to be human readable, short and as specific as possible and to convey the purpose of the value set. It is considered to be the name of the value set."/> - <comment value="This need not be unique. However, some use cases require uniqueness within a namespace and therefore best practice would be to make the name unique."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:preferred"> - <path value="Extension.extension"/> - <sliceName value="preferred"/> - <short value="Which name is preferred for this language"/> - <definition value="Flag that this Name in this Name Language is the preferred human-readable signifier in this language."/> - <comment value="There may be multiple human readable names in a given language, and this flag indicates which of them is preferred for the given language."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:preferred.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:preferred.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="preferred"/> - </element> - <element id="Extension.extension:preferred.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-otherName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/specimen-isDryWeight"/> - <resource> - <StructureDefinition> - <id value="specimen-isDryWeight"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/specimen-isDryWeight"/> - <version value="4.1.0"/> - <name value="isDryWeight"/> - <title value="Is Dry Weight"/> - <status value="draft"/> - <date value="2015-02-19"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="If the recorded quantity of the specimen is reported as a weight, if it is a dry weight."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Specimen.collection.quantity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether quantity is a dry weight"/> - <definition value="If the recorded quantity of the specimen is reported as a weight, if it is a dry weight."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-isDryWeight"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether quantity is a dry weight"/> - <definition value="If the recorded quantity of the specimen is reported as a weight, if it is a dry weight."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-isDryWeight"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-bestpractice-explanation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"/> - <version value="4.1.0"/> - <name value="bestpractice-explanation"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Explains why an invariant is labelled as a best practice invariant."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.constraint"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Explains why an invariant is labelled as best practice"/> - <definition value="Explains why an invariant is labelled as a best practice invariant."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Explains why an invariant is labelled as best practice"/> - <definition value="Explains why an invariant is labelled as a best practice invariant."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-ancestor"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-ancestor"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-ancestor"/> - <version value="4.1.0"/> - <name value="ancestor"/> - <title value="ancestor"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A canonical reference to a StructureDefinition that this is derived from. This is a de-normalization of a chain of StructureDefinition.baseDefinition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="StructureDefinition this is derived from"/> - <definition value="A canonical reference to a StructureDefinition that this is derived from. This is a de-normalization of a chain of StructureDefinition.baseDefinition."/> - <comment value="It is an error if a structure definition lists an ancestor that is not in the chain of baseDefinitions."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-ancestor"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="StructureDefinition this is derived from"/> - <definition value="A canonical reference to a StructureDefinition that this is derived from. This is a de-normalization of a chain of StructureDefinition.baseDefinition."/> - <comment value="It is an error if a structure definition lists an ancestor that is not in the chain of baseDefinitions."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-ancestor"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/parameters-fullUrl"/> - <resource> - <StructureDefinition> - <id value="parameters-fullUrl"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/parameters-fullUrl"/> - <version value="4.1.0"/> - <name value="fullUrl"/> - <title value="fullUrl for resource"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="This specifies the fullUrl for the resource in parameters.resource, if there is one. When fullUrl is provided, ithe [resource resolution method described for Bundle](bundle.html#references)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Parameters.parameter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="fullUrl for resource"/> - <definition value="This specifies the fullUrl for the resource in parameters.resource, if there is one. When fullUrl is provided, ithe [resource resolution method described for Bundle](bundle.html#references)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/parameters-fullUrl"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="fullUrl for resource"/> - <definition value="This specifies the fullUrl for the resource in parameters.resource, if there is one. When fullUrl is provided, ithe [resource resolution method described for Bundle](bundle.html#references)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/parameters-fullUrl"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumberNumeric"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-houseNumberNumeric"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumberNumeric"/> - <version value="4.1.0"/> - <name value="ADXP-houseNumberNumeric"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The numeric portion of a building number."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="houseNumberNumeric"/> - <definition value="The numeric portion of a building number."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumberNumeric"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="houseNumberNumeric"/> - <definition value="The numeric portion of a building number."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumberNumeric"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty"/> - <resource> - <StructureDefinition> - <id value="iso21090-uncertainty"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty"/> - <version value="4.1.0"/> - <name value="uncertainty"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The primary measure of variance/uncertainty of the value (the square root of the sum of the squares of the differences between all data points and the mean)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Quantity"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Standard Deviation (same units as the quantity)"/> - <definition value="The primary measure of variance/uncertainty of the value (the square root of the sum of the squares of the differences between all data points and the mean)."/> - <comment value="standardDeviation has the same units as the quantity. It is used to normalize the data for computing the distribution function. Applications that cannot deal with probability distributions can still get an idea about the confidence level by looking at standardDeviation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="PPD.standardDeviation"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Standard Deviation (same units as the quantity)"/> - <definition value="The primary measure of variance/uncertainty of the value (the square root of the sum of the squares of the differences between all data points and the mean)."/> - <comment value="standardDeviation has the same units as the quantity. It is used to normalize the data for computing the distribution function. Applications that cannot deal with probability distributions can still get an idea about the confidence level by looking at standardDeviation."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="PPD.standardDeviation"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/ordinalValue"/> - <resource> - <StructureDefinition> - <id value="ordinalValue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/ordinalValue"/> - <version value="4.1.0"/> - <name value="Ordinal Value"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="A numeric value that allows the comparison (less than, greater than) or other numerical manipulation of a concept (e.g. Adding up components of a score). Scores are usually a whole number, but occasionally decimals are encountered in scores."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Coding"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.answerOption"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Assigned Ordinal Value"/> - <definition value="A numeric value that allows the comparison (less than, greater than) or other numerical manipulation of a concept (e.g. Adding up components of a score). Scores are usually a whole number, but occasionally decimals are encountered in scores."/> - <comment value="Scores are commonly encountered in various clinical assessment scales. Assigning a value to a concept should generally be done in a formal code system that defines the value, or in an applicable value set for the concept, but some concepts do not have a formal definition (or are not even represented as a concept formally, especially in [Questionnaires](questionnaire.html), so this extension is allowed to appear ouside those preferred contexts. Scores may even be assigned arbitrarily during use (hence, on Coding). The value may be constrained to an integer in some contexts of use. Todo: Scoring algorithms may also be defined directly, but how this is done is not yet defined."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/ordinalValue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="decimal"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Assigned Ordinal Value"/> - <definition value="A numeric value that allows the comparison (less than, greater than) or other numerical manipulation of a concept (e.g. Adding up components of a score). Scores are usually a whole number, but occasionally decimals are encountered in scores."/> - <comment value="Scores are commonly encountered in various clinical assessment scales. Assigning a value to a concept should generally be done in a formal code system that defines the value, or in an applicable value set for the concept, but some concepts do not have a formal definition (or are not even represented as a concept formally, especially in [Questionnaires](questionnaire.html), so this extension is allowed to appear ouside those preferred contexts. Scores may even be assigned arbitrarily during use (hence, on Coding). The value may be constrained to an integer in some contexts of use. Todo: Scoring algorithms may also be defined directly, but how this is done is not yet defined."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/ordinalValue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="decimal"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-systemRef"/> - <resource> - <StructureDefinition> - <id value="valueset-systemRef"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-systemRef"/> - <version value="4.1.0"/> - <name value="systemRef"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The formal URI for the code system. I.e. ValueSet.codeSystem.system (or its equivalent)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.compose.include"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where to find code system"/> - <definition value="The formal URI for the code system. I.e. ValueSet.codeSystem.system (or its equivalent)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-systemRef"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where to find code system"/> - <definition value="The formal URI for the code system. I.e. ValueSet.codeSystem.system (or its equivalent)."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-systemRef"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-allowedUnits"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"/> - <version value="4.1.0"/> - <name value="allowedUnits"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Identifies the units of measure in which the element should be captured or expressed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Units to use for measured value"/> - <definition value="Identifies the units of measure in which the element should be captured or expressed."/> - <comment value="Use a value set if more than one unit of measure is possible. Value sets will typically be short enough to display in a drop-down selection list."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="OM2.2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Units"/> - </extension> - <strength value="required"/> - <description value="Units of measure allowed for an element."/> - <valueSet value="http://hl7.org/fhir/ValueSet/ucum-units|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Units to use for measured value"/> - <definition value="Identifies the units of measure in which the element should be captured or expressed."/> - <comment value="Use a value set if more than one unit of measure is possible. Value sets will typically be short enough to display in a drop-down selection list."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="OM2.2"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Units"/> - </extension> - <strength value="required"/> - <description value="Units of measure allowed for an element."/> - <valueSet value="http://hl7.org/fhir/ValueSet/ucum-units|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/resource-approvalDate"/> - <resource> - <StructureDefinition> - <id value="resource-approvalDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/resource-approvalDate"/> - <version value="4.1.0"/> - <name value="approvalDate"/> - <title value="Approval Date"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="StructureMap"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement"/> - </context> - <context> - <type value="element"/> - <expression value="OperationDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="SearchParameter"/> - </context> - <context> - <type value="element"/> - <expression value="CompartmentDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="ImplementationGuide"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <context> - <type value="element"/> - <expression value="ConceptMap"/> - </context> - <context> - <type value="element"/> - <expression value="NamingSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="When resource approved by publisher"/> - <definition value="The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage."/> - <comment value="The date may be more recent than the approval date because of minor changes / editorial corrections."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-approvalDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="When resource approved by publisher"/> - <definition value="The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage."/> - <comment value="The date may be more recent than the approval date because of minor changes / editorial corrections."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-approvalDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-genderIdentity"/> - <resource> - <StructureDefinition> - <id value="patient-genderIdentity"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-genderIdentity"/> - <version value="4.1.0"/> - <name value="genderIdentity"/> - <title value="genderIdentity"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The gender the patient identifies with. The Patient's gender identity is used as guidance (e.g. for staff) about how to interact with the patient."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The patient's gender identity"/> - <definition value="The gender the patient identifies with. The Patient's gender identity is used as guidance (e.g. for staff) about how to interact with the patient."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-genderIdentity"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GenderIdentity"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/gender-identity"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The patient's gender identity"/> - <definition value="The gender the patient identifies with. The Patient's gender identity is used as guidance (e.g. for staff) about how to interact with the patient."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-genderIdentity"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="GenderIdentity"/> - </extension> - <strength value="example"/> - <valueSet value="http://hl7.org/fhir/ValueSet/gender-identity"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest"/> - <resource> - <StructureDefinition> - <id value="servicerequest-questionnaireRequest"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest"/> - <version value="4.1.0"/> - <name value="questionnaireRequest"/> - <title value="Questionnaire Requested"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Reference to a specific Questionnaire Resource as an ordered item. Allows for ordering a specific questionnaire to be completed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Questionnaire to be ordered"/> - <definition value="Reference to a specific Questionnaire Resource as an ordered item. Allows for ordering a specific questionnaire to be completed."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Questionnaire to be ordered"/> - <definition value="Reference to a specific Questionnaire Resource as an ordered item. Allows for ordering a specific questionnaire to be completed."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod"/> - <resource> - <StructureDefinition> - <id value="resource-effectivePeriod"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod"/> - <version value="4.1.0"/> - <name value="effectivePeriod"/> - <title value="Effective Period"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The period during which the resource content was or is planned to be effective."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="StructureMap"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement"/> - </context> - <context> - <type value="element"/> - <expression value="OperationDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="SearchParameter"/> - </context> - <context> - <type value="element"/> - <expression value="CompartmentDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="ImplementationGuide"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <context> - <type value="element"/> - <expression value="ConceptMap"/> - </context> - <context> - <type value="element"/> - <expression value="NamingSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The effective date range for the resource"/> - <definition value="The period during which the resource content was or is planned to be effective."/> - <comment value="The effective period for a resource determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 would be published in 2015."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Period"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The effective date range for the resource"/> - <definition value="The period during which the resource content was or is planned to be effective."/> - <comment value="The effective period for a resource determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 would be published in 2015."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Period"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive"/> - <resource> - <StructureDefinition> - <id value="rendering-styleSensitive"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive"/> - <version value="4.1.0"/> - <name value="styleSensitive"/> - <status value="draft"/> - <date value="2014-04-23"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Indicates that the style extensions (style, markdown and xhtml) in this resource instance are essential to the interpretation of the instance and that systems that are not capable of rendering using those extensions should not be used to render the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Are styles important for processing?"/> - <definition value="Indicates that the style extensions (style, markdown and xhtml) in this resource instance are essential to the interpretation of the instance and that systems that are not capable of rendering using those extensions should not be used to render the resource."/> - <comment value="If set to true, all systems that claim to support this extension and that render elements from the resource SHALL either render the content as required by the style extensions ([style], [xhtml] and [markdown]) or shall indicate to the user that the resource (or specific elements in the resource) cannot be appropriately rendered by the system."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Are styles important for processing?"/> - <definition value="Indicates that the style extensions (style, markdown and xhtml) in this resource instance are essential to the interpretation of the instance and that systems that are not capable of rendering using those extensions should not be used to render the resource."/> - <comment value="If set to true, all systems that claim to support this extension and that render elements from the resource SHALL either render the content as required by the style extensions ([style], [xhtml] and [markdown]) or shall indicate to the user that the resource (or specific elements in the resource) cannot be appropriately rendered by the system."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsGenomicSourceClass"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"/> - <version value="4.1.0"/> - <name value="GenomicSourceClass"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Source of sample used to determine the sequence in sequencing lab -- germline, somatic, prenatal. LOINC Code: ([48002-0](http://loinc.org/48002-0))."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Genomic source class"/> - <definition value="Source of sample used to determine the sequence in sequencing lab -- germline, somatic, prenatal. LOINC Code: ([48002-0](http://loinc.org/48002-0))."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Genomic source class"/> - <definition value="Source of sample used to determine the sequence in sequencing lab -- germline, somatic, prenatal. LOINC Code: ([48002-0](http://loinc.org/48002-0))."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-sourceReference"/> - <resource> - <StructureDefinition> - <id value="valueset-sourceReference"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-sourceReference"/> - <version value="4.1.0"/> - <name value="sourceReference"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where did this content come from"/> - <definition value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <comment value="This is not intended to be a direct link to another value set. It is only intended to support a link or textual description that indicates related material for the value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-sourceReference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where did this content come from"/> - <definition value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <comment value="This is not intended to be a direct link to another value set. It is only intended to support a link or textual description that indicates related material for the value set."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-sourceReference"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-substanceExposureRisk"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-substanceExposureRisk"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-substanceExposureRisk"/> - <version value="4.1.0"/> - <name value="substanceExposureRisk"/> - <title value="substanceExposureRisk"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A complex extension allowing structured capture of the exposure risk of the patient for an adverse reaction (allergy or intolerance) to the specified substance/product."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Exposure risk of adverse reaction (allergy or intolerance) to the specified substance/product"/> - <definition value="A complex extension allowing structured capture of the exposure risk of the patient for an adverse reaction (allergy or intolerance) to the specified substance/product."/> - <comment value="This extension is available and is intended to be used as a more completely structured and flexible alternative to the 'code' element for representing positive and negative allergy and intolerance statements. If this extension element is present, the AllergyIntolerance.code element SHALL be omitted (see invariant "code or substanceExposureRisk")."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <constraint> - <key value="inv-1"/> - <severity value="error"/> - <human value="If the substanceExposureRisk extension element is present, the AllergyIntolerance.code element must be omitted."/> - <expression value="substanceExposureRisk.exists() and code.empty()"/> - <xpath value="exists(f:substanceExposureRisk) and not(exists(f:code))"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:substance"> - <path value="Extension.extension"/> - <sliceName value="substance"/> - <short value="Substance (or pharmaceutical product)"/> - <definition value="Code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk or is known not to have an associated risk of an adverse reaction upon exposure."/> - <comment value="It is strongly recommended that this element be populated using a terminology, where possible. For example, some terminologies used include RxNorm, SNOMED CT, DM+D, NDFRT, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="v2"/> - <map value="AL1-3 / IAM-3"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=CAGNT].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]"/> - </mapping> - </element> - <element id="Extension.extension:substance.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:substance.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:substance.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="substance"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:substance.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SubstanceCode"/> - </extension> - <strength value="example"/> - <description value="Codes defining the type of the substance (including pharmaceutical products)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/substance-code"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:exposureRisk"> - <path value="Extension.extension"/> - <sliceName value="exposureRisk"/> - <short value="known-reaction-risk | no-known-reaction-risk"/> - <definition value="The presence or absence of a known exposure risk of the patient for an adverse reaction (allergy or intolerance) to the specified substance/product."/> - <comment value="exposureRisk is a modifier of the substance."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:exposureRisk.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:exposureRisk.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:exposureRisk.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="exposureRisk"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:exposureRisk.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AllergyIntoleranceSubstanceExposureRisk"/> - </extension> - <strength value="required"/> - <description value="The risk of an adverse reaction (allergy or intolerance) for this patient upon exposure to the substance (including pharmaceutical products)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/allerg-intol-substance-exp-risk|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-substanceExposureRisk"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Exposure risk of adverse reaction (allergy or intolerance) to the specified substance/product"/> - <definition value="A complex extension allowing structured capture of the exposure risk of the patient for an adverse reaction (allergy or intolerance) to the specified substance/product."/> - <comment value="This extension is available and is intended to be used as a more completely structured and flexible alternative to the 'code' element for representing positive and negative allergy and intolerance statements. If this extension element is present, the AllergyIntolerance.code element SHALL be omitted (see invariant "code or substanceExposureRisk")."/> - <min value="0"/> - <max value="1"/> - <constraint> - <key value="inv-1"/> - <severity value="error"/> - <human value="If the substanceExposureRisk extension element is present, the AllergyIntolerance.code element must be omitted."/> - <expression value="substanceExposureRisk.exists() and code.empty()"/> - <xpath value="exists(f:substanceExposureRisk) and not(exists(f:code))"/> - </constraint> - </element> - <element id="Extension.extension:substance"> - <path value="Extension.extension"/> - <sliceName value="substance"/> - <short value="Substance (or pharmaceutical product)"/> - <definition value="Code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk or is known not to have an associated risk of an adverse reaction upon exposure."/> - <comment value="It is strongly recommended that this element be populated using a terminology, where possible. For example, some terminologies used include RxNorm, SNOMED CT, DM+D, NDFRT, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <mapping> - <identity value="v2"/> - <map value="AL1-3 / IAM-3"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".participation[typeCode=CAGNT].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]"/> - </mapping> - </element> - <element id="Extension.extension:substance.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:substance.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="substance"/> - </element> - <element id="Extension.extension:substance.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SubstanceCode"/> - </extension> - <strength value="example"/> - <description value="Codes defining the type of the substance (including pharmaceutical products)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/substance-code"/> - </binding> - </element> - <element id="Extension.extension:exposureRisk"> - <path value="Extension.extension"/> - <sliceName value="exposureRisk"/> - <short value="known-reaction-risk | no-known-reaction-risk"/> - <definition value="The presence or absence of a known exposure risk of the patient for an adverse reaction (allergy or intolerance) to the specified substance/product."/> - <comment value="exposureRisk is a modifier of the substance."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:exposureRisk.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:exposureRisk.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="exposureRisk"/> - </element> - <element id="Extension.extension:exposureRisk.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AllergyIntoleranceSubstanceExposureRisk"/> - </extension> - <strength value="required"/> - <description value="The risk of an adverse reaction (allergy or intolerance) for this patient upon exposure to the substance (including pharmaceutical products)."/> - <valueSet value="http://hl7.org/fhir/ValueSet/allerg-intol-substance-exp-risk|4.1.0"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-substanceExposureRisk"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsReferences"/> - <resource> - <StructureDefinition> - <id value="DiagnosticReport-geneticsReferences"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsReferences"/> - <version value="4.1.0"/> - <name value="References"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Additional bibliographic reference information about genetics, medications, clinical trials, etc. associated with knowledge-based information on genetics/genetic condition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional bibliographic reference information"/> - <definition value="Additional bibliographic reference information about genetics, medications, clinical trials, etc. associated with knowledge-based information on genetics/genetic condition."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:description"> - <path value="Extension.extension"/> - <sliceName value="description"/> - <short value="Reference description"/> - <definition value="Concise description of the genetic reference."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:description.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:description.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:description.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="description"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:description.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Reference URI"/> - <definition value="An absolute URI to express where to find the link."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:reference.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="Reference type"/> - <definition value="A code that classifies the type of genetic reference link."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Diagnostic-Snomed"/> - </extension> - <strength value="example"/> - <description value="Codes for diagnostic genetic reference types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/diagnostic-based-on-snomed"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsReferences"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional bibliographic reference information"/> - <definition value="Additional bibliographic reference information about genetics, medications, clinical trials, etc. associated with knowledge-based information on genetics/genetic condition."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:description"> - <path value="Extension.extension"/> - <sliceName value="description"/> - <short value="Reference description"/> - <definition value="Concise description of the genetic reference."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:description.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:description.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="description"/> - </element> - <element id="Extension.extension:description.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:reference"> - <path value="Extension.extension"/> - <sliceName value="reference"/> - <short value="Reference URI"/> - <definition value="An absolute URI to express where to find the link."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:reference.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:reference.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="reference"/> - </element> - <element id="Extension.extension:reference.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:type"> - <path value="Extension.extension"/> - <sliceName value="type"/> - <short value="Reference type"/> - <definition value="A code that classifies the type of genetic reference link."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:type.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:type.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="type"/> - </element> - <element id="Extension.extension:type.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Diagnostic-Snomed"/> - </extension> - <strength value="example"/> - <description value="Codes for diagnostic genetic reference types."/> - <valueSet value="http://hl7.org/fhir/ValueSet/diagnostic-based-on-snomed"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsReferences"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/bodySite"/> - <resource> - <StructureDefinition> - <id value="bodySite"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/bodySite"/> - <version value="4.1.0"/> - <name value="BodyStructure Reference"/> - <title value="Body Site"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Target anatomic location or structure"/> - <definition value="Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/bodySite"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Target anatomic location or structure"/> - <definition value="Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/bodySite"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement-expectation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"/> - <version value="4.1.0"/> - <name value="expectation"/> - <title value="Conformance expectation"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="Defines the level of expectation associated with a given system capability."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.interaction"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.searchParam"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.operation"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.document"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.interaction"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.searchInclude"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.resource.searchRevInclude"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="SHALL | SHOULD | MAY |SHOULD-NOT"/> - <definition value="Defines the level of expectation associated with a given system capability."/> - <comment value="If "SHALL NOT" is desired, use the "prohibited" modifier extension. This extension should only be used with CapabilityStatements documenting requirements, not those documenting actual system capabilities."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceExpectation"/> - </extension> - <strength value="required"/> - <description value="Indicates the degree of adherence to a specified behavior or capability expected for a system to be deemed conformant with a specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/conformance-expectation|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="SHALL | SHOULD | MAY |SHOULD-NOT"/> - <definition value="Defines the level of expectation associated with a given system capability."/> - <comment value="If "SHALL NOT" is desired, use the "prohibited" modifier extension. This extension should only be used with CapabilityStatements documenting requirements, not those documenting actual system capabilities."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConformanceExpectation"/> - </extension> - <strength value="required"/> - <description value="Indicates the degree of adherence to a specified behavior or capability expected for a system to be deemed conformant with a specification."/> - <valueSet value="http://hl7.org/fhir/ValueSet/conformance-expectation|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/openEHR-test"/> - <resource> - <StructureDefinition> - <id value="openEHR-test"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/openEHR-test"/> - <version value="4.1.0"/> - <name value="test"/> - <status value="draft"/> - <date value="2014-10-09"/> - <publisher value="Health Level Seven, Inc / openEHR project"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org"/> - </telecom> - </contact> - <description value="Observations that confirm or refute the risk and/or the substance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Observations that confirm or refute"/> - <definition value="Observations that confirm or refute the risk and/or the substance."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-test"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Observations that confirm or refute"/> - <definition value="Observations that confirm or refute the risk and/or the substance."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/openEHR-test"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink"/> - <resource> - <StructureDefinition> - <id value="questionnaire-supportLink"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink"/> - <version value="4.1.0"/> - <name value="supportLink"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="A URL that resolves to additional supporting information or guidance related to the question."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Supporting information"/> - <definition value="A URL that resolves to additional supporting information or guidance related to the question."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Supporting information"/> - <definition value="A URL that resolves to additional supporting information or guidance related to the question."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-sequelTo"/> - <resource> - <StructureDefinition> - <id value="observation-sequelTo"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-sequelTo"/> - <version value="4.1.0"/> - <name value="sequelTo"/> - <title value="Sequel To"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Sequel to referenced Observation"/> - <definition value="This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-sequelTo"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Sequel to referenced Observation"/> - <definition value="This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test)."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-sequelTo"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-minValueSet"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet"/> - <version value="4.1.0"/> - <name value="minValueSet"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The minimum allowable value set, for use when the binding strength is 'required' or 'extensible'. This value set is the minimum value set that any conformant system SHALL support."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.binding"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Minimum Value Set (what system must support)"/> - <definition value="The minimum allowable value set, for use when the binding strength is 'required' or 'extensible'. This value set is the minimum value set that any conformant system SHALL support."/> - <comment value="Generally, the context of use of this extension should be specific about what it means to 'support' the value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Minimum Value Set (what system must support)"/> - <definition value="The minimum allowable value set, for use when the binding strength is 'required' or 'extensible'. This value set is the minimum value set that any conformant system SHALL support."/> - <comment value="Generally, the context of use of this extension should be specific about what it means to 'support' the value set."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF territory)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ValueSet"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reviewer"/> - <resource> - <StructureDefinition> - <id value="questionnaireresponse-reviewer"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reviewer"/> - <version value="4.1.0"/> - <name value="reviewer"/> - <title value="Reviewer"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Individual responsible for ensuring that the questionnaire response have been completed appropriately and signs off on the content."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Who verified completion of form?"/> - <definition value="Individual responsible for ensuring that the questionnaire response have been completed appropriately and signs off on the content."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="./participation[typeCode=VRF]/role"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reviewer"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Who verified completion of form?"/> - <definition value="Individual responsible for ensuring that the questionnaire response have been completed appropriately and signs off on the content."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="./participation[typeCode=VRF]/role"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reviewer"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-websocket"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement2-websocket"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-websocket"/> - <version value="4.1.0"/> - <name value="websocket"/> - <title value="WebSocket"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="Where the server provides its web socket end-point."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement2.rest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where server websocket end point is found"/> - <definition value="Where the server provides its web socket end-point."/> - <comment value="Used for web-socket based subscriptions."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-websocket"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where server websocket end point is found"/> - <definition value="Where the server provides its web socket end-point."/> - <comment value="Used for web-socket based subscriptions."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-websocket"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/task-replaces"/> - <resource> - <StructureDefinition> - <id value="task-replaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/task-replaces"/> - <version value="4.1.0"/> - <name value="replaces"/> - <title value="replaces"/> - <status value="draft"/> - <date value="2017-02-16"/> - <publisher value="Health Level Seven, Inc. - FHIR I WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Completed or terminated task(s) whose function is taken by this new task."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Task"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Task(s) replaced by this Task"/> - <definition value="Completed or terminated task(s) whose function is taken by this new task."/> - <comment value="The replacement could be because the initial task was immediately rejected (due to an issue) or because the previous task was completed, but the need for the action described by the task remains ongoing."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Request.replaces"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RPLC].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/task-replaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Task"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Task(s) replaced by this Task"/> - <definition value="Completed or terminated task(s) whose function is taken by this new task."/> - <comment value="The replacement could be because the initial task was immediately rejected (due to an issue) or because the previous task was completed, but the need for the action described by the task remains ongoing."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Request.replaces"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RPLC].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/task-replaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Task"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-replaces"/> - <resource> - <StructureDefinition> - <id value="observation-replaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-replaces"/> - <version value="4.1.0"/> - <name value="replaces"/> - <title value="Replaces"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="This observation replaces a previous observation (i.e. a revised value)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Replaces referenced Observation"/> - <definition value="This observation replaces a previous observation (i.e. a revised value)."/> - <comment value="This is an alternative to updating the Observation with a new version with status = 'amended'or 'corrected'. The target observation is now obsolete."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-replaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Replaces referenced Observation"/> - <definition value="This observation replaces a previous observation (i.e. a revised value)."/> - <comment value="This is an alternative to updating the Observation with a new version with status = 'amended'or 'corrected'. The target observation is now obsolete."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-replaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/organizationaffiliation-primaryInd"/> - <resource> - <StructureDefinition> - <id value="organizationaffiliation-primaryInd"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/organizationaffiliation-primaryInd"/> - <version value="4.1.0"/> - <name value="primaryInd"/> - <title value="primaryInd"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OrganizationAffiliation.specialty"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicator of primary specialty"/> - <definition value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organizationaffiliation-primaryInd"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicator of primary specialty"/> - <definition value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organizationaffiliation-primaryInd"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/resource-lastReviewDate"/> - <resource> - <StructureDefinition> - <id value="resource-lastReviewDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/resource-lastReviewDate"/> - <version value="4.1.0"/> - <name value="lastReviewDate"/> - <title value="Last Review Date"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="StructureMap"/> - </context> - <context> - <type value="element"/> - <expression value="CapabilityStatement"/> - </context> - <context> - <type value="element"/> - <expression value="OperationDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="SearchParameter"/> - </context> - <context> - <type value="element"/> - <expression value="CompartmentDefinition"/> - </context> - <context> - <type value="element"/> - <expression value="ImplementationGuide"/> - </context> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <context> - <type value="element"/> - <expression value="ConceptMap"/> - </context> - <context> - <type value="element"/> - <expression value="NamingSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Last review date for the resource"/> - <definition value="The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."/> - <comment value="If specified, this is usually after the approval date."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-lastReviewDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Last review date for the resource"/> - <definition value="The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."/> - <comment value="If specified, this is usually after the approval date."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/resource-lastReviewDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy"/> - <resource> - <StructureDefinition> - <id value="workflow-researchStudy"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy"/> - <version value="4.1.0"/> - <name value="researchStudy"/> - <title value="Associated Study"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Indicates that this event is relevant to the specified research study(ies)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Composition"/> - </context> - <context> - <type value="element"/> - <expression value="Consent"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceUseStatement"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Encounter"/> - </context> - <context> - <type value="element"/> - <expression value="FamilyMemberHistory"/> - </context> - <context> - <type value="element"/> - <expression value="Immunization"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="MedicationAdministration"/> - </context> - <context> - <type value="element"/> - <expression value="MedicationDispense"/> - </context> - <context> - <type value="element"/> - <expression value="MedicationUsage"/> - </context> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <context> - <type value="element"/> - <expression value="RiskAssessment"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <context> - <type value="element"/> - <expression value="Task"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated research study"/> - <definition value="Indicates that this event is relevant to the specified research study(ies)."/> - <comment value="This relevance might mean that the even occurred as part of the study protocol, but can also include events that occurred outside the study but still have relevance (e.g. adverse events, co-occurring medications, unexpected Observations, etc.)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.researchStudy"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=PERT].target[classCode=CLNTRL, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Associated research study"/> - <definition value="Indicates that this event is relevant to the specified research study(ies)."/> - <comment value="This relevance might mean that the even occurred as part of the study protocol, but can also include events that occurred outside the study but still have relevance (e.g. adverse events, co-occurring medications, unexpected Observations, etc.)."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.researchStudy"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=PERT].target[classCode=CLNTRL, moodCode=EVN]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/practitioner-animalSpecies"/> - <resource> - <StructureDefinition> - <id value="practitioner-animalSpecies"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/practitioner-animalSpecies"/> - <version value="4.1.0"/> - <name value="animalSpecies"/> - <title value="animalSpecies"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This extension should be used to specifiy that a practioner or RelatedPerson resource is a service animal."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Practitioner"/> - </context> - <context> - <type value="element"/> - <expression value="RelatedPerson"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The Species of the Service Animal"/> - <definition value="This extension should be used to specifiy that a practioner or RelatedPerson resource is a service animal."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/practitioner-animalSpecies"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalSpecies"/> - </extension> - <strength value="example"/> - <description value="The species of animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-species"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The Species of the Service Animal"/> - <definition value="This extension should be used to specifiy that a practioner or RelatedPerson resource is a service animal."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/practitioner-animalSpecies"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AnimalSpecies"/> - </extension> - <strength value="example"/> - <description value="The species of animal."/> - <valueSet value="http://hl7.org/fhir/ValueSet/animal-species"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/event-eventHistory"/> - <resource> - <StructureDefinition> - <id value="event-eventHistory"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/event-eventHistory"/> - <version value="4.1.0"/> - <name value="eventHistory"/> - <title value="Event History"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Links to *Provenance* records for past versions of this resource that document key state transitions or updates that are deemed “relevant” or important to a user looking at the current version of the resource. E.g, when an observation was verified or corrected. This extension does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The *Provenance* for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Task"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <context> - <type value="element"/> - <expression value="DeviceUseStatement"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Events of interest in the resource lifecycle"/> - <definition value="Links to *Provenance* records for past versions of this resource that document key state transitions or updates that are deemed “relevant” or important to a user looking at the current version of the resource. E.g, when an observation was verified or corrected. This extension does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The *Provenance* for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <comment value="May reference only *Provenance* resources deemed “relevant” or important. This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-eventHistory"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Events of interest in the resource lifecycle"/> - <definition value="Links to *Provenance* records for past versions of this resource that document key state transitions or updates that are deemed “relevant” or important to a user looking at the current version of the resource. E.g, when an observation was verified or corrected. This extension does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The *Provenance* for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <comment value="May reference only *Provenance* resources deemed “relevant” or important. This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a [` _revinclude`](search.html#revinclude)."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/event-eventHistory"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-directedBy"/> - <resource> - <StructureDefinition> - <id value="procedure-directedBy"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-directedBy"/> - <version value="4.1.0"/> - <name value="directedBy"/> - <title value="directedBy"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The target of the extension is a distinct actor from the requester and has decision-making authority over the service and takes direct responsibility to manage the service."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has decision-making authority"/> - <definition value="The target of the extension is a distinct actor from the requester and has decision-making authority over the service and takes direct responsibility to manage the service."/> - <comment value="For example, a long term care beneficiary who coordinates the services related to their activities of daily living."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-directedBy"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Who has decision-making authority"/> - <definition value="The target of the extension is a distinct actor from the requester and has decision-making authority over the service and takes direct responsibility to manage the service."/> - <comment value="For example, a long term care beneficiary who coordinates the services related to their activities of daily living."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-directedBy"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-warning"/> - <resource> - <StructureDefinition> - <id value="codesystem-warning"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-warning"/> - <version value="4.1.0"/> - <name value="warning"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="An extra warning about the correct use of the value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extra warning about the correct use of the value set"/> - <definition value="An extra warning about the correct use of the value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-warning"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Extra warning about the correct use of the value set"/> - <definition value="An extra warning about the correct use of the value set."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-warning"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-outcome"/> - <resource> - <StructureDefinition> - <id value="condition-outcome"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-outcome"/> - <version value="4.1.0"/> - <name value="outcome"/> - <title value="Outcome"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="A result of the condition. The "Cause of death" for a patient is typically captured as an Observation. The "outcome" doesn't imply causality. Some outcomes might not be assessable until the condition.clinicalStatus is no longer active."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A consequence of the Condition"/> - <definition value="A result of the condition. The "Cause of death" for a patient is typically captured as an Observation. The "outcome" doesn't imply causality. Some outcomes might not be assessable until the condition.clinicalStatus is no longer active."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-outcome"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionOutcome"/> - </extension> - <strength value="example"/> - <description value="Codes that describe the assessed outcome of the condition."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-outcome"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A consequence of the Condition"/> - <definition value="A result of the condition. The "Cause of death" for a patient is typically captured as an Observation. The "outcome" doesn't imply causality. Some outcomes might not be assessable until the condition.clinicalStatus is no longer active."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-outcome"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConditionOutcome"/> - </extension> - <strength value="example"/> - <description value="Codes that describe the assessed outcome of the condition."/> - <valueSet value="http://hl7.org/fhir/ValueSet/condition-outcome"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-alternate"/> - <resource> - <StructureDefinition> - <id value="codesystem-alternate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-alternate"/> - <version value="4.1.0"/> - <name value="alternate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="An additional code that may be used to represent the concept."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem.concept"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional code for the concept"/> - <definition value="An additional code that may be used to represent the concept."/> - <comment value="Few coding systems define synonyms. A few more define alternate codes for special case use."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Code that represents the concept"/> - <definition value="The code that may be used to represent the concept."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Expected use of the code"/> - <definition value="Defines why this additional code is defined."/> - <comment value="Further work is needed on the value set."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AlternativeCodeKind"/> - </extension> - <strength value="extensible"/> - <description value="Indicates the type of use for which the code is defined."/> - <valueSet value="http://hl7.org/fhir/ValueSet/codesystem-altcode-kind"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-alternate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional code for the concept"/> - <definition value="An additional code that may be used to represent the concept."/> - <comment value="Few coding systems define synonyms. A few more define alternate codes for special case use."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Code that represents the concept"/> - <definition value="The code that may be used to represent the concept."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - </element> - <element id="Extension.extension:use"> - <path value="Extension.extension"/> - <sliceName value="use"/> - <short value="Expected use of the code"/> - <definition value="Defines why this additional code is defined."/> - <comment value="Further work is needed on the value set."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:use.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:use.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="use"/> - </element> - <element id="Extension.extension:use.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AlternativeCodeKind"/> - </extension> - <strength value="extensible"/> - <description value="Indicates the type of use for which the code is defined."/> - <valueSet value="http://hl7.org/fhir/ValueSet/codesystem-altcode-kind"/> - </binding> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-alternate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/request-statusReason"/> - <resource> - <StructureDefinition> - <id value="request-statusReason"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/request-statusReason"/> - <version value="4.1.0"/> - <name value="statusReason"/> - <title value="Reason for current status"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Captures the reason for the current state of the resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DeviceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reason for current status"/> - <definition value="Captures the reason for the current state of the resource."/> - <comment value="This is generally only used for "exception" statuses such as "suspended" or "cancelled". The reason for performing the request at all is captured in reasonCode, not here. (Distinct reason codes for different statuses can be enforced using invariants if they are universal bindings)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-statusReason"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StatusReason"/> - </extension> - <strength value="example"/> - <description value="Codes identifying the reason for the current state of an event."/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reason for current status"/> - <definition value="Captures the reason for the current state of the resource."/> - <comment value="This is generally only used for "exception" statuses such as "suspended" or "cancelled". The reason for performing the request at all is captured in reasonCode, not here. (Distinct reason codes for different statuses can be enforced using invariants if they are universal bindings)."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-statusReason"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StatusReason"/> - </extension> - <strength value="example"/> - <description value="Codes identifying the reason for the current state of an event."/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/consent-ResearchStudyContext"/> - <resource> - <StructureDefinition> - <id value="consent-ResearchStudyContext"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="cbcc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/consent-ResearchStudyContext"/> - <version value="4.1.0"/> - <name value="ResearchStudyContext"/> - <title value="ResearchContext"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="Health Level Seven, Inc. - CBCC WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm"/> - </telecom> - </contact> - <description value="When a Research scope Consent, this is the specific research study that is allowed to use the information (or not)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Consent.provision"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Specific Research Study for Research Context"/> - <definition value="When a Research scope Consent, this is the specific research study that is allowed to use the information (or not)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-ResearchStudyContext"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Specific Research Study for Research Context"/> - <definition value="When a Research scope Consent, this is the specific research study that is allowed to use the information (or not)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/consent-ResearchStudyContext"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-delta"/> - <resource> - <StructureDefinition> - <id value="observation-delta"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-delta"/> - <version value="4.1.0"/> - <name value="delta"/> - <title value="delta"/> - <status value="draft"/> - <date value="2015-03-02"/> - <publisher value="Health Level Seven, Inc. - OO WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/orders"/> - </telecom> - </contact> - <description value="The qualitative change in the value relative to the previous measurement. Usually only recorded if the change is clinically significant."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Qualitative change or trend in the measurement"/> - <definition value="The qualitative change in the value relative to the previous measurement. Usually only recorded if the change is clinically significant."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-delta"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Qualitative change or trend in the measurement"/> - <definition value="The qualitative change in the value relative to the previous measurement. Usually only recorded if the change is clinically significant."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-delta"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-translatable"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"/> - <version value="4.1.0"/> - <name value="translatable"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="Whether translations might be expected for this element in resource instances."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether translations apply to this element"/> - <definition value="Whether translations might be expected for this element in resource instances."/> - <comment value="This is a hint to design tools (e.g. profile editors, UI builders) that translations are likely to be appropriate for this element in countries that are multi-lingual."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Whether translations apply to this element"/> - <definition value="Whether translations might be expected for this element in resource instances."/> - <comment value="This is a hint to design tools (e.g. profile editors, UI builders) that translations are likely to be appropriate for this element in countries that are multi-lingual."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-completionMode"/> - <resource> - <StructureDefinition> - <id value="questionnaireresponse-completionMode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-completionMode"/> - <version value="4.1.0"/> - <name value="completionMode"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Indicates how the individual completing the QuestionnaireResponse provided their responses."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="QuestionnaireResponse"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. Verbal, written, electronic"/> - <definition value="Indicates how the individual completing the QuestionnaireResponse provided their responses."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-completionMode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="CompletionMode"/> - </extension> - <strength value="required"/> - <description value="Codes indicating how the questionnaire was completed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaireresponse-mode|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. Verbal, written, electronic"/> - <definition value="Indicates how the individual completing the QuestionnaireResponse provided their responses."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaireresponse-completionMode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="CompletionMode"/> - </extension> - <strength value="required"/> - <description value="Codes indicating how the questionnaire was completed."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaireresponse-mode|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType"/> - <resource> - <StructureDefinition> - <id value="questionnaire-fhirType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType"/> - <version value="4.1.0"/> - <name value="fhirType"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="For questionnaires generated from FHIR profiles, indicates the FHIR data type or resource type that corresponds to this node."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type!='display'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The underlying FHIR data type"/> - <definition value="For questionnaires generated from FHIR profiles, indicates the FHIR data type or resource type that corresponds to this node."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The underlying FHIR data type"/> - <definition value="For questionnaires generated from FHIR profiles, indicates the FHIR data type or resource type that corresponds to this node."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-question"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-question"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-question"/> - <version value="4.1.0"/> - <name value="question"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Prompt for element phrased as question"/> - <definition value="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)."/> - <comment value="Question and label serve similar purposes in they both can be used to prompt for capturing a data element. Whether the question form or label form should be used will depend on the type of instrument being used to capture the information. The ordering is in order of preference. I.e. Most preferred question form is listed first. Note that this is for alternate phrasings of the question. Language translations are handled using the ISO 21090 string translation extensions."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-question"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Prompt for element phrased as question"/> - <definition value="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)."/> - <comment value="Question and label serve similar purposes in they both can be used to prompt for capturing a data element. Whether the question form or label form should be used will depend on the type of instrument being used to capture the information. The ordering is in order of preference. I.e. Most preferred question form is listed first. Note that this is for alternate phrasings of the question. Language translations are handled using the ISO 21090 string translation extensions."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-question"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-certainty"/> - <resource> - <StructureDefinition> - <id value="allergyintolerance-certainty"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-certainty"/> - <version value="4.1.0"/> - <name value="certainty"/> - <title value="certainty"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="AllergyIntolerance.reaction"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Certainty that the substance was the cause of the manifestation"/> - <definition value="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event."/> - <comment value="When certainty is missing, it means no information exists (although it could be in narrative). By contrast, the unknown code is used when there is an explicit assertion that certainty is not known, such as when a patient eats a meal and it is unknown which food caused the reaction."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="uncertaintyCode"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-certainty"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AllergyIntoleranceCertainty"/> - </extension> - <strength value="extensible"/> - <description value="Statement about the degree of clinical certainty that a specific substance was the cause of the manifestation in a reaction event."/> - <valueSet value="http://hl7.org/fhir/ValueSet/reaction-event-certainty"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Certainty that the substance was the cause of the manifestation"/> - <definition value="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event."/> - <comment value="When certainty is missing, it means no information exists (although it could be in narrative). By contrast, the unknown code is used when there is an explicit assertion that certainty is not known, such as when a patient eats a meal and it is unknown which food caused the reaction."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="uncertaintyCode"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/allergyintolerance-certainty"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="AllergyIntoleranceCertainty"/> - </extension> - <strength value="extensible"/> - <description value="Statement about the degree of clinical certainty that a specific substance was the cause of the manifestation in a reaction event."/> - <valueSet value="http://hl7.org/fhir/ValueSet/reaction-event-certainty"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure"/> - <resource> - <StructureDefinition> - <id value="procedure-targetBodyStructure"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure"/> - <version value="4.1.0"/> - <name value="targetBodyStructure"/> - <title value="targetBodyStructure"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The target body site used for this procedure. Multiple locations are allowed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <context> - <type value="element"/> - <expression value="ServiceRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The target point for this procedure"/> - <definition value="The target body site used for this procedure. Multiple locations are allowed."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The target point for this procedure"/> - <definition value="The target body site used for this procedure. Multiple locations are allowed."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/BodyStructure"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsGene"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"/> - <version value="4.1.0"/> - <name value="Gene"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="A region (or regions) that includes all of the sequence elements necessary to encode a functional transcript. A gene may include regulatory regions, transcribed regions and/or other functional sequence regions ([SO:0000704](http://www.sequenceontology.org/browser/current_svn/term/SO:0000704)). This element is the official gene symbol approved by the HGNC, which is a short abbreviated form of the gene name ([HGNC](http://www.genenames.org)). LOINC Code: ([48018-6](http://loinc.org/48018-6))."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="HGNC gene symbol"/> - <definition value="A region (or regions) that includes all of the sequence elements necessary to encode a functional transcript. A gene may include regulatory regions, transcribed regions and/or other functional sequence regions ([SO:0000704](http://www.sequenceontology.org/browser/current_svn/term/SO:0000704)). This element is the official gene symbol approved by the HGNC, which is a short abbreviated form of the gene name ([HGNC](http://www.genenames.org)). LOINC Code: ([48018-6](http://loinc.org/48018-6))."/> - <comment value="Other systems or genes not defined in HGNC (e.g., BCR-ABL fusion gene) can be added by using a local extension."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HGNC-geneIdentifiers"/> - </extension> - <strength value="preferred"/> - <description value="International curated set of gene identifiers."/> - <valueSet value="http://hl7.org/fhir/ValueSet/genenames"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="HGNC gene symbol"/> - <definition value="A region (or regions) that includes all of the sequence elements necessary to encode a functional transcript. A gene may include regulatory regions, transcribed regions and/or other functional sequence regions ([SO:0000704](http://www.sequenceontology.org/browser/current_svn/term/SO:0000704)). This element is the official gene symbol approved by the HGNC, which is a short abbreviated form of the gene name ([HGNC](http://www.genenames.org)). LOINC Code: ([48018-6](http://loinc.org/48018-6))."/> - <comment value="Other systems or genes not defined in HGNC (e.g., BCR-ABL fusion gene) can be added by using a local extension."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="HGNC-geneIdentifiers"/> - </extension> - <strength value="preferred"/> - <description value="International curated set of gene identifiers."/> - <valueSet value="http://hl7.org/fhir/ValueSet/genenames"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-reasonReference"/> - <resource> - <StructureDefinition> - <id value="workflow-reasonReference"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-reasonReference"/> - <version value="4.1.0"/> - <name value="reasonReference"/> - <title value="Reason Reference"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Indicates another resource whose existence justifies this event."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="NutritionOrder"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Why was event performed?"/> - <definition value="Indicates another resource whose existence justifies this event."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.reasonReference"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.4 or by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RSON].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-reasonReference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Why was event performed?"/> - <definition value="Indicates another resource whose existence justifies this event."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.reasonReference"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="EVN.4 or by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=RSON].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-reasonReference"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-warning"/> - <resource> - <StructureDefinition> - <id value="valueset-warning"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-warning"/> - <version value="4.1.0"/> - <name value="warning"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="An extra warning about the correct use of the value set."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extra warning about the correct use of the value set"/> - <definition value="An extra warning about the correct use of the value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-warning"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="markdown"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Extra warning about the correct use of the value set"/> - <definition value="An extra warning about the correct use of the value set."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-warning"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="markdown"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/practitionerrole-primaryInd"/> - <resource> - <StructureDefinition> - <id value="practitionerrole-primaryInd"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/practitionerrole-primaryInd"/> - <version value="4.1.0"/> - <name value="primaryInd"/> - <title value="primaryInd"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="PractitionerRole.specialty"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicator of primary specialty"/> - <definition value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/practitionerrole-primaryInd"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Indicator of primary specialty"/> - <definition value="Flag indicating if the specialty is the primary specialty of the provider. Normally, a practitioner will have one primary specialty, but in some cases more than one can be primary."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/practitionerrole-primaryInd"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationArea"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-deliveryInstallationArea"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationArea"/> - <version value="4.1.0"/> - <name value="ADXP-deliveryInstallationArea"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationArea"/> - <definition value="The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINSTA]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationArea"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="deliveryInstallationArea"/> - <definition value="The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=DINSTA]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationArea"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/tz-offset"/> - <resource> - <StructureDefinition> - <id value="tz-offset"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/tz-offset"/> - <version value="4.1.0"/> - <name value="Timezone Offset"/> - <title value="Timezone offset, for date"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Timezone offset, for dates where timezone is not allowed as part of the base date."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="date"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Timezone offset, for dates (no timezone in date)"/> - <definition value="Timezone offset, for dates where timezone is not allowed as part of the base date."/> - <comment value="The format must either be 'Z' or +/-HH:NN. This is not allowed on the base date because many implementations have no way to carry a timezone on the base date structure."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/tz-offset"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Timezone offset, for dates (no timezone in date)"/> - <definition value="Timezone offset, for dates where timezone is not allowed as part of the base date."/> - <comment value="The format must either be 'Z' or +/-HH:NN. This is not allowed on the base date because many implementations have no way to carry a timezone on the base date structure."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/tz-offset"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"/> - <resource> - <StructureDefinition> - <id value="hla-genotyping-results-glstring"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"/> - <version value="4.1.0"/> - <name value="glstring"/> - <status value="draft"/> - <date value="2015-10-09"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="glstring."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="glstring"/> - <definition value="glstring."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:url"> - <path value="Extension.extension"/> - <sliceName value="url"/> - <short value="glstring.url"/> - <definition value="glstring using a URI reference."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:url.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:url.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:url.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="url"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:url.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:text"> - <path value="Extension.extension"/> - <sliceName value="text"/> - <short value="glstring.text"/> - <definition value="glstring using inline data."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:text.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:text.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:text.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="text"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:text.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="glstring"/> - <definition value="glstring."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:url"> - <path value="Extension.extension"/> - <sliceName value="url"/> - <short value="glstring.url"/> - <definition value="glstring using a URI reference."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:url.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:url.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="url"/> - </element> - <element id="Extension.extension:url.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:text"> - <path value="Extension.extension"/> - <sliceName value="text"/> - <short value="glstring.text"/> - <definition value="glstring using inline data."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:text.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:text.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="text"/> - </element> - <element id="Extension.extension:text.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"/> - <resource> - <StructureDefinition> - <id value="observation-geneticsPhaseSet"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"/> - <version value="4.1.0"/> - <name value="PhaseSet"/> - <status value="draft"/> - <date value="2016-03-14"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="Phase set information."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Phase set"/> - <definition value="Phase set information."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Id"> - <path value="Extension.extension"/> - <sliceName value="Id"/> - <short value="Phase set ID"/> - <definition value="This is a globally unique phaseSet id."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Id.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:Id.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:Id.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="Id"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:Id.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:MolecularSequence"> - <path value="Extension.extension"/> - <sliceName value="MolecularSequence"/> - <short value="Phase set sequence"/> - <definition value="MolecularSequence pointed to phase set (from: https://www.hl7.org/fhir/STU3/extension-observation-geneticssequence.html)."/> - <min value="1"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:MolecularSequence.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:MolecularSequence.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:MolecularSequence.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="MolecularSequence"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:MolecularSequence.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Phase set"/> - <definition value="Phase set information."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:Id"> - <path value="Extension.extension"/> - <sliceName value="Id"/> - <short value="Phase set ID"/> - <definition value="This is a globally unique phaseSet id."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:Id.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:Id.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="Id"/> - </element> - <element id="Extension.extension:Id.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:MolecularSequence"> - <path value="Extension.extension"/> - <sliceName value="MolecularSequence"/> - <short value="Phase set sequence"/> - <definition value="MolecularSequence pointed to phase set (from: https://www.hl7.org/fhir/STU3/extension-observation-geneticssequence.html)."/> - <min value="1"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:MolecularSequence.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:MolecularSequence.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="MolecularSequence"/> - </element> - <element id="Extension.extension:MolecularSequence.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/specimen-sequenceNumber"/> - <resource> - <StructureDefinition> - <id value="specimen-sequenceNumber"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/specimen-sequenceNumber"/> - <version value="4.1.0"/> - <name value="sequenceNumber"/> - <title value="sequenceNumber"/> - <status value="draft"/> - <date value="2015-02-19"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="An assigned number on the specimen denoting the order of collection."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Specimen.container"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The sequence number of the sample"/> - <definition value="An assigned number on the specimen denoting the order of collection."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-sequenceNumber"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The sequence number of the sample"/> - <definition value="An assigned number on the specimen denoting the order of collection."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/specimen-sequenceNumber"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitType"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-unitType"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitType"/> - <version value="4.1.0"/> - <name value="ADXP-unitType"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="unitType"/> - <definition value="Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=UNIT]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitType"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="unitType"/> - <definition value="Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=UNIT]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitType"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-replaces"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-replaces"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-replaces"/> - <version value="4.1.0"/> - <name value="replaces"/> - <title value="Replaces"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The report replaces the target resource. For example, when a final anatomic pathology report replaces a preliminary anatomic pathology report replaces where the subsequent observation of case and report may be on more or different material (specimen). Note that this is not same concept as` DiagnosticReport.status` = preliminary of final, but industry definition of preliminary and final."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Replacement for another report"/> - <definition value="The report replaces the target resource. For example, when a final anatomic pathology report replaces a preliminary anatomic pathology report replaces where the subsequent observation of case and report may be on more or different material (specimen). Note that this is not same concept as` DiagnosticReport.status` = preliminary of final, but industry definition of preliminary and final."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-replaces"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Replacement for another report"/> - <definition value="The report replaces the target resource. For example, when a final anatomic pathology report replaces a preliminary anatomic pathology report replaces where the subsequent observation of case and report may be on more or different material (specimen). Note that this is not same concept as` DiagnosticReport.status` = preliminary of final, but industry definition of preliminary and final."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-replaces"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource"/> - <resource> - <StructureDefinition> - <id value="questionnaire-referenceResource"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource"/> - <version value="4.1.0"/> - <name value="referenceResource"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Where the type for a question is "Reference", indicates a type of resource that is permitted."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='reference'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Allowed resource for reference"/> - <definition value="Where the type for a question is "Reference", indicates a type of resource that is permitted."/> - <comment value="This extension only has meaning if the question.type = Reference. If no allowedResource extensions are present, the presumption is that any type of resource is permitted. If multiple are present, then any of the specified types are permitted."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ResourceType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="One of the resource types defined as part of this version of FHIR."/> - <valueSet value="http://hl7.org/fhir/ValueSet/resource-types|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Allowed resource for reference"/> - <definition value="Where the type for a question is "Reference", indicates a type of resource that is permitted."/> - <comment value="This extension only has meaning if the question.type = Reference. If no allowedResource extensions are present, the presumption is that any type of resource is permitted. If multiple are present, then any of the specified types are permitted."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="N/A - MIF rather than RIM level"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ResourceType"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="One of the resource types defined as part of this version of FHIR."/> - <valueSet value="http://hl7.org/fhir/ValueSet/resource-types|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-addendumOf"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf"/> - <version value="4.1.0"/> - <name value="addendumOf"/> - <title value="Addendum Of"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The supplements or provides additional information for the target report."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional or Supplement Content"/> - <definition value="The supplements or provides additional information for the target report."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional or Supplement Content"/> - <definition value="The supplements or provides additional information for the target report."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-library"/> - <resource> - <StructureDefinition> - <id value="cqf-library"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-library"/> - <version value="4.1.0"/> - <name value="library"/> - <title value="library"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="A reference to a Library containing the formal logic used by the artifact."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A library containing logic used by the artifact"/> - <definition value="A reference to a Library containing the formal logic used by the artifact."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-library"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Library"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A library containing logic used by the artifact"/> - <definition value="A reference to a Library containing the formal logic used by the artifact."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-library"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Library"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-usageMode"/> - <resource> - <StructureDefinition> - <id value="questionnaire-usageMode"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-usageMode"/> - <version value="4.1.0"/> - <name value="usageMode"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Identifies that the specified element should only appear in certain "modes" of operation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="capture | display | display-non-empty | capture-display | capture-display-non-empty"/> - <definition value="Identifies that the specified element should only appear in certain "modes" of operation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-usageMode"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireItemUsageMode"/> - </extension> - <strength value="required"/> - <description value="Identifies the modes of usage of a questionnaire that should enable a particular questionnaire item."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-usage-mode|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="capture | display | display-non-empty | capture-display | capture-display-non-empty"/> - <definition value="Identifies that the specified element should only appear in certain "modes" of operation."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-usageMode"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuestionnaireItemUsageMode"/> - </extension> - <strength value="required"/> - <description value="Identifies the modes of usage of a questionnaire that should enable a particular questionnaire item."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-usage-mode|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation"/> - <resource> - <StructureDefinition> - <id value="cqf-strengthOfRecommendation"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation"/> - <version value="4.1.0"/> - <name value="strengthOfRecommendation"/> - <title value="strengthOfRecommendation"/> - <status value="draft"/> - <date value="2015-05-30"/> - <publisher value="Health Level Seven, Inc. - CDS WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/dss"/> - </telecom> - </contact> - <description value="The strength of the recommendation assigned to this reference. The code system used specifies the rating scale used to rate this recommendation while the code specifies the actual recommendation rating (represented as a coded value) associated with this recommendation."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Attachment"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The strength of the recommendation"/> - <definition value="The strength of the recommendation assigned to this reference. The code system used specifies the rating scale used to rate this recommendation while the code specifies the actual recommendation rating (represented as a coded value) associated with this recommendation."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StrengthOfRecommendationRating"/> - </extension> - <strength value="example"/> - <description value="A rating system that describes the strength of the recommendation, such as the GRADE, DynaMed, or HGPS systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/recommendation-strength"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The strength of the recommendation"/> - <definition value="The strength of the recommendation assigned to this reference. The code system used specifies the rating scale used to rate this recommendation while the code specifies the actual recommendation rating (represented as a coded value) associated with this recommendation."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="StrengthOfRecommendationRating"/> - </extension> - <strength value="example"/> - <description value="A rating system that describes the strength of the recommendation, such as the GRADE, DynaMed, or HGPS systems."/> - <valueSet value="http://hl7.org/fhir/ValueSet/recommendation-strength"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-unitID"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID"/> - <version value="4.1.0"/> - <name value="ADXP-unitID"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="unitID"/> - <definition value="The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=UNID]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="unitID"/> - <definition value="The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=UNID]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/organization-period"/> - <resource> - <StructureDefinition> - <id value="organization-period"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/organization-period"/> - <version value="4.1.0"/> - <name value="period"/> - <title value="Period"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The date range that this organization should be considered available."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Organization"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Extension"/> - <definition value="The date range that this organization should be considered available."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organization-period"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Period"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <definition value="The date range that this organization should be considered available."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/organization-period"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Period"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-supported-system"/> - <resource> - <StructureDefinition> - <id value="capabilitystatement2-supported-system"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-supported-system"/> - <version value="4.1.0"/> - <name value="supported-system"/> - <title value="Supported Code System"/> - <status value="draft"/> - <date value="2014-04-12"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fhir.htm"/> - </telecom> - </contact> - <description value="A code system that is supported by the system that is not defined in a value set resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement2"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system not defined in a value set"/> - <definition value="A code system that is supported by the system that is not defined in a value set resource."/> - <comment value="Typically, this is a large terminology such as LOINC, SNOMED CT."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-supported-system"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Code system not defined in a value set"/> - <definition value="A code system that is supported by the system that is not defined in a value set resource."/> - <comment value="Typically, this is a large terminology such as LOINC, SNOMED CT."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/capabilitystatement2-supported-system"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-otherName"/> - <resource> - <StructureDefinition> - <id value="valueset-otherName"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-otherName"/> - <version value="4.1.0"/> - <name value="otherName"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Human readable names for the valueset."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternative names"/> - <definition value="Human readable names for the valueset."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="Human readable, short and specific"/> - <definition value="This name is intended to be human readable, short and as specific as possible and to convey the purpose of the value set. It is considered to be the name of the value set."/> - <comment value="This need not be unique. However some use cases require uniqueness within a namespace and therefore best practice would be to make the name unique."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:preferred"> - <path value="Extension.extension"/> - <sliceName value="preferred"/> - <short value="Which name is preferred for this language"/> - <definition value="Flag that this Name in this Name Language is the preferred human-readable signifier in this language."/> - <comment value="There may be multiple human readable names in a given language, and this flag indicates which of them is preferred for the given language."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:preferred.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:preferred.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:preferred.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="preferred"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:preferred.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-otherName"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Alternative names"/> - <definition value="Human readable names for the valueset."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="Human readable, short and specific"/> - <definition value="This name is intended to be human readable, short and as specific as possible and to convey the purpose of the value set. It is considered to be the name of the value set."/> - <comment value="This need not be unique. However some use cases require uniqueness within a namespace and therefore best practice would be to make the name unique."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:preferred"> - <path value="Extension.extension"/> - <sliceName value="preferred"/> - <short value="Which name is preferred for this language"/> - <definition value="Flag that this Name in this Name Language is the preferred human-readable signifier in this language."/> - <comment value="There may be multiple human readable names in a given language, and this flag indicates which of them is preferred for the given language."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:preferred.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:preferred.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="preferred"/> - </element> - <element id="Extension.extension:preferred.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-otherName"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-unit"/> - <resource> - <StructureDefinition> - <id value="questionnaire-unit"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-unit"/> - <version value="4.1.0"/> - <name value="unit"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="Provides a computable unit of measure associated with numeric questions to support subsequent computation on responses. This is for use on items of type integer and decimal, and it's purpose is to support converting the integer or decimal answer into a Quantity when extracting the data into a resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <contextInvariant value="type='integer' or type='decimal'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit for numeric answer"/> - <definition value="Provides a computable unit of measure associated with numeric questions to support subsequent computation on responses. This is for use on items of type integer and decimal, and it's purpose is to support converting the integer or decimal answer into a Quantity when extracting the data into a resource."/> - <comment value="The human-readable unit is conveyed as a display element. This element is for computation purposes."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unit"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Unit for numeric answer"/> - <definition value="Provides a computable unit of measure associated with numeric questions to support subsequent computation on responses. This is for use on items of type integer and decimal, and it's purpose is to support converting the integer or decimal answer into a Quantity when extracting the data into a resource."/> - <comment value="The human-readable unit is conveyed as a display element. This element is for computation purposes."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-unit"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/location-boundary-geojson"/> - <resource> - <StructureDefinition> - <id value="location-boundary-geojson"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/location-boundary-geojson"/> - <version value="4.1.0"/> - <name value="boundary-geojson"/> - <title value="Boundary (GeoJSON)"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="A boundary shape that represents the outside edge of the location (in GeoJSON format) This shape may have holes, and disconnected shapes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Location"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="A boundary shape that represents the outside edge of the location (in GeoJSON format)"/> - <definition value="A boundary shape that represents the outside edge of the location (in GeoJSON format) This shape may have holes, and disconnected shapes."/> - <comment value="The format of the content is GeoJSON in both the JSON and XML formats. It will be stored in the resource using the .data property, and externally referenced via the URL property. The mimetype to be used will be 'application/geo+json'."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/location-boundary-geojson"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Attachment"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="A boundary shape that represents the outside edge of the location (in GeoJSON format)"/> - <definition value="A boundary shape that represents the outside edge of the location (in GeoJSON format) This shape may have holes, and disconnected shapes."/> - <comment value="The format of the content is GeoJSON in both the JSON and XML formats. It will be stored in the resource using the .data property, and externally referenced via the URL property. The mimetype to be used will be 'application/geo+json'."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/location-boundary-geojson"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Attachment"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetAddressLine"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-streetAddressLine"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetAddressLine"/> - <version value="4.1.0"/> - <name value="ADXP-streetAddressLine"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="A street address line is frequently used instead of breaking out building number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="streetAddressLine"/> - <definition value="A street address line is frequently used instead of breaking out building number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=SAL]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetAddressLine"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="streetAddressLine"/> - <definition value="A street address line is frequently used instead of breaking out building number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=SAL]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetAddressLine"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-activityStatusDate"/> - <resource> - <StructureDefinition> - <id value="valueset-activityStatusDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-activityStatusDate"/> - <version value="4.1.0"/> - <name value="activityStatusDate"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The date when the associated Value Set Definition Version activity status is in effect."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Date when the activity status is in effect"/> - <definition value="The date when the associated Value Set Definition Version activity status is in effect."/> - <comment value="When the Activity Status is set to “Active”, the Activity Status Date defines the Effective Date which is the date-time the Value Set Definition Version becomes active. When the Activity Status is set to “Inactive”, the Activity Status Date is the date-time when the Value Set Definition version becomes Inactive. This cycle may happen multiple times. The specified time is expected to be one second after midnight UTC of the Activity Status Date. The date may be in the future. It is strongly encouraged that the Activity Status be set such that no more than one Value Set Definition Version for a single Value Set Identifier can have an Activity Status of ACTIVE at the same time within a single realm. In cases where this is not true, evaluation of the alignment of a Value Set Expansion Code Set to a specific Value Set Definition, as referenced in a CD, will be problematic. Changes to this element should never result in a new Value Set Definition Version."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-activityStatusDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="date"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Date when the activity status is in effect"/> - <definition value="The date when the associated Value Set Definition Version activity status is in effect."/> - <comment value="When the Activity Status is set to “Active”, the Activity Status Date defines the Effective Date which is the date-time the Value Set Definition Version becomes active. When the Activity Status is set to “Inactive”, the Activity Status Date is the date-time when the Value Set Definition version becomes Inactive. This cycle may happen multiple times. The specified time is expected to be one second after midnight UTC of the Activity Status Date. The date may be in the future. It is strongly encouraged that the Activity Status be set such that no more than one Value Set Definition Version for a single Value Set Identifier can have an Activity Status of ACTIVE at the same time within a single realm. In cases where this is not true, evaluation of the alignment of a Value Set Expansion Code Set to a specific Value Set Definition, as referenced in a CD, will be problematic. Changes to this element should never result in a new Value Set Definition Version."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-activityStatusDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="date"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type"/> - <resource> - <StructureDefinition> - <id value="operationdefinition-allowed-type"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type"/> - <version value="4.1.0"/> - <name value="allowed-type"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="When the base type is an abstract type (e.g. Resource or Element) then this extension defines which concrete types are allowed to be used for a parameter. In the absence of this extension, any type is allowed."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OperationDefinition.parameter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Which types are allowed for a parameter, when the base type is Abstract"/> - <definition value="When the base type is an abstract type (e.g. Resource or Element) then this extension defines which concrete types are allowed to be used for a parameter. In the absence of this extension, any type is allowed."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Which types are allowed for a parameter, when the base type is Abstract"/> - <definition value="When the base type is an abstract type (e.g. Resource or Element) then this extension defines which concrete types are allowed to be used for a parameter. In the absence of this extension, any type is allowed."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/operationoutcome-detectedIssue"/> - <resource> - <StructureDefinition> - <id value="operationoutcome-detectedIssue"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/operationoutcome-detectedIssue"/> - <version value="4.1.0"/> - <name value="detectedIssue"/> - <title value="Clinical Issue"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="A reference to a stored contraindication that is the basis for this issue. A recipient can expect that the item referenced in this extension is being retained for record keeping purposes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="OperationOutcome.issue"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a contra-indication that is the basis for this error"/> - <definition value="A reference to a stored contraindication that is the basis for this issue. A recipient can expect that the item referenced in this extension is being retained for record keeping purposes."/> - <comment value="Operation Outcome records are transient items that are returned in response to specific interactions or operations. Contraindications are items that can be stored in the patient's records as reasons that things were not done (or done). This extension allows a transient operation outcome to refer to a persistent entry in the patient record as the basis for the outcome."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-detectedIssue"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Reference to a contra-indication that is the basis for this error"/> - <definition value="A reference to a stored contraindication that is the basis for this issue. A recipient can expect that the item referenced in this extension is being retained for record keeping purposes."/> - <comment value="Operation Outcome records are transient items that are returned in response to specific interactions or operations. Contraindications are items that can be stored in the patient's records as reasons that things were not done (or done). This extension allows a transient operation outcome to refer to a persistent entry in the patient record as the basis for the outcome."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/operationoutcome-detectedIssue"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint"/> - <resource> - <StructureDefinition> - <id value="questionnaire-constraint"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint"/> - <version value="4.1.0"/> - <name value="constraint"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="An invariant that must be satisfied before responses to the questionnaire can be considered "complete"."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Constraint"/> - <definition value="An invariant that must be satisfied before responses to the questionnaire can be considered "complete"."/> - <comment value="This maps to the ElementDefinition.constraint element."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:key"> - <path value="Extension.extension"/> - <sliceName value="key"/> - <short value="Unique identifier"/> - <definition value="Unique id for the constraint within the questionnaire."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:key.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:key.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:key.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="key"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:key.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="id"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:requirements"> - <path value="Extension.extension"/> - <sliceName value="requirements"/> - <short value="Why needed"/> - <definition value="An explanation of why this extension is required (for documentation purposes)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:requirements.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:requirements.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:requirements.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="requirements"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:requirements.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:severity"> - <path value="Extension.extension"/> - <sliceName value="severity"/> - <short value="error|warning"/> - <definition value="Indicates how serious violating the invariant is."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:severity.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:severity.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:severity.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="severity"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:severity.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConstraintSeverity"/> - </extension> - <strength value="required"/> - <description value="How important the invariant is."/> - <valueSet value="http://hl7.org/fhir/ValueSet/constraint-severity|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:expression"> - <path value="Extension.extension"/> - <sliceName value="expression"/> - <short value="Formal rule"/> - <definition value="The FHIRPath expression of the rule for computable interpretation."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:expression.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:expression.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:expression.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="expression"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:expression.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:human"> - <path value="Extension.extension"/> - <sliceName value="human"/> - <short value="Human-readable rule"/> - <definition value="A free text expression of the rule to display to the user if the rule is violated."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:human.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:human.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:human.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="human"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:human.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:location"> - <path value="Extension.extension"/> - <sliceName value="location"/> - <short value="Relative path to elements"/> - <definition value="Relative paths to the questions this rule is enforced against."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:location.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:location.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:location.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="location"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:location.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Constraint"/> - <definition value="An invariant that must be satisfied before responses to the questionnaire can be considered "complete"."/> - <comment value="This maps to the ElementDefinition.constraint element."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:key"> - <path value="Extension.extension"/> - <sliceName value="key"/> - <short value="Unique identifier"/> - <definition value="Unique id for the constraint within the questionnaire."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:key.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:key.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="key"/> - </element> - <element id="Extension.extension:key.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="id"/> - </type> - </element> - <element id="Extension.extension:requirements"> - <path value="Extension.extension"/> - <sliceName value="requirements"/> - <short value="Why needed"/> - <definition value="An explanation of why this extension is required (for documentation purposes)."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:requirements.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:requirements.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="requirements"/> - </element> - <element id="Extension.extension:requirements.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:severity"> - <path value="Extension.extension"/> - <sliceName value="severity"/> - <short value="error|warning"/> - <definition value="Indicates how serious violating the invariant is."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:severity.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:severity.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="severity"/> - </element> - <element id="Extension.extension:severity.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ConstraintSeverity"/> - </extension> - <strength value="required"/> - <description value="How important the invariant is."/> - <valueSet value="http://hl7.org/fhir/ValueSet/constraint-severity|4.1.0"/> - </binding> - </element> - <element id="Extension.extension:expression"> - <path value="Extension.extension"/> - <sliceName value="expression"/> - <short value="Formal rule"/> - <definition value="The FHIRPath expression of the rule for computable interpretation."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:expression.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:expression.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="expression"/> - </element> - <element id="Extension.extension:expression.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:human"> - <path value="Extension.extension"/> - <sliceName value="human"/> - <short value="Human-readable rule"/> - <definition value="A free text expression of the rule to display to the user if the rule is violated."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:human.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:human.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="human"/> - </element> - <element id="Extension.extension:human.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:location"> - <path value="Extension.extension"/> - <sliceName value="location"/> - <short value="Relative path to elements"/> - <definition value="Relative paths to the questions this rule is enforced against."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:location.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:location.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="location"/> - </element> - <element id="Extension.extension:location.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"/> - <resource> - <StructureDefinition> - <id value="structuredefinition-normative-version"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"/> - <version value="4.1.0"/> - <name value="normative-version"/> - <title value="First Normative Version"/> - <status value="draft"/> - <date value="2014-01-31"/> - <publisher value="Health Level Seven, Inc. - [WG Name] WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="If this StructureDefinition is normative, which was the first normative version."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="StructureDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="If normative, which was the first normative version"/> - <definition value="If this StructureDefinition is normative, which was the first normative version."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FHIRVersion"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="All published FHIR Versions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/FHIR-version|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="If normative, which was the first normative version"/> - <definition value="If this StructureDefinition is normative, which was the first normative version."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="FHIRVersion"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true"/> - </extension> - <strength value="required"/> - <description value="All published FHIR Versions."/> - <valueSet value="http://hl7.org/fhir/ValueSet/FHIR-version|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/oauth-uris"/> - <resource> - <StructureDefinition> - <id value="oauth-uris"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris"/> - <version value="4.1.0"/> - <name value="oauth-uris"/> - <status value="active"/> - <date value="2018-02-15"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Supports automated discovery of OAuth2 endpoints."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CapabilityStatement.rest.security"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Automated discovery of OAuth2 endpoints"/> - <definition value="Supports automated discovery of OAuth2 endpoints."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:authorize"> - <path value="Extension.extension"/> - <sliceName value="authorize"/> - <short value="OAuth2 "authorize" endpoint"/> - <definition value="The OAuth2 "authorize" endpoint for this FHIR server."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:authorize.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:authorize.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:authorize.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="authorize"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:authorize.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:token"> - <path value="Extension.extension"/> - <sliceName value="token"/> - <short value="OAuth2 "token" endpoint"/> - <definition value="The OAuth2 "token" endpoint for this FHIR server."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:token.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:token.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:token.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="token"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:token.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:register"> - <path value="Extension.extension"/> - <sliceName value="register"/> - <short value="OAuth2 dynamic registration endpoint"/> - <definition value="The OAuth2 dynamic registration endpoint for this FHIR server, if supported."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:register.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:register.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:register.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="register"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:register.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:manage"> - <path value="Extension.extension"/> - <sliceName value="manage"/> - <short value="User-facing authorization management entry point"/> - <definition value="The user-facing authorization management workflow entry point for this FHIR server."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:manage.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:manage.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:manage.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="manage"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:manage.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Automated discovery of OAuth2 endpoints"/> - <definition value="Supports automated discovery of OAuth2 endpoints."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension:authorize"> - <path value="Extension.extension"/> - <sliceName value="authorize"/> - <short value="OAuth2 "authorize" endpoint"/> - <definition value="The OAuth2 "authorize" endpoint for this FHIR server."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:authorize.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:authorize.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="authorize"/> - </element> - <element id="Extension.extension:authorize.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:token"> - <path value="Extension.extension"/> - <sliceName value="token"/> - <short value="OAuth2 "token" endpoint"/> - <definition value="The OAuth2 "token" endpoint for this FHIR server."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:token.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:token.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="token"/> - </element> - <element id="Extension.extension:token.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:register"> - <path value="Extension.extension"/> - <sliceName value="register"/> - <short value="OAuth2 dynamic registration endpoint"/> - <definition value="The OAuth2 dynamic registration endpoint for this FHIR server, if supported."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:register.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:register.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="register"/> - </element> - <element id="Extension.extension:register.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.extension:manage"> - <path value="Extension.extension"/> - <sliceName value="manage"/> - <short value="User-facing authorization management entry point"/> - <definition value="The user-facing authorization management workflow entry point for this FHIR server."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:manage.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:manage.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="manage"/> - </element> - <element id="Extension.extension:manage.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/messageheader-response-request"/> - <resource> - <StructureDefinition> - <id value="messageheader-response-request"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="inm"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/messageheader-response-request"/> - <version value="4.1.0"/> - <name value="messageheader-response-request"/> - <title value="MessageHeader response request"/> - <status value="draft"/> - <date value="2017-01-24"/> - <publisher value="Health Level Seven, Inc. - InM Work Group"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="This extension enables the capability currently available through MSH-16 (Application Level acknowledgement) in HL7 Version 2 to declare at a message instance level whether a response is required or only upon error or success, or never."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="MessageHeader"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="messageheader initiator requests a response"/> - <definition value="This extension enables the capability currently available through MSH-16 (Application Level acknowledgement) in HL7 Version 2 to declare at a message instance level whether a response is required or only upon error or success, or never."/> - <comment value="The Message Definition data provides perhaps what would be acceptable response requests, but could not indicate for each instance what is appropriate. The initiator should be able to handle the response even if not expected."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="MSH-16"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/messageheader-response-request"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="messageheader-response-request"/> - </extension> - <strength value="required"/> - <description value="HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message."/> - <valueSet value="http://hl7.org/fhir/ValueSet/messageheader-response-request|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="messageheader initiator requests a response"/> - <definition value="This extension enables the capability currently available through MSH-16 (Application Level acknowledgement) in HL7 Version 2 to declare at a message instance level whether a response is required or only upon error or success, or never."/> - <comment value="The Message Definition data provides perhaps what would be acceptable response requests, but could not indicate for each instance what is appropriate. The initiator should be able to handle the response even if not expected."/> - <min value="1"/> - <max value="1"/> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="MSH-16"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/messageheader-response-request"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="messageheader-response-request"/> - </extension> - <strength value="required"/> - <description value="HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message."/> - <valueSet value="http://hl7.org/fhir/ValueSet/messageheader-response-request|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/humanname-own-name"/> - <resource> - <StructureDefinition> - <id value="humanname-own-name"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/humanname-own-name"/> - <version value="4.1.0"/> - <name value="own-name"/> - <status value="draft"/> - <date value="2015-11-22"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="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."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="HumanName.family"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion derived from person's own surname"/> - <definition value="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."/> - <comment value="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"."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="FN.3"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (BR)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-own-name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Portion derived from person's own surname"/> - <definition value="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."/> - <comment value="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"."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="FN.3"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="ENXP where Qualifiers = (BR)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/humanname-own-name"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/subscription-status"/> - <resource> - <StructureDefinition> - <id value="subscription-status"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/subscription-status"/> - <version value="4.1.0"/> - <name value="subscription-status"/> - <title value="Subscription Status"/> - <status value="draft"/> - <date value="2015-03-11"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The current status of this Subscription at the time this Notification was sent."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Bundle.meta"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="requested | active | error | off"/> - <definition value="The current status of this Subscription at the time this Notification was sent."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SubscriptionStatusAtEvent"/> - </extension> - <strength value="required"/> - <description value="A status code for the state of the Subscription."/> - <valueSet value="http://hl7.org/fhir/ValueSet/subscription-status-at-event|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="requested | active | error | off"/> - <definition value="The current status of this Subscription at the time this Notification was sent."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/subscription-status"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="SubscriptionStatusAtEvent"/> - </extension> - <strength value="required"/> - <description value="A status code for the state of the Subscription."/> - <valueSet value="http://hl7.org/fhir/ValueSet/subscription-status-at-event|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"/> - <resource> - <StructureDefinition> - <id value="elementdefinition-profile-element"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"/> - <version value="4.1.0"/> - <name value="profile-element"/> - <status value="draft"/> - <date value="2015-02-28"/> - <publisher value="Health Level Seven, Inc. - FHIR Core WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/FHIR"/> - </telecom> - </contact> - <description value="The specific element to use in the referenced profile. This is used when a backbone element is being profiled, rather than an established type."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ElementDefinition.type.profile"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Specific element for profile (for backbone elements)"/> - <definition value="The specific element to use in the referenced profile. This is used when a backbone element is being profiled, rather than an established type."/> - <comment value="The backbone element cannot be the root of the struture definition, so the starting element must be specified separately."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Specific element for profile (for backbone elements)"/> - <definition value="The specific element to use in the referenced profile. This is used when a backbone element is being profiled, rather than an established type."/> - <comment value="The backbone element cannot be the root of the struture definition, so the starting element must be specified separately."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-unclosed"/> - <resource> - <StructureDefinition> - <id value="valueset-unclosed"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-unclosed"/> - <version value="4.1.0"/> - <name value="unclosed"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Marks that the expansion is incomplete, and values other than those listed may be valid. This may be used because post-coordinated codes are allowed, and no practical expansion can be produced."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.expansion"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The expansion is incomplete (perhaps because of post-coordination)"/> - <definition value="Marks that the expansion is incomplete, and values other than those listed may be valid. This may be used because post-coordinated codes are allowed, and no practical expansion can be produced."/> - <comment value="This extension exists to allow for definition and use of value sets that are currently unbounded, including those for which it may always be impractical to set bounds. This can be done to allow additional learning in this space, such as exploring poorly understsood consequences of alternatives."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-unclosed"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="boolean"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The expansion is incomplete (perhaps because of post-coordination)"/> - <definition value="Marks that the expansion is incomplete, and values other than those listed may be valid. This may be used because post-coordinated codes are allowed, and no practical expansion can be produced."/> - <comment value="This extension exists to allow for definition and use of value sets that are currently unbounded, including those for which it may always be impractical to set bounds. This can be done to allow additional learning in this space, such as exploring poorly understsood consequences of alternatives."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-unclosed"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="boolean"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/procedure-causedBy"/> - <resource> - <StructureDefinition> - <id value="procedure-causedBy"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/procedure-causedBy"/> - <version value="4.1.0"/> - <name value="causedBy"/> - <title value="causedBy"/> - <status value="draft"/> - <date value="2015-02-12"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="This procedure is because of the related item."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Procedure"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Related item that caused this procedure."/> - <definition value="This procedure is because of the related item."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value=".target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-causedBy"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Related item that caused this procedure."/> - <definition value="This procedure is because of the related item."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value=".target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/procedure-causedBy"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationUsage"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/servicerequest-geneticsItem"/> - <resource> - <StructureDefinition> - <id value="servicerequest-geneticsItem"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/servicerequest-geneticsItem"/> - <version value="4.1.0"/> - <name value="Item"/> - <status value="draft"/> - <date value="2015-10-20"/> - <publisher value="Health Level Seven International (Clinical Genomics)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/clingenomics"/> - </telecom> - </contact> - <description value="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The items the orderer requested"/> - <definition value="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Code to indicate the item (test, panel or sequence variant) being ordered"/> - <definition value="Code to indicate the item (test, panel or sequence variant) being ordered."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:geneticsObservation"> - <path value="Extension.extension"/> - <sliceName value="geneticsObservation"/> - <short value="Indicate the genetic variant ordered to be tested"/> - <definition value="Indicate the genetic variant ordered to be tested."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:geneticsObservation.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:geneticsObservation.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:geneticsObservation.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="geneticsObservation"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:geneticsObservation.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:specimen"> - <path value="Extension.extension"/> - <sliceName value="specimen"/> - <short value="If this item relates to specific specimens"/> - <definition value="If the item is related to a specific specimen."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:specimen.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:specimen.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:specimen.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="specimen"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:specimen.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:status"> - <path value="Extension.extension"/> - <sliceName value="status"/> - <short value="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"/> - <definition value="The status of this individual item within the order."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:status.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:status.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:status.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="status"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:status.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-geneticsItem"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The items the orderer requested"/> - <definition value="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension:code"> - <path value="Extension.extension"/> - <sliceName value="code"/> - <short value="Code to indicate the item (test, panel or sequence variant) being ordered"/> - <definition value="Code to indicate the item (test, panel or sequence variant) being ordered."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:code.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:code.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="code"/> - </element> - <element id="Extension.extension:code.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - </element> - <element id="Extension.extension:geneticsObservation"> - <path value="Extension.extension"/> - <sliceName value="geneticsObservation"/> - <short value="Indicate the genetic variant ordered to be tested"/> - <definition value="Indicate the genetic variant ordered to be tested."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:geneticsObservation.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:geneticsObservation.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="geneticsObservation"/> - </element> - <element id="Extension.extension:geneticsObservation.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation"/> - </type> - </element> - <element id="Extension.extension:specimen"> - <path value="Extension.extension"/> - <sliceName value="specimen"/> - <short value="If this item relates to specific specimens"/> - <definition value="If the item is related to a specific specimen."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:specimen.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:specimen.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="specimen"/> - </element> - <element id="Extension.extension:specimen.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen"/> - </type> - </element> - <element id="Extension.extension:status"> - <path value="Extension.extension"/> - <sliceName value="status"/> - <short value="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"/> - <definition value="The status of this individual item within the order."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - </element> - <element id="Extension.extension:status.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:status.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="status"/> - </element> - <element id="Extension.extension:status.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/servicerequest-geneticsItem"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/minLength"/> - <resource> - <StructureDefinition> - <id value="minLength"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/minLength"/> - <version value="4.1.0"/> - <name value="minLength"/> - <status value="draft"/> - <date value="2014-04-27"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="The minimum number of characters that must be present in the simple data type to be considered a "valid" instance."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="ElementDefinition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="At least this many characters"/> - <definition value="The minimum number of characters that must be present in the simple data type to be considered a "valid" instance."/> - <comment value="For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/minLength"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="integer"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="At least this many characters"/> - <definition value="The minimum number of characters that must be present in the simple data type to be considered a "valid" instance."/> - <comment value="For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data."/> - <min value="0"/> - <max value="1"/> - <mapping> - <identity value="v2"/> - <map value="N/A"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value="N/A (MIF-level)"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/minLength"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="integer"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix"/> - <resource> - <StructureDefinition> - <id value="iso21090-ADXP-buildingNumberSuffix"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix"/> - <version value="4.1.0"/> - <name value="ADXP-buildingNumberSuffix"/> - <status value="draft"/> - <date value="2012-06-24"/> - <publisher value="Health Level Seven International (Modeling and Methodology)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/mnm"/> - </telecom> - </contact> - <description value="Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Address.line"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="buildingNumberSuffix"/> - <definition value="Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNS]"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="buildingNumberSuffix"/> - <definition value="Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="rim"/> - <map value="ADXP[partType=BNS]"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"/> - <resource> - <StructureDefinition> - <id value="questionnaire-itemControl"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"/> - <version value="4.1.0"/> - <name value="itemControl"/> - <status value="draft"/> - <date value="2013-07-04"/> - <publisher value="HL7"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org"/> - </telecom> - </contact> - <description value="The type of data entry control or structure that should be used to render the item."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Questionnaire.item"/> - </context> - <context> - <type value="element"/> - <expression value="Questionnaire.item.item"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. Fly-over, Table, Checkbox, Combo-box, Lookup, etc."/> - <definition value="The type of data entry control or structure that should be used to render the item."/> - <comment value="Different controls may be appropriate for different item types. It is up to the system rendering a questionnaire as to what controls it will support and for which data types."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ItemControl"/> - </extension> - <strength value="extensible"/> - <description value="User interface controls or widgets used for questionnaire items."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-item-control"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="E.g. Fly-over, Table, Checkbox, Combo-box, Lookup, etc."/> - <definition value="The type of data entry control or structure that should be used to render the item."/> - <comment value="Different controls may be appropriate for different item types. It is up to the system rendering a questionnaire as to what controls it will support and for which data types."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ItemControl"/> - </extension> - <strength value="extensible"/> - <description value="User interface controls or widgets used for questionnaire items."/> - <valueSet value="http://hl7.org/fhir/ValueSet/questionnaire-item-control"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/rendered-value"/> - <resource> - <StructureDefinition> - <id value="rendered-value"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/rendered-value"/> - <version value="4.1.0"/> - <name value="Rendered Value"/> - <title value="Rendered Value"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="Provides a rendered version of the value intended for human display. For example, a sensitive identifier (e.g. social security number) partially obscured by asterisks; a drivers licence number with dashes inserted; a date formatted as MMM dd, yyyy; etc."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Identifier.value"/> - </context> - <context> - <type value="element"/> - <expression value="date"/> - </context> - <context> - <type value="element"/> - <expression value="dateTime"/> - </context> - <context> - <type value="element"/> - <expression value="time"/> - </context> - <context> - <type value="element"/> - <expression value="instant"/> - </context> - <context> - <type value="element"/> - <expression value="integer"/> - </context> - <context> - <type value="element"/> - <expression value="decimal"/> - </context> - <context> - <type value="element"/> - <expression value="string"/> - </context> - <context> - <type value="element"/> - <expression value="code"/> - </context> - <context> - <type value="element"/> - <expression value="canonical"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="What should be displayed to human (if default is not appropriate)"/> - <definition value="Provides a rendered version of the value intended for human display. For example, a sensitive identifier (e.g. social security number) partially obscured by asterisks; a drivers licence number with dashes inserted; a date formatted as MMM dd, yyyy; etc."/> - <comment value="In some cases, this extension may be present and the value won't be present. For example if the recipient only has permission to see a partially masked view of a value. The rendering may be realm-specific. (E.g. the use of ',' vs. '.' when rendering numbers.)."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendered-value"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="What should be displayed to human (if default is not appropriate)"/> - <definition value="Provides a rendered version of the value intended for human display. For example, a sensitive identifier (e.g. social security number) partially obscured by asterisks; a drivers licence number with dashes inserted; a date formatted as MMM dd, yyyy; etc."/> - <comment value="In some cases, this extension may be present and the value won't be present. For example if the recipient only has permission to see a partially masked view of a value. The rendering may be realm-specific. (E.g. the use of ',' vs. '.' when rendering numbers.)."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/rendered-value"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-sourceReference"/> - <resource> - <StructureDefinition> - <id value="codesystem-sourceReference"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-sourceReference"/> - <version value="4.1.0"/> - <name value="sourceReference"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Where did this content come from"/> - <definition value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <comment value="This is not intended to be a direct link to another value set. It is only intended to support a link or textual description that indicates related material for the value set."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-sourceReference"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Where did this content come from"/> - <definition value="This text is intended to act as a citation to work done elsewhere that is not part of the current stewarding process where the referenced source is in some way a basis of the current value set definition."/> - <comment value="This is not intended to be a direct link to another value set. It is only intended to support a link or textual description that indicates related material for the value set."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-sourceReference"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical"/> - <resource> - <StructureDefinition> - <id value="workflow-instantiatesCanonical"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical"/> - <version value="4.1.0"/> - <name value="instantiatesCanonical"/> - <title value="Definition"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="FHIR protocol or definition"/> - <definition value="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.instantiates"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=DEFN].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Measure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="FHIR protocol or definition"/> - <definition value="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.instantiates"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=DEFN].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="canonical"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Measure"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/narrativeLink"/> - <resource> - <StructureDefinition> - <id value="narrativeLink"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/narrativeLink"/> - <version value="4.1.0"/> - <name value="Narrative Link"/> - <status value="draft"/> - <date value="2013-12-05"/> - <publisher value="Health Level Seven International (FHIR Infrastructure)"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://www.hl7.org/Special/committees/fiwg"/> - </telecom> - </contact> - <description value="A human language representation of the concept (resource/element), as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Element"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Narrative Link"/> - <definition value="A human language representation of the concept (resource/element), as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <comment value="It's also possible to link to the resource narrative using the [originalText extension](extension-originaltext.html) which claims that the data is derived from the text provided or linked to."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/narrativeLink"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="url"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Narrative Link"/> - <definition value="A human language representation of the concept (resource/element), as a url that is a reference to a portion of the narrative of a resource ([DomainResource.text](narrative.html))."/> - <comment value="It's also possible to link to the resource narrative using the [originalText extension](extension-originaltext.html) which claims that the data is derived from the text provided or linked to."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/narrativeLink"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="url"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-otherConfidentiality"/> - <resource> - <StructureDefinition> - <id value="composition-clinicaldocument-otherConfidentiality"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="sd"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-otherConfidentiality"/> - <version value="4.1.0"/> - <name value="otherConfidentiality"/> - <status value="draft"/> - <date value="2015-03-17"/> - <publisher value="Health Level Seven, Inc. - Structured Documents WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/structure"/> - </telecom> - </contact> - <description value="Carries additional confidentiality codes beyond the base fixed code specified in the CDA document."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Composition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional confidentiality codes"/> - <definition value="Carries additional confidentiality codes beyond the base fixed code specified in the CDA document."/> - <comment value="Typically, this is used where an institution has their own set of confidentiality codes that have different granularity that the base CDA codes, or for legacy reasons. For security-related codes other than confidentiality, see [[security-labels-html]]."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-otherConfidentiality"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Coding"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Additional confidentiality codes"/> - <definition value="Carries additional confidentiality codes beyond the base fixed code specified in the CDA document."/> - <comment value="Typically, this is used where an institution has their own set of confidentiality codes that have different granularity that the base CDA codes, or for legacy reasons. For security-related codes other than confidentiality, see [[security-labels-html]]."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-otherConfidentiality"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Coding"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-relatedPerson"/> - <resource> - <StructureDefinition> - <id value="patient-relatedPerson"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-relatedPerson"/> - <version value="4.1.0"/> - <name value="relatedPerson"/> - <title value="relatedPerson"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="In some cases a Patient.contact will also be populated as a RelatedPerson resource. This linkage permits the linkage between the 2 resources to be able to accurately indicate a representation of the same individual, and updating details between could be appropriate."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient.contact"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="This contact may have further details in this RelatedPerson"/> - <definition value="In some cases a Patient.contact will also be populated as a RelatedPerson resource. This linkage permits the linkage between the 2 resources to be able to accurately indicate a representation of the same individual, and updating details between could be appropriate."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-relatedPerson"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="This contact may have further details in this RelatedPerson"/> - <definition value="In some cases a Patient.contact will also be populated as a RelatedPerson resource. This linkage permits the linkage between the 2 resources to be able to accurately indicate a representation of the same individual, and updating details between could be appropriate."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-relatedPerson"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/patient-religion"/> - <resource> - <StructureDefinition> - <id value="patient-religion"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pa"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/patient-religion"/> - <version value="4.1.0"/> - <name value="religion"/> - <title value="religion"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="The patient's professed religious affiliations."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Patient"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="The patient's professed religious affiliations"/> - <definition value="The patient's professed religious affiliations."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-religion"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="CodeableConcept"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Religion"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-ReligiousAffiliation"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="The patient's professed religious affiliations"/> - <definition value="The patient's professed religious affiliations."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/patient-religion"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="CodeableConcept"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Religion"/> - </extension> - <strength value="extensible"/> - <valueSet value="http://terminology.hl7.org/ValueSet/v3-ReligiousAffiliation"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-risk"/> - <resource> - <StructureDefinition> - <id value="diagnosticReport-risk"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="oo"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-risk"/> - <version value="4.1.0"/> - <name value="risk"/> - <title value="Risk"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="Provides a link to an assessment of prognosis or risk as informed by the diagnostic results (For example, genetic results and possibly by patient genetic family history information). This extension is used when need RiskAssessment as an alternate choice for `Observation.hasMember` or `DiagnosticReport.result`."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Risk"/> - <definition value="Provides a link to an assessment of prognosis or risk as informed by the diagnostic results (For example, genetic results and possibly by patient genetic family history information). This extension is used when need RiskAssessment as an alternate choice for `Observation.hasMember` or `DiagnosticReport.result`."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-risk"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RiskAssessment"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Risk"/> - <definition value="Provides a link to an assessment of prognosis or risk as informed by the diagnostic results (For example, genetic results and possibly by patient genetic family history information). This extension is used when need RiskAssessment as an alternate choice for `Observation.hasMember` or `DiagnosticReport.result`."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-risk"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RiskAssessment"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-author"/> - <resource> - <StructureDefinition> - <id value="codesystem-author"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-author"/> - <version value="4.1.0"/> - <name value="author"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="User or Org actually involved in creating the value set content."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="User or Org actually involved in creating the value set content"/> - <definition value="User or Org actually involved in creating the value set content."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-author"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="User or Org actually involved in creating the value set content"/> - <definition value="User or Org actually involved in creating the value set content."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-author"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesUri"/> - <resource> - <StructureDefinition> - <id value="workflow-instantiatesUri"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesUri"/> - <version value="4.1.0"/> - <name value="instantiatesUri"/> - <title value="Definition"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="workflow"/> - <uri value="http://hl7.org/fhir/workflow"/> - <name value="Workflow Pattern"/> - </mapping> - <mapping> - <identity value="v2"/> - <uri value="http://hl7.org/v2"/> - <name value="HL7 v2 Mapping"/> - </mapping> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="DocumentReference"/> - </context> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyDelivery"/> - </context> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <context> - <type value="element"/> - <expression value="SupplyRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="External protocol or definition"/> - <definition value="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <comment value="This may be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - <mapping> - <identity value="workflow"/> - <map value="Event.instantiates"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=DEFN].target"/> - </mapping> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesUri"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="External protocol or definition"/> - <definition value="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by the event or request resource."/> - <comment value="This may be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier."/> - <min value="0"/> - <max value="*"/> - <mapping> - <identity value="workflow"/> - <map value="Event.instantiates"/> - </mapping> - <mapping> - <identity value="v2"/> - <map value="Varies by domain"/> - </mapping> - <mapping> - <identity value="rim"/> - <map value=".outboundRelationship[typeCode=DEFN].target"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-instantiatesUri"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="uri"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/list-changeBase"/> - <resource> - <StructureDefinition> - <id value="list-changeBase"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/list-changeBase"/> - <version value="4.1.0"/> - <name value="changeBase"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Reference to the List that a "change" list is asserting changes with respect to."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="List"/> - </context> - <contextInvariant value="mode = 'changes'"/> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Base List for changes"/> - <definition value="Reference to the List that a "change" list is asserting changes with respect to."/> - <comment value="Only for mode = changes."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/list-changeBase"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/List"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Base List for changes"/> - <definition value="Reference to the List that a "change" list is asserting changes with respect to."/> - <comment value="Only for mode = changes."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/list-changeBase"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/List"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/condition-assertedDate"/> - <resource> - <StructureDefinition> - <id value="condition-assertedDate"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="pc"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/condition-assertedDate"/> - <version value="4.1.0"/> - <name value="assertedDate"/> - <title value="assertedDate"/> - <status value="draft"/> - <date value="2015-02-21"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="HL7"/> - </telecom> - </contact> - <description value="The date on which the existence of the Condition was first asserted or acknowledged."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="Condition"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Date the condition was first asserted"/> - <definition value="The date on which the existence of the Condition was first asserted or acknowledged."/> - <comment value="The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-assertedDate"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Date the condition was first asserted"/> - <definition value="The date on which the existence of the Condition was first asserted or acknowledged."/> - <comment value="The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate."/> - <min value="0"/> - <max value="1"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/condition-assertedDate"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/codesystem-history"/> - <resource> - <StructureDefinition> - <id value="codesystem-history"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/codesystem-history"/> - <version value="4.1.0"/> - <name value="history"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Information on changes made to the Value Set Definition over time, and also has a contained audit trail of all such changes."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="CodeSystem"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="What has happened over time"/> - <definition value="Information on changes made to the Value Set Definition over time, and also has a contained audit trail of all such changes."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Additional content defined by implementations"/> - <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> - <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/> - <alias value="extensions"/> - <alias value="user content"/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="The name of this set of history entries"/> - <definition value="Label for a set of entries, such as a version."/> - <comment value="Typically, a value set will have a set of history entries for each major publication milestone."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision"> - <path value="Extension.extension"/> - <sliceName value="revision"/> - <short value="Audit of all changes for a history entry"/> - <definition value="A list of specific changes, who made them and when."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.id"> - <path value="Extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension"> - <path value="Extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:date"> - <path value="Extension.extension.extension"/> - <sliceName value="date"/> - <short value="Date the change was made"/> - <definition value="Date the change took place."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:date.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:date.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:date.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="date"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:date.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="dateTime"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:id"> - <path value="Extension.extension.extension"/> - <sliceName value="id"/> - <short value="Version marker after the change was made"/> - <definition value="Unique id for the specific change."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:id.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:id.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:id.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="id"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:id.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:author"> - <path value="Extension.extension.extension"/> - <sliceName value="author"/> - <short value="Who made the change"/> - <definition value="Person or device responsible for the change."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:author.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:author.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:author.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="author"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:author.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:notes"> - <path value="Extension.extension.extension"/> - <sliceName value="notes"/> - <short value="Information about the change"/> - <definition value="Description of exactly what was changed and how."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:notes.id"> - <path value="Extension.extension.extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:notes.extension"> - <path value="Extension.extension.extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.extension:revision.extension:notes.url"> - <path value="Extension.extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="notes"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.extension:notes.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="string"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.url"> - <path value="Extension.extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <code value="uri"/> - </type> - <fixedUri value="revision"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.extension:revision.value[x]"> - <path value="Extension.extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-history"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="base64Binary"/> - </type> - <type> - <code value="boolean"/> - </type> - <type> - <code value="canonical"/> - </type> - <type> - <code value="code"/> - </type> - <type> - <code value="date"/> - </type> - <type> - <code value="dateTime"/> - </type> - <type> - <code value="decimal"/> - </type> - <type> - <code value="id"/> - </type> - <type> - <code value="instant"/> - </type> - <type> - <code value="integer"/> - </type> - <type> - <code value="markdown"/> - </type> - <type> - <code value="oid"/> - </type> - <type> - <code value="positiveInt"/> - </type> - <type> - <code value="string"/> - </type> - <type> - <code value="time"/> - </type> - <type> - <code value="unsignedInt"/> - </type> - <type> - <code value="uri"/> - </type> - <type> - <code value="url"/> - </type> - <type> - <code value="uuid"/> - </type> - <type> - <code value="Address"/> - </type> - <type> - <code value="Age"/> - </type> - <type> - <code value="Annotation"/> - </type> - <type> - <code value="Attachment"/> - </type> - <type> - <code value="CodeableConcept"/> - </type> - <type> - <code value="Coding"/> - </type> - <type> - <code value="ContactPoint"/> - </type> - <type> - <code value="Count"/> - </type> - <type> - <code value="Distance"/> - </type> - <type> - <code value="Duration"/> - </type> - <type> - <code value="HumanName"/> - </type> - <type> - <code value="Identifier"/> - </type> - <type> - <code value="Money"/> - </type> - <type> - <code value="Period"/> - </type> - <type> - <code value="Quantity"/> - </type> - <type> - <code value="Range"/> - </type> - <type> - <code value="Ratio"/> - </type> - <type> - <code value="Reference"/> - </type> - <type> - <code value="SampledData"/> - </type> - <type> - <code value="Signature"/> - </type> - <type> - <code value="Timing"/> - </type> - <type> - <code value="ContactDetail"/> - </type> - <type> - <code value="Contributor"/> - </type> - <type> - <code value="DataRequirement"/> - </type> - <type> - <code value="Expression"/> - </type> - <type> - <code value="ParameterDefinition"/> - </type> - <type> - <code value="RelatedArtifact"/> - </type> - <type> - <code value="TriggerDefinition"/> - </type> - <type> - <code value="UsageContext"/> - </type> - <type> - <code value="Dosage"/> - </type> - <type> - <code value="Meta"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="What has happened over time"/> - <definition value="Information on changes made to the Value Set Definition over time, and also has a contained audit trail of all such changes."/> - <min value="0"/> - <max value="*"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name"> - <path value="Extension.extension"/> - <sliceName value="name"/> - <short value="The name of this set of history entries"/> - <definition value="Label for a set of entries, such as a version."/> - <comment value="Typically, a value set will have a set of history entries for each major publication milestone."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:name.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:name.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="name"/> - </element> - <element id="Extension.extension:name.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:revision"> - <path value="Extension.extension"/> - <sliceName value="revision"/> - <short value="Audit of all changes for a history entry"/> - <definition value="A list of specific changes, who made them and when."/> - <min value="0"/> - <max value="*"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:revision.extension"> - <path value="Extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:revision.extension:date"> - <path value="Extension.extension.extension"/> - <sliceName value="date"/> - <short value="Date the change was made"/> - <definition value="Date the change took place."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:revision.extension:date.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:revision.extension:date.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="date"/> - </element> - <element id="Extension.extension:revision.extension:date.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="dateTime"/> - </type> - </element> - <element id="Extension.extension:revision.extension:id"> - <path value="Extension.extension.extension"/> - <sliceName value="id"/> - <short value="Version marker after the change was made"/> - <definition value="Unique id for the specific change."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:revision.extension:id.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:revision.extension:id.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="id"/> - </element> - <element id="Extension.extension:revision.extension:id.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:revision.extension:author"> - <path value="Extension.extension.extension"/> - <sliceName value="author"/> - <short value="Who made the change"/> - <definition value="Person or device responsible for the change."/> - <min value="1"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:revision.extension:author.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:revision.extension:author.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="author"/> - </element> - <element id="Extension.extension:revision.extension:author.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:revision.extension:notes"> - <path value="Extension.extension.extension"/> - <sliceName value="notes"/> - <short value="Information about the change"/> - <definition value="Description of exactly what was changed and how."/> - <min value="0"/> - <max value="1"/> - <type> - <code value="Extension"/> - </type> - <isModifier value="false"/> - </element> - <element id="Extension.extension:revision.extension:notes.extension"> - <path value="Extension.extension.extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.extension:revision.extension:notes.url"> - <path value="Extension.extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="notes"/> - </element> - <element id="Extension.extension:revision.extension:notes.value[x]"> - <path value="Extension.extension.extension.value[x]"/> - <min value="1"/> - <type> - <code value="string"/> - </type> - </element> - <element id="Extension.extension:revision.url"> - <path value="Extension.extension.url"/> - <type> - <code value="uri"/> - </type> - <fixedUri value="revision"/> - </element> - <element id="Extension.extension:revision.value[x]"> - <path value="Extension.extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/codesystem-history"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="0"/> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/workflow-supportingInfo"/> - <resource> - <StructureDefinition> - <id value="workflow-supportingInfo"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="fhir"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/workflow-supportingInfo"/> - <version value="4.1.0"/> - <name value="supportingInfo"/> - <title value="Supporting Information"/> - <status value="draft"/> - <date value="2017-12-06"/> - <publisher value="Health Level Seven, Inc. - FHIR WG"/> - <contact> - <telecom> - <system value="url"/> - <value value="http://hl7.org/special/committees/fwg"/> - </telecom> - </contact> - <description value="Other resources *from the patient record* that may be relevant to the event. The information from these resources was either used to create the instance or is provided to help with its interpretation. This extension **should not** be used if more specific inline elements or extensions are available. For example, use `Observation.hasMember` instead of supportingInformation for representing the members of an Observation panel."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="DiagnosticReport"/> - </context> - <context> - <type value="element"/> - <expression value="Observation"/> - </context> - <context> - <type value="element"/> - <expression value="CommunicationRequest"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Other information that may be relevant to this event."/> - <definition value="Other resources *from the patient record* that may be relevant to the event. The information from these resources was either used to create the instance or is provided to help with its interpretation. This extension **should not** be used if more specific inline elements or extensions are available. For example, use `Observation.hasMember` instead of supportingInformation for representing the members of an Observation panel."/> - <min value="0"/> - <max value="*"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-supportingInfo"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Other information that may be relevant to this event."/> - <definition value="Other resources *from the patient record* that may be relevant to the event. The information from these resources was either used to create the instance or is provided to help with its interpretation. This extension **should not** be used if more specific inline elements or extensions are available. For example, use `Observation.hasMember` instead of supportingInformation for representing the members of an Observation panel."/> - <min value="0"/> - <max value="*"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-supportingInfo"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="Reference"/> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/> - </type> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> - <entry> - <fullUrl value="http://hl7.org/fhir/StructureDefinition/valueset-parameterSource"/> - <resource> - <StructureDefinition> - <id value="valueset-parameterSource"/> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> - <valueCode value="vocab"/> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> - <valueInteger value="1"/> - </extension> - <url value="http://hl7.org/fhir/StructureDefinition/valueset-parameterSource"/> - <version value="4.1.0"/> - <name value="parameterSource"/> - <status value="draft"/> - <date value="2019-11-09T18:02:45+00:00"/> - <publisher value="HL7"/> - <description value="Declares what the source of this parameter is."/> - <fhirVersion value="4.1.0"/> - <mapping> - <identity value="rim"/> - <uri value="http://hl7.org/v3"/> - <name value="RIM Mapping"/> - </mapping> - <kind value="complex-type"/> - <abstract value="false"/> - <context> - <type value="element"/> - <expression value="ValueSet.expansion.parameter"/> - </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> - <snapshot> - <element id="Extension"> - <path value="Extension"/> - <short value="Declares the source of the parameter"/> - <definition value="Declares what the source of this parameter is."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Extension"/> - <min value="0"/> - <max value="*"/> - </base> - <condition value="ele-1"/> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/> - <source value="http://hl7.org/fhir/StructureDefinition/Extension"/> - </constraint> - <isModifier value="false"/> - </element> - <element id="Extension.id"> - <path value="Extension.id"/> - <representation value="xmlAttr"/> - <short value="Unique id for inter-element referencing"/> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> - <min value="0"/> - <max value="1"/> - <base> - <path value="Element.id"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="string"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="n/a"/> - </mapping> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <slicing> - <discriminator> - <type value="value"/> - <path value="url"/> - </discriminator> - <description value="Extensions are always sliced by (at least) url"/> - <rules value="open"/> - </slicing> - <short value="Extension"/> - <definition value="An Extension"/> - <min value="0"/> - <max value="0"/> - <base> - <path value="Element.extension"/> - <min value="0"/> - <max value="*"/> - </base> - <type> - <code value="Extension"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <constraint> - <key value="ext-1"/> - <severity value="error"/> - <human value="Must have either extensions or value[x], not both"/> - <expression value="extension.exists() != value.exists()"/> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])"/> - <source value="Extension"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <representation value="xmlAttr"/> - <short value="identifies the meaning of the extension"/> - <definition value="Source of the definition for the extension code - a logical name or a URL."/> - <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.url"/> - <min value="1"/> - <max value="1"/> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUri value="uri"/> - </extension> - <code value="http://hl7.org/fhirpath/System.String"/> - </type> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-parameterSource"/> - <isModifier value="false"/> - <isSummary value="false"/> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Value of extension"/> - <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."/> - <min value="1"/> - <max value="1"/> - <base> - <path value="Extension.value[x]"/> - <min value="0"/> - <max value="1"/> - </base> - <type> - <code value="code"/> - </type> - <constraint> - <key value="ele-1"/> - <severity value="error"/> - <human value="All FHIR elements must have a @value or children"/> - <expression value="hasValue() or (children().count() > id.count())"/> - <xpath value="@value|f:*|h:div"/> - <source value="Element"/> - </constraint> - <isModifier value="false"/> - <isSummary value="false"/> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ExpansionParameterSource"/> - </extension> - <strength value="required"/> - <description value="Declares what the source of a parameter is."/> - <valueSet value="http://hl7.org/fhir/ValueSet/expansion-parameter-source|4.1.0"/> - </binding> - <mapping> - <identity value="rim"/> - <map value="N/A"/> - </mapping> - </element> - </snapshot> - <differential> - <element id="Extension"> - <path value="Extension"/> - <short value="Declares the source of the parameter"/> - <definition value="Declares what the source of this parameter is."/> - <min value="0"/> - <max value="1"/> - <isModifier value="false"/> - </element> - <element id="Extension.extension"> - <path value="Extension.extension"/> - <max value="0"/> - </element> - <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="http://hl7.org/fhir/StructureDefinition/valueset-parameterSource"/> - </element> - <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <min value="1"/> - <type> - <code value="code"/> - </type> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ExpansionParameterSource"/> - </extension> - <strength value="required"/> - <description value="Declares what the source of a parameter is."/> - <valueSet value="http://hl7.org/fhir/ValueSet/expansion-parameter-source|4.1.0"/> - </binding> - </element> - </differential> - </StructureDefinition> - </resource> - </entry> -</Bundle> \ No newline at end of file + <id value="extensions"></id> + <meta> + <lastUpdated value="2020-01-04T07:45:11.521+00:00"></lastUpdated> + </meta> + <type value="collection"></type> + <entry> + <fullUrl value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"></fullUrl> + <resource> + <StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="data-absent-reason"></id> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"> + <valueCode value="fhir"></valueCode> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> + <valueInteger value="1"></valueInteger> + </extension> + <url value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"></url> + <version value="4.2.0"></version> + <name value="Data Absent Reason"></name> + <title value="Why value is missing"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-others.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-others.xml index f77e3347a9b..557e8e1900d 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-others.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-others.xml @@ -1,7 +1,7 @@ - + @@ -19,14 +19,14 @@ - + - + - + @@ -65,53 +65,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -128,10 +82,6 @@ - - - - @@ -151,7 +101,7 @@ - + @@ -522,7 +472,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -625,7 +575,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -1583,7 +1533,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -1677,7 +1627,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -1862,7 +1812,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2081,7 +2031,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2292,7 +2242,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2503,7 +2453,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2815,7 +2765,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2828,7 +2778,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2962,7 +2912,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3177,7 +3127,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -3519,7 +3468,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3574,7 +3523,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3671,7 +3620,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4268,19 +4217,20 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + @@ -4309,54 +4259,24 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - + + + + + @@ -4378,7 +4298,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4393,52 +4313,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4753,14 +4627,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -4877,7 +4751,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5228,7 +5102,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5456,7 +5330,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5740,7 +5614,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5962,14 +5836,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -6086,7 +5960,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6437,7 +6311,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6665,7 +6539,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6949,7 +6823,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7171,7 +7045,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7184,7 +7058,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7317,7 +7191,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7533,7 +7407,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7574,7 +7447,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7611,7 +7483,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7822,7 +7693,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8202,20 +8073,26 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + + + + @@ -8237,7 +8114,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8248,49 +8125,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8368,7 +8202,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8673,7 +8507,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -9014,14 +8848,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -9060,65 +8894,15 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9142,7 +8926,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -9525,7 +9309,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -9636,7 +9420,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -10437,7 +10221,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -10540,7 +10324,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -10573,7 +10357,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -10724,7 +10508,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -10850,7 +10634,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -11191,7 +10975,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -11455,14 +11239,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -11566,7 +11350,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12031,7 +11815,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12075,7 +11859,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12118,7 +11902,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12308,52 +12092,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -12371,7 +12122,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12454,7 +12205,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12683,7 +12434,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12790,7 +12541,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12917,7 +12668,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12985,7 +12736,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13136,7 +12887,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13315,7 +13066,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13349,7 +13100,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13382,7 +13133,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13415,7 +13166,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13448,7 +13199,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13599,7 +13350,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13612,7 +13363,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13738,7 +13489,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -14365,7 +14116,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -14699,7 +14450,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15028,7 +14779,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15154,7 +14905,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15392,7 +15143,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15405,7 +15156,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15452,53 +15203,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -15515,10 +15220,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -15542,7 +15243,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -15758,7 +15459,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -15957,7 +15657,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -16077,7 +15777,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -16165,7 +15865,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -16760,7 +16460,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -16899,7 +16599,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding)."> - + @@ -17060,7 +16760,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -17120,7 +16820,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -17276,7 +16976,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -17381,7 +17081,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -17603,7 +17303,7 @@ The value may come from the ElementDefinition referred to by .definition."> - + @@ -17831,7 +17531,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -18068,14 +17768,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -18114,53 +17814,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -18170,8 +17824,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -18192,7 +17846,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -18566,7 +18220,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -18643,7 +18297,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -19052,7 +18706,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -19274,7 +18928,7 @@ The Value Set Definition specification defines an ActiveOnly element, which is t - + @@ -19480,7 +19134,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -19676,7 +19330,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -19916,7 +19570,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20072,7 +19726,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20238,7 +19892,7 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + @@ -20479,7 +20133,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20683,7 +20337,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20889,7 +20543,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21207,7 +20861,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21487,7 +21141,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21501,7 +21155,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21544,53 +21198,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -21599,10 +21207,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -21622,7 +21226,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21992,7 +21596,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -22120,7 +21724,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -22701,7 +22305,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -22769,7 +22373,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -23135,7 +22739,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23387,14 +22991,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -23433,7 +23037,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23448,57 +23052,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -23519,7 +23077,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23889,7 +23447,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -23966,7 +23524,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -24388,7 +23946,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -24476,7 +24034,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -24572,7 +24130,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -24748,7 +24306,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24818,7 +24376,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25019,7 +24577,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25065,7 +24623,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25277,7 +24835,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25514,7 +25072,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25836,14 +25394,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -25947,7 +25505,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26162,7 +25720,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -26386,7 +25943,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26541,52 +26098,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -26604,7 +26128,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26814,7 +26338,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26827,7 +26351,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26979,7 +26503,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -27391,7 +26915,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -27561,7 +27085,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -27675,7 +27199,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -28300,7 +27824,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -28744,7 +28268,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29315,7 +28839,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -29328,7 +28852,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -29480,7 +29004,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -29696,7 +29220,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29731,7 +29254,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29775,7 +29297,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29810,7 +29331,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29853,7 +29373,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29888,7 +29407,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29924,7 +29442,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -29967,7 +29484,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -30002,7 +29518,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -30037,7 +29552,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -30268,7 +29782,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -30438,7 +29952,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -31130,7 +30644,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -31578,7 +31092,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32132,7 +31646,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -32146,7 +31660,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -32305,7 +31819,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -32715,7 +32229,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33369,7 +32883,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34068,7 +33582,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -34524,7 +34038,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34744,7 +34258,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34929,7 +34443,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -35131,7 +34645,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -35166,7 +34680,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -35180,7 +34694,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -35340,7 +34854,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -35750,7 +35264,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -36881,7 +36395,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -37378,7 +36892,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -37497,7 +37011,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -37881,7 +37395,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -38337,7 +37851,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -38557,7 +38071,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -38812,7 +38326,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -38837,7 +38351,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -38851,7 +38365,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -39011,7 +38525,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -39421,7 +38935,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -40553,7 +40067,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41252,7 +40766,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -41709,7 +41223,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41929,7 +41443,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -42164,7 +41678,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -42178,7 +41692,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -42338,7 +41852,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -42748,7 +42262,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43879,7 +43393,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -44376,7 +43890,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -44495,7 +44009,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -44879,7 +44393,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -45335,7 +44849,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -45555,7 +45069,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -45810,7 +45324,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -45835,7 +45349,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -45849,7 +45363,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -46009,7 +45523,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -46419,7 +45933,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -47550,7 +47064,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -48047,7 +47561,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -48543,7 +48057,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -48999,7 +48513,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49219,7 +48733,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49492,7 +49006,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -49506,7 +49020,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -49666,7 +49180,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -50076,7 +49590,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -51207,7 +50721,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -51704,7 +51218,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52200,7 +51714,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -52656,7 +52170,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52876,7 +52390,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53149,7 +52663,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -53163,7 +52677,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -53323,7 +52837,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -53733,7 +53247,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54864,7 +54378,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55361,7 +54875,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55480,7 +54994,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55864,7 +55378,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -56320,7 +55834,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -56540,7 +56054,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -56795,7 +56309,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -56820,7 +56334,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -56834,7 +56348,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -56994,7 +56508,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -57404,7 +56918,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58535,7 +58049,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59032,7 +58546,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59151,7 +58665,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59535,7 +59049,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -59991,7 +59505,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -60211,7 +59725,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -60466,7 +59980,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -60503,7 +60017,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -60517,7 +60031,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -60677,7 +60191,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -61087,7 +60601,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -62218,7 +61732,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -62715,7 +62229,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -63211,7 +62725,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -63667,7 +63181,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -63887,7 +63401,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -64160,7 +63674,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -64174,7 +63688,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -64334,7 +63848,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -64744,7 +64258,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -65875,7 +65389,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66136,7 +65650,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - *Attachment* is used if the observation result value is a binary file such as an image. If the observation result value is derived from the binary file (for example 'X' detected and here is the the proof in this image), the binary file may be directly represented using *DocumentReference* and referenced by `derivedFrom`. - For additional guidance, see the [Notes section](http://hl7.org/fhir/observation.html#notes) below."> - + @@ -66372,7 +65886,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66868,7 +66382,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -67324,7 +66838,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -67544,7 +67058,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -67819,7 +67333,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -67833,7 +67347,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -67993,7 +67507,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -68403,7 +67917,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -69534,7 +69048,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -70262,7 +69776,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -70731,7 +70245,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -70951,7 +70465,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -71162,7 +70676,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -71827,7 +71341,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -71988,7 +71502,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -72303,7 +71817,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -72966,7 +72480,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -73127,7 +72641,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -73680,14 +73194,14 @@ The alternate way is to use the value element for actual observations and use th - + - + - + @@ -73726,53 +73240,7 @@ The alternate way is to use the value element for actual observations and use th - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -73782,8 +73250,8 @@ The alternate way is to use the value element for actual observations and use th - - + + @@ -73804,7 +73272,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -74187,7 +73655,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -74298,7 +73766,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -75270,14 +74738,14 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + - + @@ -75316,53 +74784,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -75372,8 +74794,8 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - + + @@ -75394,7 +74816,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -75776,7 +75198,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -75886,7 +75308,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -76811,7 +76233,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -76824,7 +76246,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -76948,7 +76370,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -77313,7 +76735,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -78089,7 +77511,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -78495,7 +77917,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -78508,7 +77930,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -78660,7 +78082,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79070,7 +78492,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79248,7 +78670,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79740,7 +79162,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -80239,7 +79661,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -80389,7 +79811,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -80710,7 +80131,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -81255,7 +80676,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -81268,7 +80689,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -81420,7 +80841,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -81830,7 +81251,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82008,7 +81429,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82732,7 +82153,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -83182,7 +82603,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -83672,7 +83093,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -83685,7 +83106,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -83837,7 +83258,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -84247,7 +83668,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -84425,7 +83846,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -85149,7 +84570,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -85264,7 +84685,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -85621,7 +85041,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86118,7 +85538,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -86131,7 +85551,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -86283,7 +85703,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -86693,7 +86113,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86793,7 +86213,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86864,7 +86284,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87588,7 +87008,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -87738,7 +87158,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -88059,7 +87478,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88443,7 +87862,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -88557,7 +87976,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -88570,7 +87989,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -88694,7 +88113,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -88909,7 +88328,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -88952,7 +88370,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -88987,7 +88404,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -89022,7 +88438,6 @@ The alternate way is to use the value element for actual observations and use th - @@ -89208,7 +88623,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -89780,7 +89195,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90130,7 +89545,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90143,7 +89558,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90267,7 +89682,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90482,7 +89897,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -90517,7 +89931,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -90552,7 +89965,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -90587,7 +89999,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -90773,7 +90184,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91345,7 +90756,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91687,7 +91098,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91702,7 +91113,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91829,7 +91240,7 @@ The base Composition is a general resource for compositions or documents about a - + @@ -92045,7 +91456,6 @@ The base Composition is a general resource for compositions or documents about a - @@ -92189,7 +91599,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -92657,7 +92067,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -92784,7 +92194,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -92964,7 +92374,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -93091,7 +92501,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -93200,7 +92610,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -93477,7 +92887,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -93798,7 +93208,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -94017,7 +93427,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -94030,7 +93440,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -94157,7 +93567,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -94372,7 +93782,6 @@ If the section has content (instead of sub-sections), the section.code does not - @@ -94516,7 +93925,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -94985,7 +94394,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -95112,7 +94521,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -95292,7 +94701,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -95419,7 +94828,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -95528,7 +94937,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -95807,7 +95216,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -96128,7 +95537,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -96409,14 +95818,14 @@ If the section has content (instead of sub-sections), the section.code does not - + - + - + @@ -96455,53 +95864,7 @@ If the section has content (instead of sub-sections), the section.code does not - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -96510,10 +95873,6 @@ If the section has content (instead of sub-sections), the section.code does not - - - - @@ -96533,7 +95892,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -96904,7 +96263,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97040,7 +96399,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97786,7 +97145,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -98112,7 +97471,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98341,7 +97700,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98579,7 +97938,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98794,7 +98153,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -98921,7 +98280,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99040,7 +98399,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99191,7 +98550,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99301,7 +98660,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99427,7 +98786,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99526,7 +98885,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99559,7 +98918,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99592,7 +98951,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99625,7 +98984,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99658,7 +99017,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99764,7 +99123,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -100047,14 +99406,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -100093,53 +99452,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -100148,10 +99461,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -100171,7 +99480,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -100541,7 +99850,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -100676,7 +99985,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -101412,7 +100721,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -101738,7 +101047,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -101967,7 +101276,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102205,7 +101514,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102420,7 +101729,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -102547,7 +101856,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102666,7 +101975,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102817,7 +102126,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102927,7 +102236,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103053,7 +102362,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103152,7 +102461,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103185,7 +102494,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103218,7 +102527,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103251,7 +102560,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103284,7 +102593,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103390,7 +102699,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103600,14 +102909,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -103646,53 +102955,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -103701,10 +102964,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -103724,7 +102983,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103939,7 +103198,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -104130,7 +103388,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -104265,7 +103523,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -105001,7 +104259,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -105327,7 +104585,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -105556,7 +104814,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -105797,7 +105055,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106014,7 +105272,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -106141,7 +105399,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106260,7 +105518,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106411,7 +105669,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106523,7 +105781,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106649,7 +105907,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106749,7 +106007,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106783,7 +106041,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106816,7 +106074,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106849,7 +106107,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106882,7 +106140,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -106989,7 +106247,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107242,7 +106500,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107255,7 +106513,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107611,7 +106869,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107710,7 +106968,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -108146,7 +107404,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -108287,7 +107545,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -108861,7 +108119,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -109122,7 +108380,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -109164,7 +108422,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -109216,6 +108474,9 @@ This element should only be used on child elements of complex data elements."> + + + @@ -109459,6 +108720,9 @@ This element should only be used on child elements of complex data elements."> + + + @@ -109653,6 +108917,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -109967,6 +109234,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -110140,6 +109410,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -110194,6 +109467,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -110490,7 +109766,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -110925,7 +110201,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -111195,7 +110471,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -111369,7 +110645,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -111382,7 +110658,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -111510,7 +110786,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -111886,7 +111162,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -111932,7 +111208,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -112068,7 +111344,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -112250,7 +111526,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -112831,7 +112107,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113003,7 +112279,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113122,7 +112398,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113421,7 +112697,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113910,7 +113186,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114208,7 +113484,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114221,7 +113497,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114347,7 +113623,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114970,7 +114246,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -115293,7 +114569,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -115419,7 +114695,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-resources.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-resources.xml index eed1d3da297..75fb10e8647 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-resources.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-resources.xml @@ -1,7 +1,7 @@ - + @@ -10,14 +10,14 @@ - + - + - + @@ -30,7 +30,7 @@ - + @@ -393,6 +393,12 @@ + + + + + + @@ -523,7 +529,7 @@ - + @@ -777,7 +783,7 @@ - + @@ -801,7 +807,7 @@ - + @@ -1867,7 +1873,7 @@ - + @@ -1875,6 +1881,12 @@ + + + + + + @@ -1882,10 +1894,10 @@ - - - - + + + + @@ -2743,7 +2755,7 @@ - + @@ -2773,7 +2785,7 @@ - + @@ -3859,15 +3871,9 @@ - - - - - - @@ -4173,6 +4179,7 @@ + @@ -4203,12 +4210,24 @@ + + + + + + + + + + + + @@ -4315,6 +4334,7 @@ + @@ -5379,8 +5399,6 @@ - - @@ -5652,12 +5670,12 @@ - + + - @@ -5986,7 +6004,7 @@ - + @@ -6010,7 +6028,7 @@ - + @@ -8182,7 +8200,7 @@ - + @@ -8332,10 +8350,8 @@ - - @@ -9463,6 +9479,12 @@ Requires the near-distance parameter to be provided also"> + + + + + + @@ -10576,6 +10598,8 @@ Requires the near-distance parameter to be provided also"> + + @@ -10587,6 +10611,18 @@ Requires the near-distance parameter to be provided also"> + + + + + + + + + + + + @@ -10599,6 +10635,12 @@ Requires the near-distance parameter to be provided also"> + + + + + + @@ -11098,6 +11140,18 @@ Requires the near-distance parameter to be provided also"> + + + + + + + + + + + + @@ -11443,19 +11497,14 @@ Requires the near-distance parameter to be provided also"> - - - - - @@ -11727,6 +11776,7 @@ Requires the near-distance parameter to be provided also"> + @@ -12115,6 +12165,7 @@ Requires the near-distance parameter to be provided also"> + @@ -13708,6 +13759,7 @@ Requires the near-distance parameter to be provided also"> + @@ -13867,17 +13919,14 @@ Requires the near-distance parameter to be provided also"> - - - @@ -13931,7 +13980,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -13949,7 +13998,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -14297,6 +14346,7 @@ Requires the near-distance parameter to be provided also"> + @@ -17686,6 +17736,84 @@ Requires the near-distance parameter to be provided also"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17956,6 +18084,168 @@ Requires the near-distance parameter to be provided also"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18170,14 +18460,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -18190,7 +18480,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -18218,14 +18508,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -18716,14 +19006,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -19192,14 +19482,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -19743,14 +20033,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -20280,14 +20570,14 @@ Requires the near-distance parameter to be provided also"> - + - + - + @@ -20771,7 +21061,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -20780,11 +21070,11 @@ Requires the near-distance parameter to be provided also"> - + - + @@ -20904,7 +21194,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -20913,11 +21203,11 @@ Requires the near-distance parameter to be provided also"> - + - + @@ -20953,7 +21243,7 @@ Requires the near-distance parameter to be provided also"> - + @@ -20962,11 +21252,11 @@ Requires the near-distance parameter to be provided also"> - + - + @@ -21046,7 +21336,7 @@ If the capability statements can be successfully compared, then the return value - + @@ -21055,11 +21345,11 @@ If the capability statements can be successfully compared, then the return value - + - + @@ -21127,7 +21417,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21136,11 +21426,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21191,7 +21481,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21200,11 +21490,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21247,7 +21537,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21256,11 +21546,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21340,7 +21630,7 @@ If the capability statements can be successfully compared, then the return value - + @@ -21349,11 +21639,11 @@ If the capability statements can be successfully compared, then the return value - + - + @@ -21421,7 +21711,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21430,11 +21720,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21485,7 +21775,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21494,11 +21784,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21541,7 +21831,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21550,11 +21840,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21608,7 +21898,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21617,11 +21907,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21664,7 +21954,7 @@ If the capability statements match by these rules, then the return value is a 20 - + @@ -21673,11 +21963,11 @@ If the capability statements match by these rules, then the return value is a 20 - + - + @@ -21938,7 +22228,7 @@ The find-matches operation is still preliminary. The interface can be expected t - + @@ -21947,14 +22237,14 @@ The find-matches operation is still preliminary. The interface can be expected t - + - + - + @@ -22199,7 +22489,7 @@ When invoking this operation, a client SHALL provide both a system and a code, e - + @@ -22208,14 +22498,14 @@ When invoking this operation, a client SHALL provide both a system and a code, e - + - + - + @@ -22292,7 +22582,7 @@ When invoking this operation, a client SHALL provide both a and codes, either as - + @@ -22304,7 +22594,7 @@ When invoking this operation, a client SHALL provide both a and codes, either as - + @@ -22313,14 +22603,14 @@ When invoking this operation, a client SHALL provide both a and codes, either as - + - + - + @@ -22455,7 +22745,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -22464,11 +22754,11 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + - + @@ -22526,7 +22816,7 @@ Notes: - + @@ -22535,11 +22825,11 @@ Notes: - + - + @@ -22598,7 +22888,7 @@ Notes: - + @@ -22607,11 +22897,11 @@ Notes: - + - + @@ -22831,7 +23121,7 @@ The operation returns a set of parameters including a 'result' for whether there - + @@ -22840,11 +23130,11 @@ The operation returns a set of parameters including a 'result' for whether there - + - + @@ -22887,7 +23177,7 @@ The operation returns a set of parameters including a 'result' for whether there - + @@ -22896,11 +23186,11 @@ The operation returns a set of parameters including a 'result' for whether there - + - + @@ -22971,7 +23261,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -22980,11 +23270,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23071,7 +23361,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23080,11 +23370,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23128,7 +23418,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23137,11 +23427,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23185,7 +23475,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23194,11 +23484,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23267,7 +23557,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23276,11 +23566,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23375,7 +23665,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23384,11 +23674,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23440,7 +23730,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23449,11 +23739,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23548,7 +23838,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23557,11 +23847,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23605,7 +23895,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23614,11 +23904,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23679,7 +23969,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -23688,11 +23978,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -23791,7 +24081,7 @@ The following rules apply when using the $process-message operation asynchronous - + @@ -23800,11 +24090,11 @@ The following rules apply when using the $process-message operation asynchronous - + - + @@ -23848,7 +24138,7 @@ If the server wishes, it can also look through all code systems and value sets i - + @@ -23868,7 +24158,7 @@ If the server wishes, it can also look through all code systems and value sets i - + @@ -23877,11 +24167,11 @@ If the server wishes, it can also look through all code systems and value sets i - + - + @@ -23960,7 +24250,7 @@ The set of returned observations should represent distinct real world observatio - + @@ -23969,11 +24259,11 @@ The set of returned observations should represent distinct real world observatio - + - + @@ -24110,7 +24400,7 @@ The set of returned observations should represent distinct real world observatio - + @@ -24119,11 +24409,11 @@ The set of returned observations should represent distinct real world observatio - + - + @@ -24212,7 +24502,7 @@ The _since parameter is provided to support periodic queries to get additional i - + @@ -24221,11 +24511,11 @@ The _since parameter is provided to support periodic queries to get additional i - + - + @@ -24287,7 +24577,7 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + @@ -24296,11 +24586,11 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + - + @@ -24420,7 +24710,7 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + @@ -24429,11 +24719,11 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + - + @@ -24469,7 +24759,7 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + @@ -24478,11 +24768,11 @@ To ask an MPI to match a patient, clients use the "$match" operation, - + - + @@ -24540,7 +24830,7 @@ Implementers are encouraged to provide feedback to HL7 about their use of this o - + @@ -24549,11 +24839,11 @@ Implementers are encouraged to provide feedback to HL7 about their use of this o - + - + @@ -24596,7 +24886,7 @@ Implementers are encouraged to provide feedback to HL7 about their use of this o - + @@ -24605,11 +24895,11 @@ Implementers are encouraged to provide feedback to HL7 about their use of this o - + - + @@ -24653,7 +24943,7 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + @@ -24662,11 +24952,11 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + - + @@ -24706,7 +24996,7 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + @@ -24715,11 +25005,11 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + - + @@ -24762,7 +25052,7 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + @@ -24771,11 +25061,11 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + - + @@ -24818,7 +25108,7 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + @@ -24827,14 +25117,14 @@ For the purposes of graphQL compatibility, this operation can also be invoked us - + - + - + @@ -24885,7 +25175,7 @@ Future versions of this specifcation may add additional validation parameters. A - + @@ -24913,7 +25203,7 @@ Future versions of this specifcation may add additional validation parameters. A - + @@ -24922,11 +25212,11 @@ Future versions of this specifcation may add additional validation parameters. A - + - + @@ -25028,7 +25318,7 @@ Future versions of this specifcation may add additional validation parameters. A - + @@ -25037,11 +25327,11 @@ Future versions of this specifcation may add additional validation parameters. A - + - + @@ -25116,7 +25406,7 @@ This operation is intended to enable auto-generation of simple interfaces for ar - + @@ -25125,11 +25415,11 @@ This operation is intended to enable auto-generation of simple interfaces for ar - + - + @@ -25183,7 +25473,7 @@ If the operation is not called at the instance level, either *definition* or *ur - + @@ -25192,11 +25482,11 @@ If the operation is not called at the instance level, either *definition* or *ur - + - + @@ -25248,7 +25538,7 @@ If the operation is not called at the instance level, either *definition* or *ur - + @@ -25257,14 +25547,14 @@ If the operation is not called at the instance level, either *definition* or *ur - + - + - + @@ -25500,7 +25790,7 @@ Text Search engines such as Lucene or Solr, long with their considerable functio - + @@ -25509,14 +25799,14 @@ Text Search engines such as Lucene or Solr, long with their considerable functio - + - + - + @@ -25676,7 +25966,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -25691,10 +25981,10 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + - + @@ -25709,7 +25999,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -25718,6 +26008,8 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica + + @@ -25732,6 +26024,10 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica + + + + @@ -25752,7 +26048,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -25874,7 +26170,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -25940,7 +26236,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -25958,10 +26254,10 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + - + @@ -25976,7 +26272,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -26078,7 +26374,7 @@ Note that. 'abstract' is a property defined by many HL7 code systems that indica - + @@ -26385,7 +26681,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -26602,7 +26898,7 @@ Where the order is important, a local/jurisdictional extension may be defined to - + @@ -26867,7 +27163,7 @@ A coverage may only be responsible for specific types of charges, and the sequen - + @@ -27132,7 +27428,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -27413,7 +27709,7 @@ A coverage may only be responsible for specific types of charges, and the sequen - + @@ -27431,10 +27727,10 @@ A coverage may only be responsible for specific types of charges, and the sequen - + - + @@ -27449,7 +27745,7 @@ A coverage may only be responsible for specific types of charges, and the sequen - + @@ -27473,11 +27769,7 @@ A coverage may only be responsible for specific types of charges, and the sequen - - - - - + @@ -27492,64 +27784,14 @@ A coverage may only be responsible for specific types of charges, and the sequen - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -27574,7 +27816,7 @@ A coverage may only be responsible for specific types of charges, and the sequen - + @@ -27956,7 +28198,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -28066,7 +28308,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -28857,7 +29099,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -28960,7 +29202,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -28993,7 +29235,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -29145,7 +29387,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -29271,7 +29513,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29613,7 +29855,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29778,7 +30020,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29886,7 +30128,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -29945,7 +30187,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30415,7 +30657,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30474,7 +30716,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30492,7 +30734,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30586,7 +30828,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30803,7 +31045,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30821,10 +31063,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -30839,7 +31081,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -30931,7 +31173,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -31392,7 +31634,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -31618,7 +31860,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -31904,7 +32146,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32065,7 +32307,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32539,7 +32781,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32557,10 +32799,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -32575,7 +32817,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32681,7 +32923,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -32986,7 +33228,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33028,7 +33270,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33037,7 +33279,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33063,7 +33305,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33159,9 +33401,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - + + + @@ -33491,7 +33733,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33709,7 +33951,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -33881,7 +34123,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34112,7 +34354,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34291,7 +34533,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34468,7 +34710,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34644,7 +34886,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34859,7 +35101,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34888,7 +35130,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34897,7 +35139,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34909,7 +35151,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -34977,9 +35219,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - + + + @@ -35482,7 +35724,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -35500,10 +35742,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -35519,7 +35761,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -35642,7 +35884,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -35958,7 +36200,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36003,7 +36245,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36047,7 +36289,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36097,7 +36339,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36147,7 +36389,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36554,7 +36796,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -36828,7 +37070,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -36981,7 +37223,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37013,7 +37255,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37043,7 +37285,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37079,7 +37321,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37115,7 +37357,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37463,7 +37705,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37518,7 +37760,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37536,10 +37778,10 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + - + @@ -37554,7 +37796,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -37698,7 +37940,7 @@ The data type is CodeableConcept because clinicalStatus has some clinical judgme - + @@ -38019,7 +38261,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -38243,19 +38485,23 @@ This element is labeled as a modifier because the status contains the code enter - - - - + + + + - + - + + + + + @@ -38288,43 +38534,6 @@ This element is labeled as a modifier because the status contains the code enter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -38822,7 +39031,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -39042,7 +39251,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -39083,7 +39292,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -39261,7 +39470,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -39415,14 +39624,18 @@ This element is labeled as a modifier because the status contains the code enter - - - - + + + + - + + + + + @@ -39446,28 +39659,6 @@ This element is labeled as a modifier because the status contains the code enter - - - - - - - - - - - - - - - - - - - - - - @@ -39854,7 +40045,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -39881,7 +40072,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -39945,7 +40136,7 @@ The duration (usually in minutes) could also be provided to indicate the length - + @@ -39963,10 +40154,10 @@ The duration (usually in minutes) could also be provided to indicate the length - + - + @@ -39981,7 +40172,7 @@ The duration (usually in minutes) could also be provided to indicate the length - + @@ -40111,7 +40302,7 @@ The duration (usually in minutes) could also be provided to indicate the length - + @@ -40633,7 +40824,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -40895,7 +41086,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -40943,7 +41134,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -40961,10 +41152,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -40979,7 +41170,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41108,7 +41299,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41481,7 +41672,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41527,7 +41718,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41662,7 +41853,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -41843,7 +42034,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -42419,7 +42610,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -42589,7 +42780,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -42707,7 +42898,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43002,7 +43193,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43487,7 +43678,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43773,7 +43964,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43805,7 +43996,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -43897,7 +44088,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -44381,7 +44572,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -44895,7 +45086,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -44913,10 +45104,10 @@ For example, an activity may be initiated by one user for other users or involve - + - + @@ -44932,7 +45123,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -45035,7 +45226,7 @@ For example, an activity may be initiated by one user for other users or involve - + @@ -45618,7 +45809,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -45639,10 +45830,10 @@ This element is labeled as a modifier because it defines the meaning of the reso - + - + @@ -45658,7 +45849,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -45712,7 +45903,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -45844,7 +46035,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -45949,7 +46140,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -45999,7 +46190,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -46017,10 +46208,10 @@ This element is labeled as a modifier because it defines the meaning of the reso - + - + @@ -46036,7 +46227,7 @@ This element is labeled as a modifier because it defines the meaning of the reso - + @@ -46143,7 +46334,7 @@ into another (possibly the same) biological entity."> - + @@ -46452,7 +46643,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -46517,7 +46708,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -46638,7 +46829,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -46856,7 +47047,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -47104,7 +47295,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -47293,7 +47484,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -47469,7 +47660,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -47550,7 +47741,7 @@ into another (possibly the same) biological entity."> - + @@ -47585,7 +47776,7 @@ into another (possibly the same) biological entity."> - + @@ -47808,7 +47999,7 @@ into another (possibly the same) biological entity."> - + @@ -47831,7 +48022,7 @@ into another (possibly the same) biological entity."> - + @@ -47849,10 +48040,10 @@ into another (possibly the same) biological entity."> - + - + @@ -47867,7 +48058,7 @@ into another (possibly the same) biological entity."> - + @@ -47982,7 +48173,7 @@ into another (possibly the same) biological entity."> - + @@ -48817,7 +49008,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -48838,10 +49029,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -48856,7 +49047,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -48991,7 +49182,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49155,7 +49346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49278,7 +49469,7 @@ This specification defines some specific uses of Bundle.link for [searching](sea - + @@ -49479,7 +49670,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49686,7 +49877,7 @@ Note that the fullUrl is not the same as the canonical URL - it's an absolute ur - + @@ -49813,7 +50004,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -49885,7 +50076,7 @@ See [Patient Match](patient-operation-match.html) for the EMPI search which rela - + @@ -50011,7 +50202,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -50181,7 +50372,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -50550,7 +50741,7 @@ This outcome is not used for error responses in batch/transaction, only for hint - + @@ -50729,7 +50920,7 @@ Note that the fullUrl is not the same as the canonical URL - it's an absolute ur - + @@ -50774,7 +50965,7 @@ See [Patient Match](patient-operation-match.html) for the EMPI search which rela - + @@ -50926,36 +51117,33 @@ This outcome is not used for error responses in batch/transaction, only for hint - + - + - + + + + - + - - - - - - - - - + + + - + @@ -50969,13 +51157,8 @@ This outcome is not used for error responses in batch/transaction, only for hint - - - - - - - + + @@ -50991,84 +51174,35 @@ This outcome is not used for error responses in batch/transaction, only for hint + + + + + - - - - - - - + + + - - - - - - - + + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -51121,6 +51255,1280 @@ This outcome is not used for error responses in batch/transaction, only for hint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -51141,7 +52549,7 @@ This outcome is not used for error responses in batch/transaction, only for hint - + @@ -51472,7 +52880,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -51549,7 +52957,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -51907,7 +53315,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -52012,7 +53420,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -52226,7 +53634,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52435,7 +53843,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52472,7 +53880,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52509,7 +53917,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52587,7 +53995,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52713,7 +54121,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -52784,7 +54192,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53012,7 +54420,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53141,7 +54549,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53270,7 +54678,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53396,7 +54804,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53459,7 +54867,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53583,7 +54991,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53649,7 +55057,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53685,7 +55093,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53787,7 +55195,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -53970,7 +55378,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54041,7 +55449,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -54258,7 +55666,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54384,7 +55792,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54532,7 +55940,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54669,7 +56077,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -54915,7 +56323,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55041,7 +56449,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55114,7 +56522,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55240,7 +56648,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -55304,6 +56712,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + @@ -55353,13 +56768,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - @@ -55421,7 +56829,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -55462,7 +56870,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -55677,7 +57085,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -55829,7 +57237,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -55852,7 +57260,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -55875,7 +57283,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -55926,7 +57334,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56032,7 +57440,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56103,7 +57511,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56136,7 +57544,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56200,7 +57608,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56236,7 +57644,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56257,7 +57665,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56341,7 +57749,7 @@ A capability statement that imports another CapabilityStatement automatically in - + @@ -56431,7 +57839,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56579,7 +57987,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56625,7 +58033,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56661,7 +58069,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56679,10 +58087,10 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + - + @@ -56697,7 +58105,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56721,11 +58129,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - - - - - + @@ -56741,7 +58145,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -56782,57 +58186,11 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -56854,7 +58212,7 @@ If an operation that is listed in multiple CapabilityStatement.rest.resource.ope - + @@ -57185,7 +58543,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -57262,7 +58620,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -57617,7 +58975,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -57722,7 +59080,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -57936,7 +59294,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58145,7 +59503,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58182,7 +59540,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58219,7 +59577,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58297,7 +59655,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58423,7 +59781,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58499,7 +59857,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58628,7 +59986,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58757,7 +60115,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58883,7 +60241,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -58953,7 +60311,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59136,7 +60494,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59207,7 +60565,7 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + @@ -59424,7 +60782,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59550,7 +60908,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -59662,6 +61020,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + @@ -59690,13 +61055,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - @@ -59765,7 +61123,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -59806,7 +61164,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -60018,7 +61376,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -60170,7 +61528,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60193,7 +61551,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60216,7 +61574,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60267,7 +61625,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60318,7 +61676,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60389,7 +61747,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60456,7 +61814,7 @@ A capability statement that imports another CapabilityStatement2 automatically i - + @@ -60546,7 +61904,7 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + @@ -60600,7 +61958,7 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + @@ -60618,10 +61976,10 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + - + @@ -60636,7 +61994,7 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + @@ -60751,7 +62109,7 @@ If an operation that is listed in multiple CapabilityStatement2.rest.resource.op - + @@ -61244,7 +62602,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -61297,7 +62655,7 @@ This element is expected to be immutable. E.g. A "proposal" instance s - + @@ -61680,21 +63038,22 @@ This element is expected to be immutable. E.g. A "proposal" instance s - - + + - + - + - + + @@ -61731,50 +63090,6 @@ This element is expected to be immutable. E.g. A "proposal" instance s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -61900,7 +63215,7 @@ NOTE: This is a list of contained Request-Event tuples!}"> - + @@ -61996,20 +63311,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + + + + + + - + - + + @@ -62029,34 +63346,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -62193,7 +63482,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -62320,7 +63609,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -62448,20 +63737,24 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - - + + - + - + + + + + @@ -62486,40 +63779,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -62585,7 +63844,7 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + @@ -63208,7 +64467,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -63248,7 +64507,7 @@ This element is expected to be immutable. E.g. A "proposal" instance s - + @@ -63489,16 +64748,17 @@ This element is expected to be immutable. E.g. A "proposal" instance s - - + + - + - + + @@ -63526,36 +64786,6 @@ This element is expected to be immutable. E.g. A "proposal" instance s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -63621,15 +64851,17 @@ NOTE: This is a list of contained Request-Event tuples!}"> - - - - - + + + + + + - + + @@ -63639,19 +64871,6 @@ NOTE: This is a list of contained Request-Event tuples!}"> - - - - - - - - - - - - - @@ -63744,7 +64963,7 @@ NOTE: This is a list of contained Request-Event tuples!}"> - + @@ -63827,15 +65046,19 @@ NOTE: This is a list of contained Request-Event tuples!}"> - - + + - - + + - + + + + + @@ -63850,25 +65073,6 @@ NOTE: This is a list of contained Request-Event tuples!}"> - - - - - - - - - - - - - - - - - - - @@ -63905,7 +65109,7 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + @@ -64202,7 +65406,7 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + @@ -64220,10 +65424,10 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + - + @@ -64238,7 +65442,7 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + @@ -64352,7 +65556,7 @@ The unknown code is not to be used to convey other statuses. The unknown code s - + @@ -64661,7 +65865,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -64865,7 +66069,7 @@ Allows for an organization to designate a team such as the PICC line team."> - + @@ -65106,19 +66310,20 @@ Member is optional because some participants may be known only by their role, pa - - + + - + - + + @@ -65143,36 +66348,6 @@ Member is optional because some participants may be known only by their role, pa - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -65308,7 +66483,7 @@ Member is optional because some participants may be known only by their role, pa - + @@ -65514,14 +66689,15 @@ Member is optional because some participants may be known only by their role, pa - - + + - + + @@ -65536,21 +66712,6 @@ Member is optional because some participants may be known only by their role, pa - - - - - - - - - - - - - - - @@ -65595,7 +66756,7 @@ Member is optional because some participants may be known only by their role, pa - + @@ -65613,10 +66774,10 @@ Member is optional because some participants may be known only by their role, pa - + - + @@ -65631,7 +66792,7 @@ Member is optional because some participants may be known only by their role, pa - + @@ -65731,7 +66892,7 @@ Member is optional because some participants may be known only by their role, pa - + @@ -66065,7 +67226,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66103,7 +67264,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66242,7 +67403,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66368,7 +67529,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66686,7 +67847,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66711,7 +67872,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66793,7 +67954,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66925,7 +68086,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -66943,10 +68104,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -66961,7 +68122,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -67079,7 +68240,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -67472,7 +68633,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -67776,7 +68937,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -68647,7 +69808,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -69268,7 +70429,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -69286,10 +70447,10 @@ This element is labeled as a modifier because the status contains the code enter - + - + @@ -69304,7 +70465,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -69328,11 +70489,7 @@ This element is labeled as a modifier because the status contains the code enter - - - - - + @@ -69347,63 +70504,17 @@ This element is labeled as a modifier because the status contains the code enter - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -69425,7 +70536,7 @@ This element is labeled as a modifier because the status contains the code enter - + @@ -69953,7 +71064,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -70504,7 +71615,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -70733,7 +71844,7 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + @@ -70901,7 +72012,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -71027,7 +72138,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -71130,7 +72241,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -71316,7 +72427,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -71751,7 +72862,7 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + @@ -71810,7 +72921,7 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + @@ -71828,10 +72939,10 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + - + @@ -71847,7 +72958,7 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + @@ -71956,7 +73067,7 @@ FHIRPath expressions can traverse into other resources linked from the ChargeIte - + @@ -72266,7 +73377,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -72386,7 +73497,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -72720,7 +73831,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -73013,7 +74124,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -73285,7 +74396,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -73589,7 +74700,7 @@ Value codes"> - + @@ -73931,7 +75042,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -74240,7 +75351,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -74537,7 +75648,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -74873,7 +75984,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -75104,7 +76215,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -75864,7 +76975,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -76341,7 +77452,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -76854,7 +77965,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -76931,7 +78042,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -78611,7 +79722,7 @@ Value codes"> - + @@ -78629,10 +79740,10 @@ Value codes"> - + - + @@ -78647,7 +79758,7 @@ Value codes"> - + @@ -78753,7 +79864,7 @@ Value codes"> - + @@ -79062,7 +80173,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79182,7 +80293,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79388,7 +80499,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79555,7 +80666,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -79747,7 +80858,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -80011,7 +81122,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -80226,7 +81337,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -80441,7 +81552,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -81123,7 +82234,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -81500,7 +82611,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -81903,7 +83014,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82104,7 +83215,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82521,7 +83632,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82677,7 +83788,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -82824,7 +83935,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -83099,7 +84210,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -83360,7 +84471,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -83437,7 +84548,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -83558,7 +84669,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -84645,7 +85756,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -84853,7 +85964,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -84871,10 +85982,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -84889,7 +86000,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -85003,7 +86114,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -85316,7 +86427,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -85745,7 +86856,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -85841,19 +86952,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + @@ -85878,38 +86992,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -86115,7 +87197,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86356,14 +87438,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + @@ -86378,23 +87463,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - @@ -86474,7 +87542,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86492,10 +87560,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -86510,7 +87578,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86601,7 +87669,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86898,7 +87966,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -86970,7 +88038,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87023,7 +88091,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87260,7 +88328,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87453,7 +88521,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87763,7 +88831,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -87899,7 +88967,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88192,7 +89260,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88399,7 +89467,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88438,7 +89506,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88774,7 +89842,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88795,10 +89863,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -88813,7 +89881,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88837,11 +89905,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -88856,7 +89920,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -88869,57 +89933,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -88941,7 +89959,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -89311,7 +90329,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -89388,7 +90406,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -89804,7 +90822,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -89892,7 +90910,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -89989,7 +91007,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -90165,7 +91183,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90236,7 +91254,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90437,7 +91455,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90484,7 +91502,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90697,7 +91715,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -90935,7 +91953,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91138,7 +92156,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -91230,7 +92248,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -91271,7 +92289,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -91516,7 +92534,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -91562,7 +92580,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -91640,7 +92658,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -91717,7 +92735,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -91899,7 +92917,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -91917,10 +92935,10 @@ Most code systems occasionally refine the displays defined for concepts between - + - + @@ -91935,7 +92953,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -92040,7 +93058,7 @@ Most code systems occasionally refine the displays defined for concepts between - + @@ -92511,7 +93529,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -92632,7 +93650,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -92968,20 +93986,21 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + @@ -93014,44 +94033,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -93092,7 +94073,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -93398,7 +94379,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -93476,7 +94457,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -93679,15 +94660,16 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - + + - + - + + @@ -93711,30 +94693,6 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - - - - - - - - - - - - - - - - - - - - - - - @@ -93791,7 +94749,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -93809,10 +94767,10 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + - + @@ -93827,7 +94785,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -93932,7 +94890,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -94349,7 +95307,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -94473,7 +95431,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -94700,7 +95658,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -95036,20 +95994,21 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - + + - + - + + @@ -95082,44 +96041,6 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -95272,7 +96193,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -95352,7 +96273,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -95631,15 +96552,16 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - + + - + + @@ -95663,30 +96585,6 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - - - - - - - - - - - - - - - - - - - - - - - @@ -95715,7 +96613,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -95733,10 +96631,10 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + - + @@ -95751,7 +96649,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -95780,11 +96678,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - - - - - + @@ -95800,63 +96694,17 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -95882,7 +96730,7 @@ When using contentCodeableConcept, the CodeableConcept is what is being communic - + @@ -96213,7 +97061,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -96260,7 +97108,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -96536,7 +97384,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -96605,7 +97453,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -96734,7 +97582,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -96798,7 +97646,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -96869,7 +97717,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -96894,7 +97742,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97056,7 +97904,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97101,7 +97949,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97136,7 +97984,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97154,10 +98002,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -97173,7 +98021,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97301,7 +98149,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -97624,7 +98472,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -98089,7 +98937,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -98216,7 +99064,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98397,7 +99245,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98524,7 +99372,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98634,7 +99482,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -98912,7 +99760,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -99233,7 +100081,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -99484,7 +100332,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -99823,7 +100671,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -99946,7 +100794,7 @@ Some reporting work flows require that the original narrative of a final documen - + @@ -100257,7 +101105,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -100378,7 +101226,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -100396,10 +101244,10 @@ If the section has content (instead of sub-sections), the section.code does not - + - + @@ -100414,7 +101262,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -100438,11 +101286,7 @@ If the section has content (instead of sub-sections), the section.code does not - - - - - + @@ -100457,63 +101301,17 @@ If the section has content (instead of sub-sections), the section.code does not - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -100535,7 +101333,7 @@ If the section has content (instead of sub-sections), the section.code does not - + @@ -100905,7 +101703,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -100982,7 +101780,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -101409,7 +102207,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -101663,7 +102461,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -101886,7 +102684,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102068,7 +102866,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102140,7 +102938,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102417,7 +103215,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102543,7 +103341,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102632,7 +103430,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -102724,7 +103522,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -102765,7 +103563,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103167,7 +103965,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103285,7 +104083,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103330,7 +104128,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103348,10 +104146,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -103366,7 +104164,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103525,7 +104323,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -103841,7 +104639,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -103900,7 +104698,7 @@ The data type is CodeableConcept because verificationStatus has some clinical ju - + @@ -104506,7 +105304,7 @@ OR < 272379006 |Event|"> - + @@ -104720,9 +105518,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -104770,7 +105568,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -105087,7 +105885,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -105133,7 +105931,7 @@ The data type is CodeableConcept because verificationStatus has some clinical ju - + @@ -105625,9 +106423,9 @@ OR < 272379006 |Event|"> - + - + @@ -105734,7 +106532,7 @@ OR < 272379006 |Event|"> - + @@ -105752,10 +106550,10 @@ OR < 272379006 |Event|"> - + - + @@ -105770,7 +106568,7 @@ OR < 272379006 |Event|"> - + @@ -105794,11 +106592,7 @@ OR < 272379006 |Event|"> - - - - - + @@ -105813,63 +106607,17 @@ OR < 272379006 |Event|"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -105887,7 +106635,7 @@ OR < 272379006 |Event|"> - + @@ -106257,7 +107005,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -106359,7 +107107,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -106882,7 +107630,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -107084,7 +107832,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107286,7 +108034,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107412,7 +108160,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107542,7 +108290,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107668,7 +108416,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107737,7 +108485,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107893,7 +108641,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -107981,7 +108729,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108032,7 +108780,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108417,7 +109165,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108487,7 +109235,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108542,7 +109290,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108560,10 +109308,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -108578,7 +109326,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -108728,7 +109476,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -109048,7 +109796,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -109258,7 +110006,7 @@ Note: Scope can be derived from category if going from V2 to FHIR."> - + @@ -109414,7 +110162,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -109644,7 +110392,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -109765,6 +110513,68 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -109795,13 +110605,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + + - + - + @@ -109860,7 +110671,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -109986,7 +110797,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -110063,7 +110874,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -110469,7 +111280,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -110595,7 +111406,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -110751,7 +111562,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -110892,7 +111703,7 @@ Note: Scope can be derived from category if going from V2 to FHIR."> - + @@ -111046,6 +111857,38 @@ Note: An implementation-specific requirement will be needed"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111061,9 +111904,10 @@ Note: An implementation-specific requirement will be needed"> - + + - + @@ -111098,7 +111942,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -111314,7 +112158,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -111347,7 +112191,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -111365,10 +112209,10 @@ Note: An implementation-specific requirement will be needed"> - + - + @@ -111383,7 +112227,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -111492,7 +112336,7 @@ Note: An implementation-specific requirement will be needed"> - + @@ -111855,7 +112699,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -112547,7 +113391,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -112792,7 +113636,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -112871,7 +113715,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113258,7 +114102,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113525,7 +114369,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -113689,7 +114533,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114045,7 +114889,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114330,7 +115174,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -114631,7 +115475,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -115076,7 +115920,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -115646,7 +116490,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -115852,7 +116696,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -116385,19 +117229,25 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + + + + @@ -116418,62 +117268,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -116681,7 +117475,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -116944,7 +117738,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -117130,7 +117924,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -117316,7 +118110,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -117567,7 +118361,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -118010,7 +118804,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -119314,14 +120108,20 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + + + + @@ -119332,32 +120132,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -119680,7 +120454,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -119698,10 +120472,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -119717,7 +120491,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -119842,7 +120616,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -120168,7 +120942,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -120629,7 +121403,7 @@ For selfpay it may provide multiple paying persons and/or organizations."> - + @@ -120944,7 +121718,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -121162,7 +121936,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -121463,7 +122237,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -122032,7 +122806,7 @@ For selfpay it may provide multiple paying persons and/or organizations."> - + @@ -122050,10 +122824,10 @@ For selfpay it may provide multiple paying persons and/or organizations."> - + - + @@ -122068,7 +122842,7 @@ For selfpay it may provide multiple paying persons and/or organizations."> - + @@ -122178,7 +122952,7 @@ For selfpay it may provide multiple paying persons and/or organizations."> - + @@ -122487,7 +123261,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -122571,7 +123345,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -122866,7 +123640,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -123087,7 +123861,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -123307,7 +124081,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -123699,7 +124473,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -123912,7 +124686,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -123967,7 +124741,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -124420,7 +125194,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -124438,10 +125212,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -124456,7 +125230,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -124566,7 +125340,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -124875,7 +125649,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -124917,7 +125691,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -125145,7 +125919,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -125253,7 +126027,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -125481,7 +126255,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -125949,7 +126723,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -126350,7 +127124,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -126535,7 +127309,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -126563,7 +127337,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -126705,7 +127479,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127191,7 +127965,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127209,10 +127983,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -127227,7 +128001,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127349,7 +128123,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127666,7 +128440,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127758,7 +128532,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -127989,7 +128763,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -128263,7 +129037,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -128531,7 +129305,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -128595,7 +129369,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -128892,7 +129666,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -128910,10 +129684,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -128929,7 +129703,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -129043,7 +129817,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -129402,7 +130176,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -129717,7 +130491,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other"> - + @@ -129756,7 +130530,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other"> - + @@ -130073,7 +130847,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other"> - + @@ -130226,7 +131000,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -130377,7 +131151,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -130568,7 +131342,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -130784,7 +131558,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -131422,7 +132196,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other"> - + @@ -131448,7 +132222,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other"> - + @@ -131657,7 +132431,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -131994,7 +132768,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -132012,10 +132786,10 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + - + @@ -132030,7 +132804,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -132127,7 +132901,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -132438,7 +133212,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -132686,7 +133460,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -132839,7 +133613,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -132956,7 +133730,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -133279,7 +134053,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -133465,7 +134239,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -133883,7 +134657,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -134177,7 +134951,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -134540,7 +135314,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -134558,10 +135332,10 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + - + @@ -134576,7 +135350,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -134673,7 +135447,7 @@ UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | - + @@ -135099,7 +135873,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135132,7 +135906,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135165,7 +135939,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135237,7 +136011,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135363,7 +136137,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135396,7 +136170,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135534,7 +136308,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135553,7 +136327,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135572,7 +136346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135617,7 +136391,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135636,7 +136410,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135660,7 +136434,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135678,10 +136452,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -135696,7 +136470,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -135819,7 +136593,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -136333,7 +137107,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -136387,7 +137161,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -136437,7 +137211,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -136569,7 +137343,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -137102,19 +137876,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - + + + - + - + + + + + @@ -137155,51 +137933,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -137554,7 +138287,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -137595,7 +138328,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -137631,7 +138364,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -138028,14 +138761,18 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - + + + - + + + + + @@ -138067,37 +138804,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -138206,7 +138912,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -138224,10 +138930,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -138242,7 +138948,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -138361,7 +139067,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -138712,7 +139418,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -138953,19 +139659,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + + @@ -138985,55 +139695,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -139195,7 +139864,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -139352,14 +140021,18 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + + @@ -139370,41 +140043,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -139462,7 +140108,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -139480,10 +140126,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -139499,7 +140145,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -139624,7 +140270,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -139989,7 +140635,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -140562,7 +141208,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -140939,7 +141585,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -141434,7 +142080,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -141452,10 +142098,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -141470,7 +142116,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -141589,7 +142235,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -141952,7 +142598,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -142356,7 +143002,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -142602,7 +143248,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -142894,7 +143540,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -142912,10 +143558,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -142930,7 +143576,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -143068,7 +143714,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -143447,7 +144093,7 @@ This element is labeled as a modifier because the status contains the codes that - + @@ -143501,7 +144147,7 @@ This element is labeled as a modifier because the status contains the codes that - + @@ -143953,7 +144599,7 @@ The typeCode should be mapped from the ClinicalDocument/code element to a set of - + @@ -144080,7 +144726,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -144281,7 +144927,7 @@ In the HL7 Healthcare Privacy and Security Classification (HCS) there are code s - + @@ -144519,7 +145165,7 @@ Composition.date"> - + @@ -145092,7 +145738,7 @@ This element is labeled as a modifier because the status contains the codes that - + @@ -145132,7 +145778,7 @@ This element is labeled as a modifier because the status contains the codes that - + @@ -145472,7 +146118,7 @@ The typeCode should be mapped from the ClinicalDocument/code element to a set of - + @@ -145933,7 +146579,7 @@ serviceEvent/effectiveTime/high/ - + @@ -145948,10 +146594,10 @@ serviceEvent/effectiveTime/high/ - + - + @@ -145966,7 +146612,7 @@ serviceEvent/effectiveTime/high/ - + @@ -146052,7 +146698,7 @@ serviceEvent/effectiveTime/high/ - + @@ -146466,7 +147112,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -146484,10 +147130,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -146502,7 +147148,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -146617,7 +147263,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -146932,7 +147578,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -146999,7 +147645,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -147125,7 +147771,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -147253,7 +147899,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -147766,7 +148412,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -148103,22 +148749,26 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + + + + + @@ -148140,55 +148790,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -148250,7 +148852,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -148538,7 +149140,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -149026,7 +149628,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -149195,7 +149797,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -149407,7 +150009,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -149459,7 +150061,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -149939,17 +150541,21 @@ There may be many levels in the hierachy, and this may only pic specific levels - - - - + + + + - + + + + + @@ -149962,41 +150568,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -150402,7 +150974,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -150500,7 +151072,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -150518,10 +151090,10 @@ There may be many levels in the hierachy, and this may only pic specific levels - + - + @@ -150536,7 +151108,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -150636,7 +151208,7 @@ There may be many levels in the hierachy, and this may only pic specific levels - + @@ -150943,7 +151515,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -151192,7 +151764,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -151312,7 +151884,7 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + @@ -151462,7 +152034,7 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + @@ -151513,7 +152085,7 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + @@ -151531,10 +152103,10 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + - + @@ -151549,7 +152121,7 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + @@ -151659,7 +152231,7 @@ and not "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345 - + @@ -151962,7 +152534,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152183,7 +152755,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152293,7 +152865,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152311,10 +152883,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -152329,7 +152901,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152439,7 +153011,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152742,7 +153314,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152816,7 +153388,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -152989,7 +153561,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153033,7 +153605,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153110,7 +153682,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153128,10 +153700,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -153146,7 +153718,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153256,7 +153828,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153563,7 +154135,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153614,7 +154186,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153740,7 +154312,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -153853,7 +154425,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -154319,7 +154891,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -154355,7 +154927,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -154591,7 +155163,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -154609,10 +155181,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -154627,7 +155199,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -154651,11 +155223,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -154670,53 +155238,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -154724,10 +155246,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -154748,7 +155266,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -155118,7 +155636,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -155220,7 +155738,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -155920,7 +156438,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -156012,7 +156530,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -156063,7 +156581,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -156459,7 +156977,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -156477,10 +156995,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -156495,7 +157013,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -156519,11 +157037,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - + @@ -156538,53 +157052,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -156593,8 +157061,8 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - + + @@ -156612,7 +157080,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -157027,7 +157495,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -157038,37 +157506,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -157104,6 +157541,37 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -157343,7 +157811,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -157614,7 +158082,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -158034,7 +158502,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -158253,7 +158721,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -158474,7 +158942,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -158585,7 +159053,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -158596,23 +159064,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - @@ -158634,6 +159085,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + @@ -159068,7 +159536,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -159086,10 +159554,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -159105,7 +159573,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -159129,11 +159597,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -159149,53 +159613,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -159203,10 +159621,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -159227,7 +159641,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -159597,7 +160011,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -159725,7 +160139,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -160306,7 +160720,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -160375,7 +160789,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -160741,7 +161155,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -160754,7 +161168,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -160846,7 +161260,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -160909,7 +161323,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161228,7 +161642,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161389,7 +161803,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161402,7 +161816,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161420,10 +161834,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -161438,7 +161852,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161462,11 +161876,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - + @@ -161481,53 +161891,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -161536,8 +161900,8 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - + + @@ -161555,7 +161919,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161925,7 +162289,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -161972,7 +162336,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -162190,43 +162554,6 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -162265,6 +162592,43 @@ In some cases, the resource can no longer be found at the stated url, but the ur + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -162305,7 +162669,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -162457,7 +162821,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -162552,7 +162916,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -162703,7 +163067,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -162796,7 +163160,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -162982,7 +163346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -163168,7 +163532,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -163404,7 +163768,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -163588,7 +163952,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -163970,7 +164334,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -164174,7 +164538,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -164262,7 +164626,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -164287,7 +164651,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -164421,28 +164785,6 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - - - - - - - - - - - - - - - - - - - - - @@ -164466,6 +164808,28 @@ In some cases, the resource can no longer be found at the stated url, but the ur + + + + + + + + + + + + + + + + + + + + + + @@ -164502,7 +164866,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -164562,7 +164926,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -164889,7 +165253,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -164907,10 +165271,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -164925,7 +165289,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -165036,7 +165400,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -165345,7 +165709,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -165469,7 +165833,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -165846,7 +166210,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -166132,7 +166496,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -166454,7 +166818,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -166581,7 +166945,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -166877,7 +167241,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -167216,7 +167580,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -167525,7 +167889,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -167847,7 +168211,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -168068,7 +168432,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -168299,7 +168663,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -169080,7 +169444,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -169343,7 +169707,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -169868,7 +170232,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -170397,7 +170761,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -171061,7 +171425,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -171432,7 +171796,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -171829,7 +172193,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -172033,7 +172397,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -172412,7 +172776,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -172568,7 +172932,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -172708,7 +173072,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -173064,7 +173428,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -173309,7 +173673,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -173390,7 +173754,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -173814,7 +174178,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -175998,7 +176362,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -176249,7 +176613,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -176267,10 +176631,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -176285,7 +176649,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -176417,7 +176781,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -176802,7 +177166,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -177177,20 +177541,26 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + + + + @@ -177212,7 +177582,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -177223,49 +177593,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -177343,7 +177670,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -177646,7 +177973,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178018,7 +178345,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178252,15 +178579,21 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + + + + @@ -178273,7 +178606,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178284,35 +178617,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -178535,7 +178839,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178553,10 +178857,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -178571,7 +178875,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178674,7 +178978,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -178983,7 +179287,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -179278,7 +179582,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -179443,7 +179747,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -179461,10 +179765,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -179479,7 +179783,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -179589,7 +179893,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -179899,7 +180203,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -180242,7 +180546,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -180623,21 +180927,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + @@ -180658,34 +180963,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -180744,7 +181021,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -181128,16 +181405,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + @@ -181148,19 +181426,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - @@ -181171,7 +181436,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -181189,10 +181454,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -181207,7 +181472,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -181231,11 +181496,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -181250,53 +181511,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -181305,8 +181520,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -181328,7 +181543,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -181659,7 +181874,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -181706,7 +181921,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -182025,7 +182240,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -182095,7 +182310,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -182357,7 +182572,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182486,7 +182701,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182581,7 +182796,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182708,7 +182923,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182741,7 +182956,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182774,7 +182989,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182859,7 +183074,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -182926,7 +183141,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -182951,7 +183166,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183142,7 +183357,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183246,7 +183461,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183297,7 +183512,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183315,7 +183530,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183333,7 +183548,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183374,7 +183589,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183392,10 +183607,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -183410,7 +183625,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183527,7 +183742,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -183878,7 +184093,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -184106,7 +184321,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -184391,7 +184606,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -184665,7 +184880,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -184943,7 +185158,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -184961,10 +185176,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -184980,7 +185195,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -185085,7 +185300,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -185456,7 +185671,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -185608,52 +185823,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -185671,7 +185853,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -185898,7 +186080,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -185990,32 +186172,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - - - - - - - - - - - - - - - - - - - + @@ -186023,7 +186187,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -186098,7 +186262,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -186116,10 +186280,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -186134,7 +186298,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -186243,7 +186407,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -187005,7 +187169,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -187393,7 +187557,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -187519,7 +187683,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -187659,7 +187823,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -188352,7 +188516,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -188484,7 +188648,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -188502,10 +188666,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -188520,7 +188684,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -188643,7 +188807,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -188962,7 +189126,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -189439,7 +189603,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -189631,19 +189795,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + + + + + @@ -189665,7 +189833,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -189680,51 +189848,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -189836,7 +189959,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -190362,7 +190485,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -190585,7 +190708,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -190906,7 +191029,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -191281,14 +191404,18 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + + + + + @@ -191301,7 +191428,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -191316,37 +191443,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -191835,7 +191931,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -191853,10 +191949,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -191871,7 +191967,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -191994,7 +192090,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -192309,7 +192405,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -193015,7 +193111,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -193230,19 +193326,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + @@ -193264,49 +193363,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -193431,7 +193494,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -193782,7 +193845,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -194022,7 +194085,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -194346,7 +194409,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -194880,14 +194943,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + @@ -194899,34 +194965,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - - - - - - - - - - - - - - - - - - - - - @@ -195294,7 +195339,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -195312,10 +195357,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -195330,7 +195375,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -195444,7 +195489,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -195750,7 +195795,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -196184,7 +196229,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -196414,7 +196459,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -196432,10 +196477,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -196450,7 +196495,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -196568,7 +196613,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -197016,7 +197061,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -197367,7 +197412,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -198225,7 +198270,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -198243,10 +198288,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -198262,7 +198307,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -198286,11 +198331,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -198305,53 +198346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -198367,8 +198362,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -198390,7 +198385,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -198725,7 +198720,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -198802,7 +198797,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -199142,13 +199137,13 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -199179,7 +199174,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -199222,7 +199217,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -199437,7 +199432,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -199567,7 +199562,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -199644,7 +199639,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -199781,7 +199776,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -199967,7 +199962,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -200124,7 +200119,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -200280,7 +200275,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -200461,14 +200456,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -200491,7 +200486,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + + @@ -200528,7 +200524,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -200626,8 +200622,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -200714,7 +200710,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -200925,7 +200921,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -201089,7 +201085,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -201312,7 +201308,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -201548,7 +201544,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -201626,7 +201622,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -201667,7 +201663,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -201865,13 +201861,13 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -201888,7 +201884,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -201970,7 +201966,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -202075,7 +202071,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -202181,14 +202177,14 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -202196,7 +202192,8 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + + @@ -202205,8 +202202,8 @@ In some cases, the resource can no longer be found at the stated url, but the ur - - + + @@ -202417,7 +202414,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -202435,10 +202432,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -202453,7 +202450,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -202544,7 +202541,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -202927,7 +202924,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -203143,7 +203140,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -203431,7 +203428,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -203697,7 +203694,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -204147,7 +204144,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -204165,10 +204162,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -204183,7 +204180,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -204286,7 +204283,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -204598,7 +204595,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -204864,7 +204861,7 @@ For searching knowing previous names that the product/plan was known by can be v - + @@ -205186,7 +205183,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -205377,7 +205374,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -205563,7 +205560,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -205751,7 +205748,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -205998,7 +205995,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -206234,7 +206231,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -206398,7 +206395,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -206559,7 +206556,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -206710,7 +206707,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -206822,7 +206819,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -207342,7 +207339,7 @@ For searching knowing previous names that the product/plan was known by can be v - + @@ -207375,7 +207372,7 @@ For searching knowing previous names that the product/plan was known by can be v - + @@ -207393,10 +207390,10 @@ For searching knowing previous names that the product/plan was known by can be v - + - + @@ -207411,7 +207408,7 @@ For searching knowing previous names that the product/plan was known by can be v - + @@ -207525,7 +207522,7 @@ For searching knowing previous names that the product/plan was known by can be v - + @@ -207836,7 +207833,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -208094,7 +208091,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -208376,7 +208373,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -208582,7 +208579,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -208708,7 +208705,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -209033,7 +209030,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -209362,7 +209359,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -209526,7 +209523,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -209544,10 +209541,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -209562,7 +209559,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -209586,11 +209583,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -209605,53 +209598,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -209660,8 +209607,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -209683,7 +209630,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -210065,7 +210012,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -210175,7 +210122,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211038,7 +210985,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211142,7 +211089,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211201,7 +211148,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211715,7 +211662,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211733,10 +211680,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -211751,7 +211698,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -211858,7 +211805,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -212206,7 +212153,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212332,7 +212279,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212446,7 +212393,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212471,7 +212418,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212489,10 +212436,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -212507,7 +212454,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212631,7 +212578,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212938,7 +212885,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -212982,7 +212929,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -213336,7 +213283,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -213679,7 +213626,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -213710,7 +213657,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -214028,7 +213975,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -214046,10 +213993,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -214064,7 +214011,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -214173,7 +214120,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -214484,7 +214431,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -214669,7 +214616,7 @@ For searching knowing previous names that the location was known by can be very - + @@ -214876,7 +214823,7 @@ For searching knowing previous names that the location was known by can be very - + @@ -215172,7 +215119,7 @@ Specific services within the location may have their own hours which could be sh - + @@ -215298,7 +215245,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -215511,7 +215458,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -215625,7 +215572,7 @@ For searching knowing previous names that the location was known by can be very - + @@ -215855,7 +215802,7 @@ Specific services within the location may have their own hours which could be sh - + @@ -215944,7 +215891,7 @@ Specific services within the location may have their own hours which could be sh - + @@ -215962,10 +215909,10 @@ Specific services within the location may have their own hours which could be sh - + - + @@ -215980,7 +215927,7 @@ Specific services within the location may have their own hours which could be sh - + @@ -216071,7 +216018,7 @@ Specific services within the location may have their own hours which could be sh - + @@ -216480,7 +216427,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -216765,7 +216712,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -216783,10 +216730,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -216801,7 +216748,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -216825,11 +216772,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -216844,53 +216787,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -216905,10 +216802,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -216929,7 +216822,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -217299,7 +217192,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -217401,7 +217294,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -218349,7 +218242,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -218444,7 +218337,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -218630,7 +218523,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -218850,7 +218743,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -219062,7 +218955,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -219274,7 +219167,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -219486,6 +219379,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + @@ -219493,13 +219393,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - @@ -219586,7 +219479,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -219637,7 +219530,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -220152,7 +220045,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -220408,7 +220301,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -220426,10 +220319,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -220444,7 +220337,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -220554,7 +220447,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -220859,7 +220752,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -220898,7 +220791,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221094,7 +220987,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221138,7 +221031,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221299,7 +221192,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221544,7 +221437,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221708,7 +221601,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -221869,7 +221762,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222058,7 +221951,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222348,7 +222241,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222373,7 +222266,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222486,7 +222379,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222728,7 +222621,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222746,10 +222639,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -222764,7 +222657,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -222878,7 +222771,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -223236,7 +223129,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -223405,7 +223298,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -223577,7 +223470,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -223591,6 +223484,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -223670,7 +223566,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -223932,7 +223828,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -224074,7 +223970,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -224083,6 +223979,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -224176,7 +224075,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -224194,10 +224093,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -224212,7 +224111,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -224233,11 +224132,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - @@ -224331,7 +224225,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -224768,7 +224662,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -225015,7 +224909,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -225175,7 +225069,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -225350,19 +225244,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + + + + @@ -225384,7 +225281,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -225395,51 +225292,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -225597,7 +225449,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226078,7 +225930,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226252,7 +226104,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226390,14 +226242,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + + + + @@ -226409,7 +226264,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226420,36 +226275,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -226695,7 +226520,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226713,10 +226538,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -226731,7 +226556,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -226857,7 +226682,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -227237,7 +227062,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -227482,7 +227307,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -227561,7 +227386,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -228115,6 +227940,36 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -228193,7 +228048,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -228609,7 +228464,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -228781,7 +228636,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -229094,6 +228949,21 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + @@ -229263,7 +229133,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -229281,10 +229151,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -229299,7 +229169,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -229405,7 +229275,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -229755,7 +229625,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -229946,7 +229816,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -230184,7 +230054,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -230371,7 +230241,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -230538,20 +230408,26 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + + + + @@ -230562,6 +230438,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + @@ -230700,7 +230584,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -230911,7 +230795,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -231097,7 +230981,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -231233,7 +231117,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -231448,7 +231332,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -231638,7 +231522,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -231824,7 +231708,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -232094,7 +231978,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -232328,7 +232212,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -232490,7 +232374,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -232701,7 +232585,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -232888,7 +232772,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -233114,7 +232998,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -233344,15 +233228,29 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + + + + + + + + + + + + + + + @@ -233863,7 +233761,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -233881,10 +233779,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -233899,7 +233797,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -234024,7 +233922,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -234344,7 +234242,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -234437,7 +234335,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -234528,7 +234426,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -235043,20 +234941,22 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + @@ -235094,51 +234994,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -235386,6 +235242,36 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -235468,7 +235354,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -235609,7 +235495,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -235938,14 +235824,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + @@ -236020,7 +235906,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -236390,7 +236276,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -236455,7 +236341,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -236517,7 +236403,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -236860,15 +236746,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + + + @@ -236896,36 +236784,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -237072,6 +236931,21 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + @@ -237252,10 +237126,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + @@ -237425,7 +237299,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -237443,10 +237317,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -237463,7 +237337,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -237579,7 +237453,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -237967,7 +237841,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -238339,20 +238213,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + - + + + + @@ -238374,7 +238251,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -238385,47 +238262,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -238459,6 +238295,36 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -238628,7 +238494,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -238871,15 +238737,18 @@ The primary difference between a medicationusage and a medicationadministration - - + + - + - + + + + @@ -238891,7 +238760,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -238902,32 +238771,6 @@ The primary difference between a medicationusage and a medicationadministration - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -238946,6 +238789,21 @@ The primary difference between a medicationusage and a medicationadministration + + + + + + + + + + + + + + + @@ -238985,7 +238843,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -239003,10 +238861,10 @@ The primary difference between a medicationusage and a medicationadministration - + - + @@ -239021,7 +238879,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -239121,7 +238979,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -239451,6 +239309,72 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -239463,7 +239387,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -239902,7 +239826,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -240132,7 +240056,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -240330,7 +240254,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -240528,7 +240452,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -240722,9 +240646,182 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -240784,7 +240881,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -240880,19 +240977,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + + + + + @@ -240909,39 +241010,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -240967,35 +241039,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -241026,20 +241069,20 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + @@ -241053,186 +241096,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -241251,156 +241125,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -241462,6 +241187,44 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -241469,7 +241232,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -241892,9 +241655,43 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -241916,14 +241713,18 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + + + + + @@ -241931,25 +241732,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - + + @@ -241961,21 +241747,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - @@ -241992,56 +241763,26 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -242050,86 +241791,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -242142,7 +241804,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -242160,10 +241822,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -242179,7 +241841,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -242208,11 +241870,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -242228,53 +241886,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -242283,8 +241895,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -242310,7 +241922,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -242680,7 +242292,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -242783,7 +242395,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -243228,7 +242840,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -243278,7 +242890,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -243408,7 +243020,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -243525,7 +243137,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -243573,7 +243185,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -243756,7 +243368,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -243852,7 +243464,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -243905,7 +243517,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244167,7 +243779,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244208,7 +243820,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244266,7 +243878,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244326,7 +243938,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244344,10 +243956,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -244363,7 +243975,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244472,7 +244084,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -244824,7 +244436,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -245245,7 +244857,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -245648,7 +245260,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -245810,7 +245422,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -246420,7 +246032,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -246492,13 +246104,533 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -246516,10 +246648,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -246534,7 +246666,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -246637,7 +246769,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -246939,7 +247071,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247150,7 +247282,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247334,7 +247466,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247451,7 +247583,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247544,7 +247676,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247856,7 +247988,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -247982,7 +248114,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -248366,7 +248498,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -248702,7 +248834,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -248828,7 +248960,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249022,7 +249154,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249148,7 +249280,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249241,7 +249373,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249427,7 +249559,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249621,7 +249753,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249765,7 +249897,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249826,7 +249958,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -249967,7 +250099,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250255,7 +250387,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250352,7 +250484,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250453,7 +250585,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250471,10 +250603,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -250489,7 +250621,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250513,11 +250645,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -250532,53 +250660,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -250601,8 +250683,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -250628,7 +250710,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250870,6 +250952,79 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -250886,7 +251041,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250933,7 +251088,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -250974,7 +251129,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251316,7 +251471,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251443,7 +251598,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251570,7 +251725,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251592,6 +251747,51 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -251603,7 +251803,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251628,7 +251828,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251655,7 +251855,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251855,7 +252055,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251917,7 +252117,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -251932,10 +252132,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -251950,7 +252150,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -252059,7 +252259,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -252435,7 +252635,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -252561,7 +252761,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -252884,7 +253084,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -253230,7 +253430,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -253239,40 +253439,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -253289,7 +253456,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -253421,7 +253588,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -253718,36 +253885,18 @@ This element is labeled as a modifier because the status contains codes that mar - + - - - - - - - - - - - - - - - - - - - + - + @@ -253778,7 +253927,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -253796,10 +253945,10 @@ This element is labeled as a modifier because the status contains codes that mar - + - + @@ -253814,7 +253963,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -253945,7 +254094,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -254376,7 +254525,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -254429,7 +254578,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -254780,7 +254929,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -255011,7 +255160,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -255238,7 +255387,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -255558,7 +255707,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -255895,7 +256044,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -256279,7 +256428,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -256739,7 +256888,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -256779,7 +256928,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -257720,7 +257869,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -257741,10 +257890,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -257760,7 +257909,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -257911,7 +258060,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -258321,7 +258470,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -258491,7 +258640,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -259184,7 +259333,7 @@ If the use case requires BodySite to be handled as a separate resource (e.g. to - + @@ -259633,7 +259782,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -260149,7 +260298,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -260276,7 +260425,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -261156,7 +261305,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -261174,10 +261323,10 @@ The alternate way is to use the value element for actual observations and use th - + - + @@ -261193,7 +261342,7 @@ The alternate way is to use the value element for actual observations and use th - + @@ -261305,7 +261454,7 @@ OMC"> - + @@ -261737,7 +261886,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -262245,7 +262394,7 @@ OMC-4"> - + @@ -262495,7 +262644,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -262767,7 +262916,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -262897,7 +263046,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -263046,7 +263195,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -263333,7 +263482,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -263500,7 +263649,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -263662,7 +263811,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -263926,7 +264075,7 @@ OMC-4"> - + @@ -264161,7 +264310,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264250,7 +264399,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264428,7 +264577,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264457,7 +264606,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264478,10 +264627,10 @@ Example: 702659008 |Automated count technique|."> - + - + @@ -264496,7 +264645,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264520,11 +264669,7 @@ Example: 702659008 |Automated count technique|."> - - - - - + @@ -264539,53 +264684,7 @@ Example: 702659008 |Automated count technique|."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -264593,10 +264692,6 @@ Example: 702659008 |Automated count technique|."> - - - - @@ -264621,7 +264716,7 @@ Example: 702659008 |Automated count technique|."> - + @@ -264952,7 +265047,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -265033,7 +265128,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -265075,7 +265170,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -265505,7 +265600,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -265703,7 +265798,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -265856,7 +265951,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -265969,7 +266064,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266033,7 +266128,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266076,7 +266171,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266208,7 +266303,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266282,7 +266377,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266494,7 +266589,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266649,7 +266744,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -266720,7 +266815,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -266765,7 +266860,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -266793,7 +266888,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267038,7 +267133,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267161,7 +267256,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267214,7 +267309,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267248,7 +267343,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267282,7 +267377,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267382,7 +267477,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267400,10 +267495,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -267418,7 +267513,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267519,7 +267614,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -267809,7 +267904,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -267937,7 +268032,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -267981,7 +268076,7 @@ The required element provides a base level of computable interoperability across - + @@ -268194,7 +268289,7 @@ For resource issues, this will be a simple XPath limited to element names, repet - + @@ -268224,7 +268319,7 @@ The required element provides a base level of computable interoperability across - + @@ -268340,7 +268435,7 @@ For resource issues, this will be a simple XPath limited to element names, repet - + @@ -268358,10 +268453,10 @@ For resource issues, this will be a simple XPath limited to element names, repet - + - + @@ -268376,7 +268471,7 @@ For resource issues, this will be a simple XPath limited to element names, repet - + @@ -268510,7 +268605,7 @@ For resource issues, this will be a simple XPath limited to element names, repet - + @@ -269172,7 +269267,7 @@ For searching knowing previous names that the organization was known by can be v - + @@ -269853,7 +269948,7 @@ For searching knowing previous names that the organization was known by can be v - + @@ -269871,10 +269966,10 @@ For searching knowing previous names that the organization was known by can be v - + - + @@ -269890,7 +269985,7 @@ For searching knowing previous names that the organization was known by can be v - + @@ -269990,7 +270085,7 @@ For searching knowing previous names that the organization was known by can be v - + @@ -270861,7 +270956,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -270879,10 +270974,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -270897,7 +270992,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -270988,7 +271083,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -271473,7 +271568,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -271659,7 +271754,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -271971,7 +272066,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -272172,7 +272267,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -272673,7 +272768,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -272691,10 +272786,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -272709,7 +272804,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -272768,7 +272863,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -272914,7 +273009,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -273076,6 +273171,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -273334,6 +273432,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -273490,7 +273591,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -273511,10 +273612,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -273530,7 +273631,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -273659,7 +273760,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -274118,7 +274219,7 @@ Deceased patients may also be marked as inactive for the same reasons, but may b - + @@ -274467,7 +274568,7 @@ Deceased patients may also be marked as inactive for the same reasons, but may b - + @@ -274758,7 +274859,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -274900,7 +275001,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -275223,7 +275324,7 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + @@ -275392,7 +275493,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -275573,7 +275674,7 @@ Deceased patients may also be marked as inactive for the same reasons, but may b - + @@ -275926,7 +276027,7 @@ Deceased patients may also be marked as inactive for the same reasons, but may b - + @@ -276193,7 +276294,7 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + @@ -276214,7 +276315,7 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + @@ -276232,10 +276333,10 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + - + @@ -276250,7 +276351,7 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + @@ -276369,7 +276470,7 @@ Jurisdictions may decide that they can profile this down to 1 if desired, or 1 p - + @@ -276682,7 +276783,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277096,7 +277197,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277314,7 +277415,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277332,10 +277433,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -277350,7 +277451,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277460,7 +277561,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277769,7 +277870,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -277983,7 +278084,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -278139,7 +278240,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -278595,7 +278696,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -278725,7 +278826,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -278810,7 +278911,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -278937,7 +279038,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279189,7 +279290,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279217,7 +279318,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279235,10 +279336,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -279254,7 +279355,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279360,7 +279461,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279745,7 +279846,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -279969,7 +280070,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280128,7 +280229,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280235,7 +280336,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280391,7 +280492,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280408,7 +280509,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280426,10 +280527,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -280444,7 +280545,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280468,11 +280569,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -280487,53 +280584,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -280541,10 +280592,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -280565,7 +280612,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -280935,7 +280982,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -281070,7 +281117,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -281807,7 +281854,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -282134,7 +282181,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -282364,7 +282411,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -282602,7 +282649,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -282818,7 +282865,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -282945,7 +282992,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283065,7 +283112,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283216,7 +283263,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283327,7 +283374,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283453,7 +283500,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283552,7 +283599,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283585,7 +283632,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283618,7 +283665,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283651,7 +283698,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283684,7 +283731,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283791,7 +283838,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -283975,7 +284022,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -284067,7 +284114,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -284137,7 +284184,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -284774,7 +284821,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -284886,7 +284933,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -284956,7 +285003,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285022,7 +285069,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285076,7 +285123,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285094,7 +285141,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285112,7 +285159,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285130,7 +285177,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285148,7 +285195,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285239,7 +285286,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285257,10 +285304,10 @@ In addition, because the subject needs to be resolved during realization, use of - + - + @@ -285276,7 +285323,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285403,7 +285450,7 @@ In addition, because the subject needs to be resolved during realization, use of - + @@ -285894,7 +285941,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -286045,7 +286092,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -286523,7 +286570,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -286742,7 +286789,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -286760,10 +286807,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -286779,7 +286826,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -286906,7 +286953,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -287583,7 +287630,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -287709,7 +287756,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -287849,7 +287896,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -288367,7 +288414,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -288500,7 +288547,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -288518,10 +288565,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -288536,7 +288583,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -288650,7 +288697,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -289119,7 +289166,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -289593,7 +289640,7 @@ Age is generally used when the patient reports an age at which the procedure was - + @@ -289855,20 +289902,25 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + + + + + - + - + + + + + + @@ -289890,7 +289942,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -289905,50 +289957,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -290249,7 +290257,7 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + @@ -290412,8 +290420,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -290421,12 +290429,12 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -290442,37 +290450,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -290647,7 +290624,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -291075,15 +291052,20 @@ Age is generally used when the patient reports an age at which the procedure was - - - - - + + + + + - + + + + + + @@ -291096,7 +291078,7 @@ Age is generally used when the patient reports an age at which the procedure was - + @@ -291111,36 +291093,6 @@ Age is generally used when the patient reports an age at which the procedure was - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -291345,8 +291297,8 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - - + + @@ -291354,28 +291306,12 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + - - - - - - - - - - - - - - - @@ -291399,7 +291335,7 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + @@ -291417,10 +291353,10 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + - + @@ -291435,7 +291371,7 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + @@ -291562,7 +291498,7 @@ Use Procedure.reasonCode when a code sufficiently describes the reason. Use Pro - + @@ -292178,7 +292114,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -292500,7 +292436,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -292626,7 +292562,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293157,7 +293093,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293234,7 +293170,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293252,10 +293188,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -293271,7 +293207,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293300,11 +293236,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -293322,53 +293254,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -293383,10 +293269,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - @@ -293411,7 +293293,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293789,7 +293671,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293909,7 +293791,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -293997,7 +293879,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -294593,7 +294475,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -294732,7 +294614,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding)."> - + @@ -294893,7 +294775,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -294954,7 +294836,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -295110,7 +294992,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -295215,7 +295097,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -295438,7 +295320,7 @@ The value may come from the ElementDefinition referred to by .definition."> - + @@ -295667,7 +295549,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -295876,6 +295758,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + @@ -295883,13 +295772,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - @@ -295988,7 +295870,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -296057,7 +295939,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -296117,7 +295999,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -296538,7 +296420,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding)."> - + @@ -296624,7 +296506,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -296686,7 +296568,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -296761,7 +296643,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -297034,7 +296916,7 @@ The value may come from the ElementDefinition referred to by .definition."> - + @@ -297052,10 +296934,10 @@ The value may come from the ElementDefinition referred to by .definition."> - + - + @@ -297071,7 +296953,7 @@ The value may come from the ElementDefinition referred to by .definition."> - + @@ -297183,7 +297065,7 @@ The value may come from the ElementDefinition referred to by .definition."> - + @@ -297606,7 +297488,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -297894,7 +297776,7 @@ This element is optional to allow for systems that might not know the value, how - + @@ -298128,7 +298010,7 @@ There is no need for this element if the item pointed to by the linkId has a def - + @@ -298485,7 +298367,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -298830,7 +298712,7 @@ There is no need for this element if the item pointed to by the linkId has a def - + @@ -298848,10 +298730,10 @@ There is no need for this element if the item pointed to by the linkId has a def - + - + @@ -298866,7 +298748,7 @@ There is no need for this element if the item pointed to by the linkId has a def - + @@ -298957,7 +298839,7 @@ There is no need for this element if the item pointed to by the linkId has a def - + @@ -299243,6 +299125,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + @@ -299292,7 +299175,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -299470,7 +299353,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -299737,7 +299620,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -299993,6 +299876,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + @@ -300014,7 +299898,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -300222,7 +300106,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -300240,10 +300124,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -300259,7 +300143,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -300373,7 +300257,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -300890,7 +300774,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -301097,7 +300981,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -301464,7 +301348,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -301639,7 +301523,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -301657,10 +301541,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -301675,7 +301559,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -301780,7 +301664,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302245,7 +302129,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302289,7 +302173,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302331,7 +302215,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302518,52 +302402,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -302581,7 +302432,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302664,7 +302515,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302890,7 +302741,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -302996,7 +302847,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303123,7 +302974,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303192,7 +303043,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303343,7 +303194,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303519,7 +303370,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303552,7 +303403,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303585,7 +303436,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303618,7 +303469,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303651,7 +303502,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303843,7 +303694,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303874,7 +303725,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -303902,7 +303753,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304015,32 +303866,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - - - - - - - - - - - - - - - - - - - + @@ -304048,7 +303881,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304143,7 +303976,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304205,7 +304038,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304254,7 +304087,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304355,7 +304188,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304373,7 +304206,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304391,7 +304224,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304409,7 +304242,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304427,7 +304260,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304462,7 +304295,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304480,10 +304313,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -304498,7 +304331,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -304625,7 +304458,7 @@ StudyProtocolVersion"> - + @@ -305047,7 +304880,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -305783,7 +305616,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -306022,7 +305855,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -306320,7 +306153,7 @@ StudyProtocolVersion"> - + @@ -306899,7 +306732,7 @@ StudyProtocolVersion"> - + @@ -306917,10 +306750,10 @@ StudyProtocolVersion"> - + - + @@ -306935,7 +306768,7 @@ StudyProtocolVersion"> - + @@ -307055,7 +306888,7 @@ StudyProtocolVersion"> - + @@ -307365,7 +307198,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -307423,7 +307256,7 @@ It is likely that more than one "state" pattern will be recorded for a - + @@ -307941,7 +307774,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -308175,7 +308008,7 @@ It is likely that more than one "state" pattern will be recorded for a - + @@ -308193,10 +308026,10 @@ It is likely that more than one "state" pattern will be recorded for a - + - + @@ -308211,7 +308044,7 @@ It is likely that more than one "state" pattern will be recorded for a - + @@ -308339,7 +308172,7 @@ It is likely that more than one "state" pattern will be recorded for a - + @@ -308712,7 +308545,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -308997,52 +308830,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -309060,7 +308860,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -309153,7 +308953,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -309620,7 +309420,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -309807,32 +309607,14 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - - - - - - - - - - - - - - - - - - - + @@ -309840,7 +309622,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310050,7 +309832,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310068,10 +309850,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -310086,7 +309868,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310196,7 +309978,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310924,7 +310706,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310942,10 +310724,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -310960,7 +310742,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -310989,11 +310771,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - + @@ -311009,53 +310787,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -311078,8 +310810,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -311105,7 +310837,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -311436,7 +311168,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -311510,7 +311242,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -311856,7 +311588,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -311892,7 +311624,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -311980,7 +311712,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312016,7 +311748,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312100,7 +311832,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312133,7 +311865,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312202,7 +311934,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312360,7 +312092,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -312445,7 +312177,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312482,7 +312214,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312687,7 +312419,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312709,7 +312441,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312752,7 +312484,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312773,7 +312505,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312812,7 +312544,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312830,7 +312562,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312886,7 +312618,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -312904,10 +312636,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -312922,7 +312654,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -313056,7 +312788,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -313577,7 +313309,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -313632,7 +313364,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -313729,7 +313461,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -314326,19 +314058,20 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + @@ -314367,54 +314100,24 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - + + + + + @@ -314436,7 +314139,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -314451,52 +314154,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -314987,7 +314644,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315029,7 +314686,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315098,7 +314755,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315528,14 +315185,15 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + + @@ -315555,35 +315213,19 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - + + - + - + + + + + @@ -315596,7 +315238,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315611,38 +315253,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -315827,7 +315437,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315845,10 +315455,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -315863,7 +315473,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -315972,7 +315582,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -316444,7 +316054,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -316717,7 +316327,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -316793,7 +316403,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -316811,10 +316421,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -316829,7 +316439,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -316934,7 +316544,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -317282,7 +316892,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -317541,7 +317151,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -317948,7 +317558,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -318220,7 +317830,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -318682,7 +318292,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -319285,7 +318895,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -319303,10 +318913,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -319321,7 +318931,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -319425,7 +319035,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -319855,7 +319465,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -320393,7 +320003,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -320589,7 +320199,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -320636,7 +320246,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -320973,7 +320583,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -321299,7 +320909,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -321652,7 +321262,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -321972,7 +321582,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -322304,7 +321914,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -322325,10 +321935,10 @@ Unknown does not represent "other" - one of the defined statuses must - + - + @@ -322343,7 +321953,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -322372,11 +321982,7 @@ Unknown does not represent "other" - one of the defined statuses must - - - - - + @@ -322393,53 +321999,7 @@ Unknown does not represent "other" - one of the defined statuses must - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -322573,8 +322133,8 @@ Unknown does not represent "other" - one of the defined statuses must - - + + @@ -322596,7 +322156,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -322983,7 +322543,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -323060,7 +322620,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -323438,7 +322998,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -323469,7 +323029,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -323519,7 +323079,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -323749,7 +323309,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -323819,7 +323379,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -323945,7 +323505,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -324099,7 +323659,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -324164,7 +323724,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -324354,7 +323914,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -324489,6 +324049,13 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + @@ -324592,13 +324159,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - @@ -324724,7 +324284,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -324765,7 +324325,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325000,7 +324560,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325017,7 +324577,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325097,7 +324657,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325140,7 +324700,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325224,7 +324784,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -325332,7 +324892,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -325350,10 +324910,10 @@ The type must match the elements defined in the differential and the snapshot. F - + - + @@ -325368,7 +324928,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -325392,11 +324952,7 @@ The type must match the elements defined in the differential and the snapshot. F - - - - - + @@ -325413,53 +324969,7 @@ The type must match the elements defined in the differential and the snapshot. F - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -325468,8 +324978,8 @@ The type must match the elements defined in the differential and the snapshot. F - - + + @@ -325491,7 +325001,7 @@ The type must match the elements defined in the differential and the snapshot. F - + @@ -325865,7 +325375,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -325942,7 +325452,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -326305,7 +325815,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -326457,7 +325967,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -326577,7 +326087,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -326754,7 +326264,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -326823,7 +326333,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -326999,7 +326509,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -327067,7 +326577,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -327228,7 +326738,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -327466,6 +326976,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -327652,7 +327165,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -327810,7 +327323,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -327961,7 +327474,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328044,7 +327557,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328102,7 +327615,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328145,7 +327658,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328341,7 +327854,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328523,7 +328036,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -328619,7 +328132,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -328660,7 +328173,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -328893,7 +328406,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -328980,7 +328493,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329044,7 +328557,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329171,6 +328684,9 @@ In some cases, the resource can no longer be found at the stated url, but the ur + + + @@ -329320,7 +328836,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329420,7 +328936,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329461,7 +328977,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329491,7 +329007,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329590,7 +329106,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329608,10 +329124,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -329626,7 +329142,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -329729,7 +329245,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -330059,7 +329575,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -330163,11 +329679,11 @@ This element is labeled as a modifier because the status contains codes that mar - + - + @@ -330228,7 +329744,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -330379,7 +329895,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330444,7 +329960,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330506,7 +330022,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330604,7 +330120,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330639,7 +330155,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330752,7 +330268,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330851,7 +330367,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330881,7 +330397,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330915,7 +330431,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -330981,7 +330497,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331043,7 +330559,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331092,7 +330608,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331129,7 +330645,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331150,7 +330666,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331171,7 +330687,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331216,7 +330732,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331232,7 +330748,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331252,7 +330768,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331265,7 +330781,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331283,10 +330799,10 @@ This element is labeled as a modifier because the status contains codes that mar - + - + @@ -331301,7 +330817,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331410,7 +330926,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -331717,7 +331233,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -331890,7 +331406,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332118,7 +331634,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332339,7 +331855,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332554,7 +332070,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332572,10 +332088,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -332590,7 +332106,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332681,7 +332197,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -332948,6 +332464,31 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + @@ -333035,7 +332576,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -333191,7 +332732,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -333530,7 +333071,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -333876,7 +333417,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -334112,7 +333653,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -334348,7 +333889,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -334633,7 +334174,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -334844,7 +334385,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -335106,7 +334647,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -335463,7 +335004,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -335723,7 +335264,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -336132,6 +335673,17 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + @@ -336172,7 +335724,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -337062,7 +336614,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -337077,10 +336629,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -337095,7 +336647,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -337186,7 +336738,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -337568,7 +337120,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -337854,7 +337406,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -338090,7 +337642,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -338500,7 +338052,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -338518,10 +338070,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -338536,7 +338088,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -338627,7 +338179,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -339009,7 +338561,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -339170,7 +338722,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -339406,7 +338958,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -339617,7 +339169,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -339828,7 +339380,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -340014,7 +339566,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -340490,7 +340042,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -340505,10 +340057,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -340523,7 +340075,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -340614,7 +340166,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -340971,7 +340523,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -341418,7 +340970,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -341436,10 +340988,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -341454,7 +341006,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -341545,7 +341097,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -341852,7 +341404,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -342064,7 +341616,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -342276,7 +341828,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -342513,7 +342065,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -343098,7 +342650,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -343113,10 +342665,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -343131,7 +342683,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -343222,7 +342774,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -343754,7 +343306,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -343940,7 +343492,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -344201,7 +343753,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -344387,7 +343939,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -344648,7 +344200,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -344884,7 +344436,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -345445,7 +344997,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -345463,10 +345015,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -345481,7 +345033,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -345595,7 +345147,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -345983,7 +345535,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346058,7 +345610,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346113,7 +345665,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346534,7 +346086,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346579,7 +346131,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346743,7 +346295,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346761,10 +346313,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -346779,7 +346331,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -346897,7 +346449,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -347213,7 +346765,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -347309,7 +346861,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -347453,7 +347005,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -347826,19 +347378,23 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + - + + + + + @@ -347860,7 +347416,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -347875,51 +347431,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -348059,7 +347570,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -348127,7 +347638,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -348404,14 +347915,18 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + - + + + + + @@ -348423,7 +347938,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -348438,36 +347953,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -348519,7 +348004,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -348537,10 +348022,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -348555,7 +348040,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -348676,7 +348161,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -349160,7 +348645,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -349282,7 +348767,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -349329,7 +348814,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -350066,7 +349551,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -350307,7 +349792,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -350483,6 +349968,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -350663,7 +350151,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -350839,6 +350327,9 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + @@ -351142,7 +350633,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -351222,7 +350713,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -351254,7 +350745,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -351846,6 +351337,9 @@ In most cases, Tasks will have an intent of "order"."> + + + @@ -352046,6 +351540,9 @@ In most cases, Tasks will have an intent of "order"."> + + + @@ -352181,7 +351678,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -352199,10 +351696,10 @@ In most cases, Tasks will have an intent of "order"."> - + - + @@ -352217,7 +351714,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -352241,11 +351738,7 @@ In most cases, Tasks will have an intent of "order"."> - - - - - + @@ -352260,53 +351753,7 @@ In most cases, Tasks will have an intent of "order"."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -352343,8 +351790,8 @@ In most cases, Tasks will have an intent of "order"."> - - + + @@ -352366,7 +351813,7 @@ In most cases, Tasks will have an intent of "order"."> - + @@ -352697,7 +352144,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -352774,7 +352221,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -353130,7 +352577,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -353174,7 +352621,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -353363,7 +352810,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -353583,7 +353030,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -353746,7 +353193,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -353983,7 +353430,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354219,7 +353666,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354430,7 +353877,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354633,7 +354080,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354676,7 +354123,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354837,7 +354284,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -354998,7 +354445,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -355128,7 +354575,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -355223,7 +354670,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -355264,7 +354711,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -355478,7 +354925,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -355793,7 +355240,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -355866,7 +355313,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -355884,10 +355331,10 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + - + @@ -355902,7 +355349,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -356011,7 +355458,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -356346,7 +355793,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -356410,7 +355857,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -356539,7 +355986,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -356665,7 +356112,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -356758,7 +356205,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -356905,7 +356352,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357041,7 +356488,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357167,7 +356614,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357260,7 +356707,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357386,7 +356833,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357479,7 +356926,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357676,7 +357123,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357858,7 +357305,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -357998,7 +357445,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -358186,7 +357633,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358222,7 +357669,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358294,7 +357741,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358373,7 +357820,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358421,7 +357868,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358553,7 +358000,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358571,10 +358018,10 @@ This element is labeled as a modifier because the status contains codes that mar - + - + @@ -358589,7 +358036,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -358613,11 +358060,7 @@ This element is labeled as a modifier because the status contains codes that mar - - - - - + @@ -358632,53 +358075,7 @@ This element is labeled as a modifier because the status contains codes that mar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -358687,8 +358084,8 @@ This element is labeled as a modifier because the status contains codes that mar - - + + @@ -358710,7 +358107,7 @@ This element is labeled as a modifier because the status contains codes that mar - + @@ -359084,7 +358481,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -359161,7 +358558,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -359524,7 +358921,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -359726,7 +359123,7 @@ The origin indices provided elsewhere in the test script must be one of these or - + @@ -359934,7 +359331,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -360070,7 +359467,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -360257,7 +359654,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -360570,7 +359967,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -360818,7 +360215,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361160,7 +360557,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361307,7 +360704,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361450,7 +360847,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361614,7 +361011,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361707,7 +361104,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361748,7 +361145,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361833,7 +361230,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -361929,7 +361326,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362268,7 +361665,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362447,7 +361844,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362565,7 +361962,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362703,7 +362100,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362763,7 +362160,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362826,7 +362223,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -362860,7 +362257,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363033,7 +362430,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363230,7 +362627,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363441,7 +362838,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363581,7 +362978,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363716,7 +363113,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -363812,7 +363209,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -363853,7 +363250,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -364512,7 +363909,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364560,7 +363957,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364586,7 +363983,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364626,7 +364023,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364808,7 +364205,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364866,7 +364263,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364929,7 +364326,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364959,7 +364356,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -364992,7 +364389,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -365011,7 +364408,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -365214,7 +364611,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -365232,10 +364629,10 @@ The destination indices provided elsewhere in the test script must be one of the - + - + @@ -365250,7 +364647,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -365364,7 +364761,7 @@ The destination indices provided elsewhere in the test script must be one of the - + @@ -365872,7 +365269,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -366376,7 +365773,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -366528,7 +365925,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -366561,7 +365958,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -366604,7 +366001,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -366805,8 +366202,8 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - - + + @@ -366843,7 +366240,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -366995,7 +366392,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -367209,7 +366606,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367540,7 +366937,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367559,7 +366956,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367622,8 +367019,8 @@ Unknown does not represent "other" - one of the defined statuses must - - + + @@ -367659,7 +367056,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367683,7 +367080,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367704,10 +367101,10 @@ Unknown does not represent "other" - one of the defined statuses must - + - + @@ -367722,7 +367119,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -367746,11 +367143,7 @@ Unknown does not represent "other" - one of the defined statuses must - - - - - + @@ -367765,53 +367158,7 @@ Unknown does not represent "other" - one of the defined statuses must - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -367820,8 +367167,8 @@ Unknown does not represent "other" - one of the defined statuses must - - + + @@ -367843,7 +367190,7 @@ Unknown does not represent "other" - one of the defined statuses must - + @@ -368217,7 +367564,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -368294,7 +367641,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -368698,7 +368045,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -368921,7 +368268,7 @@ The Value Set Definition specification defines an ActiveOnly element, which is t - + @@ -369128,7 +368475,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -369325,7 +368672,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -369566,7 +368913,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -369722,7 +369069,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -369889,7 +369236,7 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + @@ -370131,7 +369478,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -370336,7 +369683,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -370543,7 +369890,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -370862,7 +370209,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -371059,7 +370406,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -371155,7 +370502,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -371196,7 +370543,7 @@ In some cases, the resource can no longer be found at the stated url, but the ur - + @@ -371694,7 +371041,7 @@ The Value Set Definition specification defines an ActiveOnly element, which is t - + @@ -372074,7 +371421,7 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + @@ -372092,10 +371439,10 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + - + @@ -372110,7 +371457,7 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + @@ -372206,7 +371553,7 @@ Expansion.parameter is a simplified list of parameters - a subset of the featur - + @@ -372562,7 +371909,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -372804,7 +372151,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -373162,7 +372509,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -373512,7 +372859,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -373751,7 +373098,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -374141,7 +373488,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -374159,10 +373506,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -374177,7 +373524,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -374291,7 +373638,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -374608,7 +373955,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -374870,7 +374217,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -375040,7 +374387,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -375184,7 +374531,7 @@ Often insurance will not cover a lens with power between +75 and -75."> - + @@ -375341,7 +374688,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -375653,7 +375000,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -375861,7 +375208,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -375961,7 +375308,7 @@ Often insurance will not cover a lens with power between +75 and -75."> - + @@ -376093,1083 +375440,4 @@ Often insurance will not cover a lens with power between +75 and -75."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-types.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-types.xml index 3964bf6686d..c28c3afe155 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-types.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/profile/profiles-types.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -19,10 +19,10 @@ - + - + @@ -31,7 +31,7 @@ - + @@ -40,6 +40,8 @@ + + @@ -227,7 +229,7 @@ - + @@ -236,10 +238,10 @@ - + - + @@ -248,7 +250,7 @@ - + @@ -464,7 +466,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -473,10 +475,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -485,11 +487,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -636,7 +638,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -645,10 +647,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -657,11 +659,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -806,7 +808,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -815,10 +817,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -827,7 +829,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -978,7 +980,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -987,10 +989,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -999,7 +1001,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1148,7 +1150,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1157,10 +1159,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1169,11 +1171,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1318,7 +1320,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1327,10 +1329,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1339,11 +1341,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1488,7 +1490,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1497,10 +1499,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1509,11 +1511,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1660,7 +1662,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1669,10 +1671,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1681,7 +1683,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1832,7 +1834,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -1841,10 +1843,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -1853,11 +1855,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2004,7 +2006,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2013,10 +2015,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2025,11 +2027,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2174,13 +2176,185 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -2189,10 +2363,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2201,7 +2375,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2352,7 +2526,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2361,10 +2535,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2373,7 +2547,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2524,7 +2698,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2533,10 +2707,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2545,7 +2719,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2694,7 +2868,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2703,10 +2877,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2715,11 +2889,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2868,7 +3042,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -2877,10 +3051,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -2889,11 +3063,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3038,7 +3212,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3047,10 +3221,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3059,7 +3233,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3208,7 +3382,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3217,10 +3391,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3229,11 +3403,11 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3380,7 +3554,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3389,10 +3563,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3401,7 +3575,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3550,7 +3724,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3559,10 +3733,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3571,7 +3745,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3722,7 +3896,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3731,10 +3905,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3743,7 +3917,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3887,7 +4061,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3896,10 +4070,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -3909,7 +4083,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3933,7 +4107,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -3954,7 +4128,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -4092,7 +4265,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4142,7 +4315,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4559,7 +4732,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4595,7 +4768,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -4858,16 +5031,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -4876,7 +5049,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5098,7 +5271,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5260,7 +5433,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5269,10 +5442,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -5281,7 +5454,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5295,7 +5468,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5316,7 +5489,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -5619,7 +5791,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5628,10 +5800,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -5641,7 +5813,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5655,7 +5827,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5676,7 +5848,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -5818,7 +5989,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -5965,7 +6136,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6293,7 +6464,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6392,7 +6563,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6543,13 +6714,340 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6558,10 +7056,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -6571,7 +7069,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6590,7 +7088,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6611,7 +7109,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -6878,13 +7375,256 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6893,10 +7633,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -6906,7 +7646,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6925,7 +7665,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -6946,7 +7686,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7405,7 +8144,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7414,10 +8153,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -7427,7 +8166,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7436,7 +8175,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7456,7 +8195,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7644,7 +8382,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7653,10 +8391,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -7666,7 +8404,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7685,7 +8423,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7705,7 +8443,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -7844,7 +8581,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -7931,7 +8668,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8068,7 +8805,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8128,7 +8865,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8196,16 +8933,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -8215,7 +8952,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8224,7 +8961,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8241,7 +8978,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -8360,7 +9096,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8441,7 +9177,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8476,16 +9212,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -8495,7 +9231,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8702,7 +9438,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8858,16 +9594,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -8876,7 +9612,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8885,7 +9621,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -8902,7 +9638,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -9024,7 +9759,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -9698,7 +10433,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -9732,7 +10467,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -9960,29 +10695,197 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -9991,7 +10894,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -10213,7 +11116,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -10375,16 +11278,16 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + - + - + @@ -10393,7 +11296,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -10407,7 +11310,7 @@ The value of mustSupport SHALL be a FHIRPath resolveable on the type of the Data - + @@ -10530,7 +11433,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -11625,7 +12528,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -11634,10 +12537,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -11646,7 +12549,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -11871,7 +12774,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12036,7 +12939,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12045,10 +12948,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -12057,7 +12960,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12086,7 +12989,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12322,7 +13225,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12421,7 +13324,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12858,7 +13761,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -12999,7 +13902,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13573,7 +14476,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13834,7 +14737,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13876,7 +14779,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -13927,6 +14830,9 @@ No default values are ever defined in the FHIR specification, nor can they be de + + + @@ -14169,6 +15075,9 @@ No default values are ever defined in the FHIR specification, nor can they be de + + + @@ -14363,6 +15272,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -14678,6 +15590,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -14851,6 +15766,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -14905,6 +15823,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -15202,7 +16123,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -15638,7 +16559,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -15909,7 +16830,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16148,7 +17069,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16339,7 +17260,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16424,7 +17345,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16751,7 +17672,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16873,7 +17794,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16901,7 +17822,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -16947,6 +17868,9 @@ No default values are ever defined in the FHIR specification, nor can they be de + + + @@ -17147,6 +18071,9 @@ No default values are ever defined in the FHIR specification, nor can they be de + + + @@ -17327,6 +18254,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -17526,6 +18456,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -17685,6 +18618,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -17725,6 +18661,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -17855,7 +18794,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18077,7 +19016,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18204,7 +19143,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18256,16 +19195,16 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + - + - + @@ -18274,7 +19213,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18283,7 +19222,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18300,7 +19239,6 @@ When pattern[x] is used to constrain a complex object, it means that each proper - @@ -18629,7 +19567,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18638,10 +19576,10 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + - + @@ -18651,7 +19589,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18660,7 +19598,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -18680,7 +19618,6 @@ When pattern[x] is used to constrain a complex object, it means that each proper - @@ -18848,6 +19785,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -19065,6 +20005,9 @@ When pattern[x] is used to constrain a complex object, it means that each proper + + + @@ -19200,7 +20143,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19209,10 +20152,10 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + - + @@ -19222,7 +20165,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19241,7 +20184,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19262,7 +20205,6 @@ When pattern[x] is used to constrain a complex object, it means that each proper - @@ -19396,7 +20338,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19684,7 +20626,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19850,7 +20792,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19859,10 +20801,10 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + - + @@ -19872,7 +20814,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19891,7 +20833,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -19911,7 +20853,6 @@ When pattern[x] is used to constrain a complex object, it means that each proper - @@ -20045,7 +20986,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -20310,7 +21251,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -20468,16 +21409,16 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + - + - + @@ -20486,7 +21427,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -20495,7 +21436,7 @@ When pattern[x] is used to constrain a complex object, it means that each proper - + @@ -20614,7 +21555,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20847,7 +21788,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -20856,10 +21797,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -20868,7 +21809,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -21291,7 +22232,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21300,10 +22241,10 @@ This element can be used to indicate where the current master source of a resour - + - + @@ -21312,7 +22253,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21326,7 +22267,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21346,7 +22287,6 @@ This element can be used to indicate where the current master source of a resour - @@ -21504,7 +22444,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21567,7 +22507,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21584,7 +22524,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21593,10 +22533,10 @@ This element can be used to indicate where the current master source of a resour - + - + @@ -21605,7 +22545,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21614,7 +22554,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21634,7 +22574,6 @@ This element can be used to indicate where the current master source of a resour - @@ -21757,7 +22696,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21842,7 +22781,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21888,16 +22827,16 @@ This element can be used to indicate where the current master source of a resour - + - + - + @@ -21906,7 +22845,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -21915,7 +22854,7 @@ This element can be used to indicate where the current master source of a resour - + @@ -22041,7 +22980,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22514,16 +23453,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -22532,7 +23471,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22541,7 +23480,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22558,7 +23497,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -22702,7 +23640,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22813,7 +23751,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22881,7 +23819,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22936,7 +23874,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22961,7 +23899,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22970,10 +23908,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -22982,7 +23920,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -22996,7 +23934,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23019,7 +23957,6 @@ Period is not used for a duration (a measure of elapsed time). See [Duration](da - @@ -23280,16 +24217,16 @@ Period is not used for a duration (a measure of elapsed time). See [Duration](da - + - + - + @@ -23298,7 +24235,7 @@ Period is not used for a duration (a measure of elapsed time). See [Duration](da - + @@ -23307,7 +24244,7 @@ Period is not used for a duration (a measure of elapsed time). See [Duration](da - + @@ -23426,7 +24363,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23623,22 +24560,189 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -23647,7 +24751,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23656,7 +24760,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -23775,7 +24879,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24224,16 +25328,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -24242,7 +25346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24251,7 +25355,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24370,7 +25474,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24567,7 +25671,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24576,10 +25680,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -24589,7 +25693,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24603,7 +25707,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24624,7 +25728,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -24796,7 +25899,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -24986,7 +26089,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25072,7 +26175,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25081,10 +26184,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -25094,7 +26197,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25108,7 +26211,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25129,7 +26232,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -25386,7 +26488,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25395,10 +26497,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -25408,7 +26510,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25422,7 +26524,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25443,7 +26545,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -25676,7 +26777,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25685,10 +26786,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -25697,7 +26798,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25706,7 +26807,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -25727,7 +26828,6 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - @@ -26088,16 +27188,16 @@ Reference is intended to point to a structure that can potentially be expressed - + - + - + @@ -26107,7 +27207,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26116,7 +27216,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26134,7 +27234,6 @@ Reference is intended to point to a structure that can potentially be expressed - @@ -26253,7 +27352,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26439,7 +27538,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26522,16 +27621,16 @@ Reference is intended to point to a structure that can potentially be expressed - + - + - + @@ -26541,7 +27640,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26555,7 +27654,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -26573,7 +27672,6 @@ Reference is intended to point to a structure that can potentially be expressed - @@ -27018,16 +28116,16 @@ Reference is intended to point to a structure that can potentially be expressed - + - + - + @@ -27037,7 +28135,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27046,7 +28144,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27064,7 +28162,6 @@ Reference is intended to point to a structure that can potentially be expressed - @@ -27316,7 +28413,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27352,7 +28449,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27486,7 +28583,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27507,7 +28604,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27531,16 +28628,16 @@ Reference is intended to point to a structure that can potentially be expressed - + - + - + @@ -27549,7 +28646,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27558,7 +28655,7 @@ Reference is intended to point to a structure that can potentially be expressed - + @@ -27677,7 +28774,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -28904,16 +30001,16 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + - + @@ -28922,7 +30019,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -28931,7 +30028,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29050,7 +30147,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29405,7 +30502,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29414,10 +30511,10 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + - + @@ -29427,7 +30524,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29441,7 +30538,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29574,7 +30671,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -29989,7 +31086,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -30143,7 +31240,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -30180,7 +31277,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -30249,7 +31346,7 @@ Modifier extensions SHALL NOT change the meaning of any elements on Resource or - + @@ -30547,7 +31644,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30631,7 +31728,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30654,7 +31751,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30695,7 +31792,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30751,16 +31848,16 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + - + - + @@ -30769,7 +31866,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30778,7 +31875,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -30796,7 +31893,6 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - @@ -30936,7 +32032,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31103,7 +32199,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31174,16 +32270,16 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + - + - + @@ -31193,7 +32289,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31202,7 +32298,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31219,7 +32315,6 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - @@ -31466,7 +32561,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31475,10 +32570,10 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + - + @@ -31487,7 +32582,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31516,7 +32611,6 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - @@ -31695,7 +32789,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31840,7 +32934,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31849,10 +32943,10 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + - + @@ -31861,7 +32955,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + @@ -31890,7 +32984,6 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - @@ -32069,7 +33162,7 @@ A Timing schedule can be a list of events and/or criteria for when the event hap - + diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v2-tables.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v2-tables.xml index a2d3a7cdf94..fa5557f5728 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v2-tables.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v2-tables.xml @@ -1,14 +1,14 @@ - + - + - + @@ -19,10 +19,10 @@ - + - - + + @@ -32,21 +32,21 @@ - + - + - + - + @@ -57,10 +57,10 @@ - + - - + + @@ -70,21 +70,21 @@ - + - + - + - + @@ -95,10 +95,10 @@ - + - - + + @@ -108,21 +108,21 @@ - + - + - + - + @@ -133,10 +133,10 @@ - + - - + + @@ -146,21 +146,21 @@ - + - + - + - + @@ -171,10 +171,10 @@ - - - - + + + + @@ -184,21 +184,21 @@ - + - + - + - + @@ -209,10 +209,10 @@ - - - - + + + + @@ -222,21 +222,21 @@ - + - + - + - + @@ -247,10 +247,10 @@ - + - - + + @@ -260,21 +260,21 @@ - + - + - + - + @@ -285,10 +285,10 @@ - + - - + + @@ -298,21 +298,21 @@ - + - + - + - + @@ -323,10 +323,10 @@ - - - - + + + + @@ -336,21 +336,21 @@ - + - + - + - + @@ -361,10 +361,10 @@ - + - - + + @@ -374,21 +374,21 @@ - + - + - + - + @@ -399,10 +399,10 @@ - + - - + + @@ -412,21 +412,21 @@ - + - + - + - + @@ -437,10 +437,10 @@ - + - - + + @@ -450,21 +450,21 @@ - + - + - + - + @@ -475,10 +475,10 @@ - + - - + + @@ -488,21 +488,21 @@ - + - + - + - + @@ -513,10 +513,10 @@ - + - - + + @@ -526,21 +526,21 @@ - + - + - + - + @@ -551,10 +551,10 @@ - + - - + + @@ -564,21 +564,21 @@ - + - + - + - + @@ -589,10 +589,10 @@ - + - - + + @@ -602,21 +602,21 @@ - + - + - + - + @@ -627,10 +627,10 @@ - + - - + + @@ -640,21 +640,21 @@ - + - + - + - + @@ -665,10 +665,10 @@ - + - - + + @@ -678,21 +678,21 @@ - + - + - + - + @@ -703,10 +703,10 @@ - + - - + + @@ -716,21 +716,21 @@ - + - + - + - + @@ -741,10 +741,10 @@ - + - - + + @@ -754,21 +754,21 @@ - + - + - + - + @@ -779,10 +779,10 @@ - + - - + + @@ -792,21 +792,21 @@ - + - + - + - + @@ -817,10 +817,10 @@ - + - - + + @@ -830,21 +830,21 @@ - + - + - + - + @@ -855,10 +855,10 @@ - + - - + + @@ -868,21 +868,21 @@ - + - + - + - + @@ -893,10 +893,10 @@ - + - - + + @@ -906,21 +906,21 @@ - + - + - + - + @@ -931,10 +931,10 @@ - + - - + + @@ -944,21 +944,21 @@ - + - + - + - + @@ -969,10 +969,10 @@ - + - - + + @@ -982,21 +982,21 @@ - + - + - + - + @@ -1007,10 +1007,10 @@ - + - - + + @@ -1020,11 +1020,205 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1109,120 +1303,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1262,10 +1342,10 @@ - + - + @@ -1276,10 +1356,10 @@ - + - - + + @@ -1289,21 +1369,21 @@ - + - + - + - + @@ -1314,10 +1394,10 @@ - + - - + + @@ -1327,21 +1407,21 @@ - + - + - + - + @@ -1352,10 +1432,10 @@ - + - - + + @@ -1365,21 +1445,21 @@ - + - + - + - + @@ -1390,10 +1470,10 @@ - + - - + + @@ -1403,21 +1483,21 @@ - + - + - + - + @@ -1428,10 +1508,10 @@ - + - - + + @@ -1441,21 +1521,21 @@ - + - + - + - + @@ -1466,10 +1546,10 @@ - + - - + + @@ -1479,21 +1559,21 @@ - + - + - + - + @@ -1504,10 +1584,10 @@ - + - - + + @@ -1517,38 +1597,114 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + @@ -1558,21 +1714,21 @@ - + - + - + - + @@ -1583,10 +1739,10 @@ - + - - + + @@ -1596,21 +1752,21 @@ - + - + - + - + @@ -1621,10 +1777,10 @@ - + - - + + @@ -1634,21 +1790,21 @@ - + - + - + - + @@ -1659,10 +1815,10 @@ - + - - + + @@ -1672,21 +1828,21 @@ - + - + - + - + @@ -1697,10 +1853,10 @@ - + - - + + @@ -1710,21 +1866,21 @@ - + - + - + - + @@ -1735,10 +1891,10 @@ - + - - + + @@ -1748,21 +1904,21 @@ - + - + - + - + @@ -1773,10 +1929,10 @@ - + - - + + @@ -1786,21 +1942,21 @@ - + - + - + - + @@ -1811,10 +1967,10 @@ - + - - + + @@ -1824,21 +1980,21 @@ - + - + - + - + @@ -1849,10 +2005,10 @@ - + - - + + @@ -1862,21 +2018,21 @@ - + - + - + - + @@ -1887,10 +2043,10 @@ - + - - + + @@ -1900,21 +2056,21 @@ - + - + - + - + @@ -1925,10 +2081,10 @@ - + - - + + @@ -1938,21 +2094,21 @@ - + - + - + - + @@ -1963,10 +2119,10 @@ - + - - + + @@ -1976,21 +2132,21 @@ - + - + - + - + @@ -2001,10 +2157,10 @@ - + - - + + @@ -2014,21 +2170,21 @@ - + - + - + - + @@ -2039,10 +2195,10 @@ - + - - + + @@ -2052,21 +2208,21 @@ - + - + - + - + @@ -2077,10 +2233,10 @@ - + - - + + @@ -2090,21 +2246,21 @@ - + - + - + - + @@ -2115,10 +2271,10 @@ - + - - + + @@ -2128,21 +2284,21 @@ - + - + - + - + @@ -2153,10 +2309,10 @@ - + - - + + @@ -2166,44 +2322,21 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -2214,10 +2347,10 @@ - + - - + + @@ -2227,21 +2360,21 @@ - + - + - + - + @@ -2252,10 +2385,10 @@ - + - - + + @@ -2265,21 +2398,6031 @@ - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2293,10 +8436,10 @@ - + - - + + @@ -2306,21 +8449,21 @@ - + - + - + - + @@ -2331,10 +8474,10 @@ - + - - + + @@ -2344,21 +8487,21 @@ - + - + - + - + @@ -2369,10 +8512,10 @@ - + - - + + @@ -2382,21 +8525,21 @@ - + - + - + - + @@ -2407,10 +8550,10 @@ - + - - + + @@ -2420,11 +8563,2671 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2507,10 +11310,10 @@ - + - + @@ -2521,10 +11324,10 @@ - + - - + + @@ -2534,21 +11337,21 @@ - + - + - + - + @@ -2559,10 +11362,10 @@ - + - - + + @@ -2572,35 +11375,38 @@ - + - + - + - + - + - + - + + + + - - + + @@ -2610,21 +11416,21 @@ - + - + - + - + @@ -2635,10 +11441,10 @@ - + - - + + @@ -2648,21 +11454,21 @@ - + - + - + - + @@ -2673,10 +11479,10 @@ - + - - + + @@ -2686,21 +11492,21 @@ - + - + - + - + @@ -2711,10 +11517,10 @@ - + - - + + @@ -2724,21 +11530,21 @@ - + - + - + - + @@ -2749,10 +11555,10 @@ - + - - + + @@ -2762,21 +11568,21 @@ - + - + - + - + @@ -2787,10 +11593,10 @@ - + - - + + @@ -2800,11 +11606,11 @@ - + - + @@ -2890,10 +11696,10 @@ - + - + @@ -2904,10 +11710,10 @@ - + - - + + @@ -2917,21 +11723,21 @@ - + - + - + - + @@ -2942,10 +11748,10 @@ - + - - + + @@ -2955,21 +11761,21 @@ - + - + - + - + @@ -2980,10 +11786,10 @@ - + - - + + @@ -2993,21 +11799,21 @@ - + - + - + - + @@ -3018,10 +11824,10 @@ - + - - + + @@ -3031,21 +11837,21 @@ - + - + - + - + @@ -3056,10 +11862,10 @@ - + - - + + @@ -3069,21 +11875,21 @@ - + - + - + - + @@ -3094,10 +11900,10 @@ - + - - + + @@ -3107,21 +11913,21 @@ - + - + - + - + @@ -3132,10 +11938,10 @@ - + - - + + @@ -3145,21 +11951,21 @@ - + - + - + - + @@ -3170,10 +11976,10 @@ - + - - + + @@ -3183,21 +11989,21 @@ - + - + - + - + @@ -3208,10 +12014,10 @@ - + - - + + @@ -3221,21 +12027,21 @@ - + - + - + - + @@ -3246,10 +12052,10 @@ - + - - + + @@ -3259,21 +12065,21 @@ - + - + - + - + @@ -3284,10 +12090,10 @@ - + - - + + @@ -3297,21 +12103,21 @@ - + - + - + - + @@ -3322,10 +12128,10 @@ - + - - + + @@ -3335,25 +12141,21 @@ - + - + - + - + @@ -3364,10 +12166,10 @@ - + - - + + @@ -3377,21 +12179,21 @@ - + - + - + - + @@ -3402,10 +12204,10 @@ - + - - + + @@ -3415,21 +12217,21 @@ - + - + - + - + @@ -3440,10 +12242,10 @@ - + - - + + @@ -3453,21 +12255,21 @@ - + - + - + - + @@ -3478,10 +12280,10 @@ - + - - + + @@ -3491,21 +12293,21 @@ - + - + - + - + @@ -3516,10 +12318,10 @@ - + - - + + @@ -3529,21 +12331,21 @@ - + - + - + - + @@ -3554,10 +12356,10 @@ - + - - + + @@ -3567,21 +12369,21 @@ - + - + - + - + @@ -3592,10 +12394,10 @@ - + - - + + @@ -3605,21 +12407,21 @@ - + - + - + - + @@ -3630,10 +12432,10 @@ - + - - + + @@ -3643,21 +12445,21 @@ - + - + - + - + @@ -3668,10 +12470,10 @@ - + - - + + @@ -3681,21 +12483,21 @@ - + - + - + - + @@ -3706,10 +12508,10 @@ - + - - + + @@ -3719,21 +12521,21 @@ - + - + - + - + @@ -3744,10 +12546,10 @@ - + - - + + @@ -3757,21 +12559,21 @@ - + - + - + - + @@ -3782,10 +12584,10 @@ - + - - + + @@ -3795,21 +12597,21 @@ - + - + - + - + @@ -3820,10 +12622,10 @@ - + - - + + @@ -3833,21 +12635,21 @@ - + - + - + - + @@ -3858,10 +12660,10 @@ - + - - + + @@ -3871,21 +12673,21 @@ - + - + - + - + @@ -3896,10 +12698,10 @@ - + - - + + @@ -3909,21 +12711,21 @@ - + - + - + - + @@ -3934,10 +12736,10 @@ - + - - + + @@ -3947,21 +12749,21 @@ - + - + - + - + @@ -3972,10 +12774,10 @@ - + - - + + @@ -3985,21 +12787,21 @@ - + - + - + - + @@ -4010,10 +12812,10 @@ - + - - + + @@ -4023,21 +12825,21 @@ - + - + - + - + @@ -4048,10 +12850,10 @@ - + - - + + @@ -4061,21 +12863,21 @@ - + - + - + - + @@ -4086,10 +12888,10 @@ - + - - + + @@ -4099,21 +12901,21 @@ - + - + - + - + @@ -4124,10 +12926,10 @@ - + - - + + @@ -4137,21 +12939,21 @@ - + - + - + - + @@ -4162,10 +12964,10 @@ - + - - + + @@ -4175,21 +12977,21 @@ - + - + - + - + @@ -4200,10 +13002,10 @@ - + - - + + @@ -4213,21 +13015,21 @@ - + - + - + - + @@ -4238,10 +13040,10 @@ - + - - + + @@ -4251,21 +13053,21 @@ - + - + - + - + @@ -4276,10 +13078,10 @@ - + - - + + @@ -4289,21 +13091,21 @@ - + - + - + - + @@ -4314,10 +13116,10 @@ - + - - + + @@ -4327,21 +13129,21 @@ - + - + - + - + @@ -4352,10 +13154,10 @@ - + - - + + @@ -4365,21 +13167,21 @@ - + - + - + - + @@ -4390,10 +13192,10 @@ - + - - + + @@ -4403,21 +13205,21 @@ - + - + - + - + @@ -4428,10 +13230,10 @@ - + - - + + @@ -4441,21 +13243,21 @@ - + - + - + - + @@ -4466,10 +13268,10 @@ - + - - + + @@ -4479,21 +13281,21 @@ - + - + - + - + @@ -4504,10 +13306,10 @@ - + - - + + @@ -4517,21 +13319,21 @@ - + - + - + - + @@ -4542,10 +13344,10 @@ - + - - + + @@ -4555,21 +13357,21 @@ - + - + - + - + @@ -4580,10 +13382,10 @@ - + - - + + @@ -4593,21 +13395,21 @@ - + - + - + - + @@ -4618,10 +13420,10 @@ - + - - + + @@ -4631,21 +13433,21 @@ - + - + - + - + @@ -4656,10 +13458,10 @@ - + - - + + @@ -4669,21 +13471,21 @@ - + - + - + - + @@ -4694,10 +13496,10 @@ - + - - + + @@ -4707,21 +13509,21 @@ - + - + - + - + @@ -4732,10 +13534,10 @@ - + - - + + @@ -4745,21 +13547,21 @@ - + - + - + - + @@ -4770,10 +13572,10 @@ - + - - + + @@ -4783,21 +13585,21 @@ - + - + - + - + @@ -4808,10 +13610,10 @@ - + - - + + @@ -4821,21 +13623,21 @@ - + - + - + - + @@ -4846,10 +13648,10 @@ - + - - + + @@ -4859,21 +13661,21 @@ - + - + - + - + @@ -4884,10 +13686,10 @@ - + - - + + @@ -4897,923 +13699,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -5896,10 +13786,10 @@ - + - + @@ -5910,10 +13800,10 @@ - + - - + + @@ -5923,21 +13813,21 @@ - + - + - + - + @@ -5948,10 +13838,10 @@ - + - - + + @@ -5961,21 +13851,21 @@ - + - + - + - + @@ -5986,10 +13876,10 @@ - + - - + + @@ -5999,21 +13889,21 @@ - + - + - + - + @@ -6024,10 +13914,10 @@ - + - - + + @@ -6037,21 +13927,21 @@ - + - + - + - + @@ -6062,10 +13952,10 @@ - + - - + + @@ -6075,21 +13965,21 @@ - + - + - + - + @@ -6100,10 +13990,10 @@ - + - - + + @@ -6113,21 +14003,21 @@ - + - + - + - + @@ -6138,10 +14028,10 @@ - + - - + + @@ -6151,21 +14041,21 @@ - + - + - + - + @@ -6176,10 +14066,10 @@ - + - - + + @@ -6189,21 +14079,21 @@ - + - + - + - + @@ -6214,10 +14104,10 @@ - + - - + + @@ -6227,21 +14117,21 @@ - + - + - + - + @@ -6252,10 +14142,10 @@ - + - - + + @@ -6265,21 +14155,21 @@ - + - + - + - + @@ -6290,10 +14180,10 @@ - + - - + + @@ -6303,21 +14193,21 @@ - + - + - + - + @@ -6328,10 +14218,10 @@ - + - - + + @@ -6341,21 +14231,21 @@ - + - + - + - + @@ -6366,10 +14256,10 @@ - + - - + + @@ -6379,21 +14269,21 @@ - + - + - + - + @@ -6404,10 +14294,10 @@ - + - - + + @@ -6417,21 +14307,21 @@ - + - + - + - + @@ -6442,10 +14332,10 @@ - + - - + + @@ -6455,21 +14345,21 @@ - + - + - + - + @@ -6480,10 +14370,10 @@ - + - - + + @@ -6493,21 +14383,21 @@ - + - + - + - + @@ -6518,10 +14408,10 @@ - + - - + + @@ -6531,21 +14421,21 @@ - + - + - + - + @@ -6556,10 +14446,10 @@ - + - - + + @@ -6569,11 +14459,1747 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7016,10 +16642,10 @@ - + - + @@ -7030,10 +16656,10 @@ - + - - + + @@ -7043,2332 +16669,22 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -9472,7326 +16788,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -16802,14 +16802,14 @@ - + - + - - + + @@ -16819,7 +16819,521 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16834,15 +17348,5107 @@ - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16854,15 +22460,23 @@ - - + + + + + + + + + + - + @@ -16874,15 +22488,275 @@ - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16894,15 +22768,23 @@ - - + + + + + + + + + + - + @@ -16914,15 +22796,23 @@ - - + + + + + + + + + + - + @@ -16934,15 +22824,23 @@ - - + + + + + + + + + + - + @@ -16954,15 +22852,35 @@ - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -16970,19 +22888,519 @@ - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16990,19 +23408,411 @@ - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17010,19 +23820,199 @@ - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17030,19 +24020,39 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -17050,19 +24060,39 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -17070,19 +24100,79 @@ - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17090,19 +24180,39 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -17110,19 +24220,19 @@ - + - - + + - + @@ -17130,1017 +24240,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -18151,14 +24261,14 @@ - + - + - - + + @@ -18168,7 +24278,1715 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18184,14 +26002,42 @@ - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + @@ -18199,211 +26045,27 @@ - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -18411,17 +26073,213 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -18432,14 +26290,14 @@ - + - + - - + + @@ -18449,7 +26307,144 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18464,4020 +26459,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -22485,19 +26475,27 @@ - + + + + + + + + + - - + + - + @@ -22505,389 +26503,27 @@ - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -22895,53 +26531,717 @@ OK = Preferred appointment day NO = Day is not preferred"> - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -22952,14 +27252,14 @@ OK = Preferred appointment day NO = Day is not preferred"> - + - + - - + + @@ -22969,410 +27269,291 @@ OK = Preferred appointment day NO = Day is not preferred"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + - + - - + + + + + + + + + + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -24595,264 +28776,6 @@ OK = Preferred appointment day NO = Day is not preferred"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -25894,6 +29817,1729 @@ OK = Preferred appointment day NO = Day is not preferred"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -36208,1850 +41854,6 @@ Note: This can be applied to quantitative or qualitative observations."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -38616,10 +42418,10 @@ Note: This can be applied to quantitative or qualitative observations."> - + - + @@ -38630,759 +42432,14 @@ Note: This can be applied to quantitative or qualitative observations."> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -39392,40 +42449,116 @@ Note: This can be applied to quantitative or qualitative observations."> - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -39436,14 +42569,14 @@ Note: This can be applied to quantitative or qualitative observations."> - + - + - - + + @@ -39453,182 +42586,23 @@ Note: This can be applied to quantitative or qualitative observations."> - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -39639,24 +42613,25 @@ Note: This can be applied to quantitative or qualitative observations."> - + + - + - + - + @@ -39667,14 +42642,14 @@ Note: This can be applied to quantitative or qualitative observations."> - + - + - - + + @@ -39684,636 +42659,18 @@ Note: This can be applied to quantitative or qualitative observations."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -40321,189 +42678,19 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -40511,622 +42698,77 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + - + @@ -41137,14 +42779,14 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + - + - - + + @@ -41154,72 +42796,197 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - + - - + + + + + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + - + - + - - - - - - - - - + - + @@ -41230,14 +42997,14 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + - + - - + + @@ -41247,140 +43014,7 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -41396,277 +43030,571 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + - + - - + + + + + + + + + + - + - + - + - - + + + + + + + + + + - + - + - + - - + + + + + + + + + + - + - + - + - - + + + + + + + + + + - + - + - + - - + + - + - + - + - - + + - + - - - - - + + - + + + + + + + + + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - - - - - - - - - - - - - - - - + - + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -41677,1673 +43605,69 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + - + - + - - - - - - - - - - - - - - - - - + + + + + + + + + - + - + @@ -43354,14 +43678,14 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + - + - - + + @@ -43371,139 +43695,7 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -43518,39 +43710,43 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - - + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - + + - + @@ -43558,32 +43754,76 @@ In other words, UNICODE UTF-8 can only be specified as a single value in MSH-18 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + - + @@ -43591,31 +43831,27 @@ This is not for temporary names assigned at birth while a newborn is not yet nam - + + + + + + + + + - - - - - - - - - - - - - - + + - + @@ -43623,31 +43859,228 @@ This is not for temporary names assigned at birth while a newborn is not yet nam - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -43655,31 +44088,19 @@ This is not for temporary names assigned at birth while a newborn is not yet nam - + - - - - - - - - - - - - - - + + - + @@ -43687,51 +44108,19 @@ This is not for temporary names assigned at birth while a newborn is not yet nam - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -43739,33 +44128,19 @@ This is not for temporary names assigned at birth while a newborn is not yet nam - + - - - - - - - - - - - - - + - + @@ -43773,247 +44148,19 @@ An example of use is where a person with multiple proper names (i.e. married) us - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -44021,215 +44168,19 @@ Includes John or Jane Doe situations"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -44237,17 +44188,17 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - + - + - + @@ -44258,14 +44209,14 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - + - + - - + + @@ -44275,155 +44226,57 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + - + - + - - + + - + @@ -44431,83 +44284,32 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - + + - + @@ -44515,137 +44317,44 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + - - - - - - - - - - - - - - - - - + + - + @@ -44653,1309 +44362,92 @@ Retained for backwards compatibility only as of v2.7. Use "L" instead - + - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -45963,19 +44455,31 @@ Use Case: A nurse practitioner has authorization to furnish or prescribe pharmac - + - - + + + + + + + + + + + + + + - + @@ -45983,135 +44487,65 @@ Use Case: A nurse practitioner has authorization to furnish or prescribe pharmac - - - - - - - - - - - - - - - - - - - - - + - + - + - - + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -46119,31 +44553,57 @@ Use Case: A nurse practitioner has authorization to furnish or prescribe pharmac - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -46151,19 +44611,31 @@ Use Case: A nurse practitioner has authorization to furnish or prescribe pharmac - + - - + + + + + + + + + + + + + + - + @@ -46171,369 +44643,116 @@ Use Case: A nurse practitioner has authorization to furnish or prescribe pharmac - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -46541,164 +44760,36 @@ Use Case: Person is covered by an insurance policy. This person may or may not b - + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -46706,56 +44797,31 @@ Use Case: These license numbers are sometimes used as identifiers. In some state - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -46763,312 +44829,244 @@ Use Case: An ancillary system that does not normally assign medical record numbe - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -47076,127 +45074,125 @@ In the US, the Assigning Authority for this value is typically CMS, but it may b - + - + - + - - + + - + - + - + - - + + - + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -47204,35 +45200,58 @@ In the US, the Assigning Authority for this value is typically CMS, but it may b - + - - - - - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -47240,79 +45259,93 @@ In the US, the Assigning Authority for this value is typically CMS, but it may b - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -47320,56 +45353,50 @@ In the US, the Assigning Authority for this value is typically CMS, but it may b - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - + + - + @@ -47377,116 +45404,85 @@ Use case: This allows PRN to represent either an individual (a nurse) or a group - - - - - - - - - - - - - + - + - + - - + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -47494,165 +45490,183 @@ Use Case: An identifier type is needed to accommodate what are commonly known as - - - - - - - - - - - - - + - + - + - - + + + + + + + + + + - + - - - - - + - + - - + + - + - + - - - - - + - + - + - + + + + + + + + + - + - - - - - - + + - + - + - - - - - - - - - - - - - + + + + + + + + + - + + + + + + + + + + + + + - + - + @@ -47660,368 +45674,396 @@ Use Case: A person is the subscriber of an insurance policy. The person’s fami - + - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -48032,14 +46074,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -48049,38 +46091,18 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - + - + @@ -48088,19 +46110,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + @@ -48108,676 +46130,77 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - - - - + - + - + @@ -48788,14 +46211,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -48805,2780 +46228,38 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -51586,5822 +46267,11 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -57409,7 +46279,7 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + @@ -57421,15 +46291,15 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - + + - + @@ -57437,19 +46307,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + @@ -57457,19 +46327,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + @@ -57477,17 +46347,57 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -57498,14 +46408,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -57515,851 +46425,18 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -58367,19 +46444,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - + @@ -58387,735 +46464,804 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -59125,26 +47271,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - + - + @@ -59155,14 +47289,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -59172,78 +47306,30 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -59259,67 +47345,49 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + + + + + + + - + - - + + @@ -59329,212 +47397,30 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -59542,19 +47428,123 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -59562,19 +47552,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + - + @@ -59582,19 +47572,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - + @@ -59602,7 +47592,7 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + @@ -59625,6 +47615,54 @@ An identifier for a provider within the CMS/Medicare program. A globally unique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -59649,10 +47687,10 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + @@ -59663,14 +47701,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -59680,7 +47718,397 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -59702,18 +48130,6 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - @@ -59738,10 +48154,10 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + @@ -59752,14 +48168,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -59769,393 +48185,18 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -60163,19 +48204,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - + @@ -60183,19 +48224,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - + @@ -60203,47 +48244,7 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -60255,7 +48256,7 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + @@ -60268,14 +48269,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + @@ -60283,117 +48284,17 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -60404,14 +48305,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -60421,7 +48322,176 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -60436,375 +48506,27 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -60812,39 +48534,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -60852,239 +48554,127 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -61092,99 +48682,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -61192,4352 +48702,12 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -65548,23 +48718,123 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -65572,1794 +48842,71 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + - - - - - - - - - - + + - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - + - + - - + + @@ -67369,3128 +48916,52 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - + + - + - + - + @@ -70501,14 +48972,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -70518,1368 +48989,156 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - + - + - + - - - - - - - - - - - - - + - - + + - + - + - - - - - - - - - - - - - + - - + + - + - + - - - - - - - - - - - - - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + - + @@ -71890,14 +49149,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -71907,2410 +49166,11 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -74325,27 +49185,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + @@ -74353,27 +49205,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + @@ -74381,27 +49225,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + @@ -74409,27 +49245,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + @@ -74437,27 +49265,19 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - + + - + @@ -74465,53 +49285,17 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -74522,14 +49306,14 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - + - - + + @@ -74539,95 +49323,447 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -74638,5157 +49774,31 @@ An identifier for a provider within the CMS/Medicare program. A globally unique - - + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -79796,337 +49806,17 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -80137,14 +49827,14 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - + - + - - + + @@ -80154,121 +49844,7 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -80283,43 +49859,1108 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -80329,451 +50970,14 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -80784,158 +50988,14 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -80945,1933 +51005,18 @@ For example, under the tenets of certain privacy regulations, it is exclusive to - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -82879,19 +51024,19 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - + @@ -82899,19 +51044,19 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - + @@ -82919,19 +51064,19 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - + @@ -82939,7 +51084,727 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -86387,6 +55252,1908 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87399,10 +58166,10 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + @@ -87413,14 +58180,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -87430,232 +58197,54 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - + @@ -87663,19 +58252,180 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -87683,17 +58433,515 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -87704,14 +58952,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -87721,10 +58969,42 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87732,7 +59012,7 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + @@ -87744,15 +59024,15 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - - + + - + @@ -87760,19 +59040,31 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + + + + + + + + + + + + + - + @@ -87780,12 +59072,193 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87800,19 +59273,19 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + @@ -87820,19 +59293,19 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + @@ -87840,17 +59313,2742 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87861,14 +62059,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -87878,18 +62076,18 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + @@ -87897,37 +62095,1312 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + - + - + - + @@ -87938,14 +63411,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -87955,30 +63428,54 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87997,10 +63494,10 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + @@ -88011,14 +63508,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -88028,59 +63525,64 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + - + @@ -88091,14 +63593,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -88108,40 +63610,399 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -88152,14 +64013,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -88169,172 +64030,4206 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + - - + + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -88345,14 +68240,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -88362,56 +68257,76 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + - + - - - - - - + + - + - + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -88422,14 +68337,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -88439,50 +68354,14039 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -88596,51 +82500,6 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -89463,10 +83322,10 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + @@ -89477,14 +83336,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -89494,169 +83353,40 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + @@ -89667,14 +83397,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -89684,53 +83414,172 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + - - - - - + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -89741,14 +83590,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -89758,52 +83607,56 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - - - - + + + + + + + + + + - - - - - + + - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + - + - + @@ -89814,14 +83667,14 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - + - - + + @@ -89831,757 +83684,314 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -91592,2024 +85002,6 @@ Codes P, F, and S identify sets (batteries) and should be associated with an OM5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -99638,10 +91030,10 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + @@ -99652,17 +91044,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - + - + - - + + @@ -99672,164 +91061,7 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -99844,23 +91076,15 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - + + - - - - - - - - - + @@ -99868,27 +91092,55 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -99896,1343 +91148,19 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -101244,219 +91172,21 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + @@ -101467,14 +91197,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + - - - + + + @@ -101484,18 +91214,1059 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -101503,47 +92274,1581 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + - + - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104478,91 +96783,6 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -104632,333 +96852,6 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -105077,299 +96970,6 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -105571,103 +97171,6 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -105714,10 +97217,10 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + @@ -105728,14 +97231,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + - - + + @@ -105745,56 +97248,148 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - + + - + - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -105805,14 +97400,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + - - + + @@ -105822,79 +97417,34 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + - - - - - - - - @@ -105905,2525 +97455,149 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + @@ -108434,14 +97608,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + - - + + @@ -108451,345 +97625,40 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -108800,14 +97669,14 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - + - - + + @@ -108817,63 +97686,700 @@ Refer to Chapter 12 Patient Care for complete discussion."> - + - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - + + - - - - - - - - - - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -109097,1167 +98603,6 @@ Refer to Chapter 12 Patient Care for complete discussion."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -115792,123 +104137,6 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -116006,251 +104234,6 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -116313,10 +104296,10 @@ http://www.x12.org"> - + - + @@ -116327,14 +104310,14 @@ http://www.x12.org"> - + - + - - + + @@ -116344,196 +104327,40 @@ http://www.x12.org"> - + - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -116544,14 +104371,14 @@ http://www.x12.org"> - + - + - - + + @@ -116561,179 +104388,499 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -116741,57 +104888,1355 @@ http://www.x12.org"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + - + - + @@ -116802,14 +106247,14 @@ http://www.x12.org"> - + - + - - + + @@ -116819,148 +106264,52 @@ http://www.x12.org"> - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -116971,14 +106320,14 @@ http://www.x12.org"> - + - + - - + + @@ -116988,698 +106337,76 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - + - - + + + + + + - + - - + + + + + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117693,40 +106420,61 @@ http://www.x12.org"> - - + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + - + - + @@ -117737,14 +106485,14 @@ http://www.x12.org"> - + - + - - + + @@ -117754,18 +106502,18 @@ http://www.x12.org"> - + - - + + - + @@ -117773,19 +106521,19 @@ http://www.x12.org"> - + - - + + - + @@ -117793,19 +106541,19 @@ http://www.x12.org"> - + - - + + - + @@ -117813,19 +106561,19 @@ http://www.x12.org"> - + - - + + - + @@ -117833,19 +106581,19 @@ http://www.x12.org"> - + - - + + - + @@ -117853,533 +106601,57 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + - + @@ -118390,14 +106662,14 @@ http://www.x12.org"> - + - + - - + + @@ -118407,18 +106679,18 @@ http://www.x12.org"> - + - - + + - + @@ -118426,43 +106698,19 @@ http://www.x12.org"> - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -118470,19 +106718,19 @@ http://www.x12.org"> - + - - + + - + @@ -118490,70 +106738,97 @@ http://www.x12.org"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -118564,14 +106839,14 @@ http://www.x12.org"> - + - + - - + + @@ -118581,18 +106856,18 @@ http://www.x12.org"> - + - - + + - + @@ -118600,19 +106875,19 @@ http://www.x12.org"> - + - - + + - + @@ -118620,17 +106895,89 @@ http://www.x12.org"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -118641,14 +106988,14 @@ http://www.x12.org"> - + - + - - + + @@ -118658,18 +107005,18 @@ http://www.x12.org"> - + - - + + - + @@ -118677,23 +107024,644 @@ http://www.x12.org"> - + - - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -118701,17 +107669,41 @@ http://www.x12.org"> - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -118722,14 +107714,14 @@ http://www.x12.org"> - + - + - - + + @@ -118739,190 +107731,7 @@ http://www.x12.org"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -118937,1045 +107746,1955 @@ http://www.x12.org"> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + - + - - + + - + - + - + - - + + - + - - - - - - - - - - + - - + + - + - - - - - - - - - - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - - - - - - - - - - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + - + - - - - - - - - - + + - + - + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + - + - - + + + + + + + + + + - + - - + + + + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -119986,14 +109705,14 @@ E.g. Use in Care Plans,"> - + - + - - + + @@ -120003,31 +109722,8101 @@ E.g. Use in Care Plans,"> - + - - + + - - + + - - + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -120417,59 +118206,6 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -120552,10 +118288,10 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + @@ -120566,14 +118302,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -120583,52 +118319,93 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -120639,14 +118416,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -120656,565 +118433,40 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + + - + - + @@ -121225,14 +118477,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -121242,28 +118494,450 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + - + + + + + + + + - + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -121777,10 +119451,10 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + @@ -121791,14 +119465,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -121808,36 +119482,46 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - - + + - - + + + + + - - + + + + + - - + + - - + + + + + + - + - + @@ -121848,14 +119532,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -121865,28 +119549,153 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + @@ -121897,14 +119706,14 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - + - - + + @@ -121914,569 +119723,555 @@ For example, Decadron 0.5 mg is often ordered this way. The order would look li - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - + + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -124338,164 +122133,6 @@ In worker’s compensation cases, the Employer may be the “organization” res - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -124806,10 +122443,10 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - + @@ -124820,14 +122457,14 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - + - - + + @@ -124837,444 +122474,148 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -125285,14 +122626,14 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - + - - + + @@ -125302,413 +122643,3299 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - - + + - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + - + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -125719,14 +125946,14 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - + - - + + @@ -125736,294 +125963,169 @@ In worker’s compensation cases, the Employer may be the “organization” res - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -126031,9 +126133,210 @@ In worker’s compensation cases, the Employer may be the “organization” res - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -126729,287 +127032,6 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -127623,10 +127645,10 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - + - + @@ -127637,14 +127659,14 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - + - + - - + + @@ -127654,68 +127676,71 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - + - - + + - - + + - - + + - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + @@ -127726,14 +127751,14 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - + - + - - + + @@ -127743,180 +127768,155 @@ Note: Do not use NA if result code status is not corrected (revised) or if a pr - + - - + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml index d3beda92c04..95e0c14f0cb 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/v3-codesystems.xml @@ -1,14 +1,14 @@ - + - + - + @@ -22,10 +22,14 @@ - + + + + + - - + + @@ -36,22 +40,21 @@ - + - + - + - + @@ -65,14 +68,10 @@ Description does not make sense relative to name of coding system. Must be revi - - - - - + - - + + @@ -83,68 +82,22 @@ Description does not make sense relative to name of coding system. Must be revi - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -158,10 +111,14 @@ Description does not make sense relative to name of coding system. Must be revi - + + + + + - - + + @@ -172,21 +129,23 @@ Description does not make sense relative to name of coding system. Must be revi - + - + - + - + @@ -200,14 +159,14 @@ Description does not make sense relative to name of coding system. Must be revi - + - + - - + + @@ -218,21 +177,22 @@ Description does not make sense relative to name of coding system. Must be revi - + - + - + - + @@ -246,443 +206,14 @@ Description does not make sense relative to name of coding system. Must be revi - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -697,7 +228,7 @@ This is the healthcare analog to the US Intelligence Community's concept of a Sp - + @@ -747,10 +278,10 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + - + @@ -764,14 +295,10 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - - - - - + - - + + @@ -782,146 +309,11 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -974,262 +366,10 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1243,14 +383,14 @@ Structurally, many observations are name-value-pairs, where the Observation.code - + - + - - + + @@ -1261,23 +401,23 @@ Structurally, many observations are name-value-pairs, where the Observation.code - + - + - + - + - + @@ -1286,67 +426,13 @@ Structurally, many observations are name-value-pairs, where the Observation.code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -1357,42 +443,38 @@ Structurally, many observations are name-value-pairs, where the Observation.code - + - + - + - + - + - + - - - - - + - - + + @@ -1403,319 +485,22 @@ Structurally, many observations are name-value-pairs, where the Observation.code - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1729,10 +514,332 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1744,11 +851,147 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t +Missing Description"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1809,6 +1052,182 @@ Missing description."> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1856,113 +1275,10 @@ Missing description."> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1976,10 +1292,14 @@ Missing description."> - + + + + + - - + + @@ -1990,22 +1310,21 @@ Missing description."> - + - + - + - + @@ -2019,14 +1338,60 @@ Codes for HL7 publishing sections (major business categories)"> - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2041,64 +1406,17 @@ Codes for HL7 publishing sections (major business categories)"> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2112,14 +1430,10 @@ Codes for HL7 publishing sections (major business categories)"> - - - - - + - - + + @@ -2130,21 +1444,21 @@ Codes for HL7 publishing sections (major business categories)"> - + - + - + - + @@ -2158,14 +1472,102 @@ Codes for HL7 publishing sections (major business categories)"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2177,113 +1579,21 @@ Codes for HL7 publishing sections (major business categories)"> +Identifies the order in which content should be processed."> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2297,14 +1607,56 @@ Code that specifies whether an address part names the street, city, country, pos - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2319,701 +1671,7 @@ Code that specifies whether an address part names the street, city, country, pos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3062,10 +1720,10 @@ A textual value may be specified as the print name, or for non-coded messages, a - + - + @@ -3079,14 +1737,14 @@ A textual value may be specified as the print name, or for non-coded messages, a - + - + - - + + @@ -3097,619 +1755,11 @@ A textual value may be specified as the print name, or for non-coded messages, a - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3762,63 +1812,10 @@ Concepts that define the telecommunication capabilities of a particular device. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3832,14 +1829,10 @@ Concepts that define the telecommunication capabilities of a particular device. - - - - - + - - + + @@ -3850,23 +1843,23 @@ Concepts that define the telecommunication capabilities of a particular device. - + - + - + - + - + @@ -3875,33 +1868,1424 @@ Concepts that define the telecommunication capabilities of a particular device. - + + + + - + - - - + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3994,10 +3378,10 @@ Based on concepts for resolutions from HL7 ballot spreadsheet according to HL7's - + - + @@ -4011,14 +3395,14 @@ Based on concepts for resolutions from HL7 ballot spreadsheet according to HL7's - + - + - - + + @@ -4029,22 +3413,21 @@ Based on concepts for resolutions from HL7 ballot spreadsheet according to HL7's - + - + - + - + @@ -4058,10 +3441,14 @@ A set of codes advising a system or user which name in a set of names to select - + + + + + - - + + @@ -4072,2233 +3459,16 @@ A set of codes advising a system or user which name in a set of names to select - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -6347,10 +3517,10 @@ Codes to specify the scope in which the identifier applies to the object with wh - + - + @@ -6364,158 +3534,14 @@ Codes to specify the scope in which the identifier applies to the object with wh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -6530,17 +3556,17 @@ A task or action that a user may perform in a clinical information system."> - + - + - + @@ -6554,14 +3580,14 @@ A task or action that a user may perform in a clinical information system."> - + - + - - + + @@ -6572,1532 +3598,13 @@ A task or action that a user may perform in a clinical information system."> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -8151,6 +3658,597 @@ Description copied from Concept Domain of same name. Must be verified."> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8195,10 +4293,10 @@ Missing description."> - + - + @@ -8212,14 +4310,152 @@ Missing description."> - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8234,64 +4470,17 @@ Missing description."> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -8305,14 +4494,148 @@ Missing description."> - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8327,7 +4650,591 @@ Missing description."> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8379,6 +5286,636 @@ Missing description."> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8425,13 +5962,572 @@ Missing description."> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -8489,12 +6585,12 @@ Missing description."> - + - + - + @@ -8503,301 +6599,14 @@ Missing description."> - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -8807,15 +6616,15 @@ Missing description."> - + - + - + @@ -8823,12 +6632,12 @@ Missing description."> - + - + - + @@ -8837,107 +6646,14 @@ Missing description."> - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -8947,164 +6663,21 @@ Needs description"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + @@ -9112,31 +6685,28 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o - + - + - + - + - + - - - - + - + - - + + @@ -9146,15 +6716,15 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o - - + + - + - + @@ -9167,7 +6737,7 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o - + @@ -9208,13 +6778,107 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -9256,12 +6920,12 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o - + - + - + @@ -9270,62 +6934,14 @@ The type of consent directive, e.g., to consent or dissent to collect, access, o - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -9335,109 +6951,15 @@ Description copied from Concept Domain of same name. Must be verified. Note th - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -9450,7 +6972,7 @@ encrypt prohibit redisclosure without consent directive"> - + @@ -9498,12 +7020,12 @@ encrypt prohibit redisclosure without consent directive"> - + - + - + @@ -9512,44 +7034,93 @@ encrypt prohibit redisclosure without consent directive"> - - - - + - + - - - + + + - - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -9558,45 +7129,2711 @@ encrypt prohibit redisclosure without consent directive"> - - - - + - + - - - + + + - - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -9651,12 +9888,12 @@ This code system contains all HL7 artifacts of type TE (Trigger Event) that are - + - + - + @@ -9665,40 +9902,55 @@ This code system contains all HL7 artifacts of type TE (Trigger Event) that are - - - - - - - + + + + + + + + - - + - + - - + + - + + + + + + + + + + + + + + + + - + - + - + @@ -9707,45 +9959,43 @@ This code system contains all HL7 artifacts of type TE (Trigger Event) that are - - - - + - + - - - + + + - - + - + - - + + - + + + + - + - + - + @@ -9754,46 +10004,51 @@ Missing Description"> - - - - + - + - - + + - - + - + - - + + - + + + + + + + + + + + + - + - + - + @@ -9802,1834 +10057,44 @@ Description copied from Concept Domain of same name. Must be verified."> - - - - + + + + + - - + + - - + - + - - + + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11701,10 +10166,10 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + - + @@ -11714,14 +10179,14 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + - + - - + + @@ -11732,9 +10197,10 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + - + @@ -11743,6 +10209,192 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11750,5527 +10402,123 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -18718,11508 +11966,6 @@ Codes for concepts describing the approval level of HL7 artifacts. This code sy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -38350,6 +20096,3860 @@ the measure population as a narrative description (e.g., all patients seen in th + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -38675,10 +24275,10 @@ the measure population as a narrative description (e.g., all patients seen in th - + - + @@ -38688,14 +24288,14 @@ the measure population as a narrative description (e.g., all patients seen in th - + - + - - + + @@ -38706,262 +24306,60 @@ the measure population as a narrative description (e.g., all patients seen in th - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -39018,10 +24416,10 @@ Missing Description"> - + - + @@ -39031,14 +24429,14 @@ Missing Description"> - + - + - - + + @@ -39049,64 +24447,10 @@ Missing Description"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -39122,124 +24466,146 @@ Missing Description"> - - - + + + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1."> + + + + + + + + - - - - - - - - - - - - - - - - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - + @@ -39249,2354 +24615,14 @@ Missing Description"> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -41608,278 +24634,243 @@ Description copied from Concept Domain of same name. Must be verified. Note th +Code that specifies whether an address part names the street, city, country, postal code, post box, etc. Discussion: The hierarchical nature of these concepts shows composition. E.g. "Street Name" is part of "Street Address Line""> - + - - - - - - - - - + + + - - - + + + - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - + + + - - - + + + - - + + + + + + + - - + + + + + + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -41889,14 +24880,14 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + - + - - + + @@ -41907,31 +24898,241 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + @@ -43641,6 +26842,25450 @@ In spite of the inability of tooling to process codes longer than 2 characters, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47080,10 +55725,10 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + - + @@ -47093,14 +55738,14 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + - + - - + + @@ -47111,3046 +55756,34 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - + + - - - - - - - - - - - - + + - + - + @@ -50160,14 +55793,14 @@ A set of codes advising a system or user which name in a set of names to select - + - + - - + + @@ -50180,32 +55813,57 @@ A set of codes advising a system or user which name in a set of names to select - + + + + + + + - - - + + + + + + + + + + + + + + + + + - - - + + + - - - + + + + + + + + - + - + @@ -50215,14 +55873,14 @@ A set of codes advising a system or user which name in a set of names to select - + - + - - + + @@ -50233,9 +55891,1349 @@ A set of codes advising a system or user which name in a set of names to select - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -50244,18 +57242,33 @@ A set of codes advising a system or user which name in a set of names to select - - - + + + + + + + + + + + + + + + + + + - + - + @@ -50265,14 +57278,14 @@ A set of codes advising a system or user which name in a set of names to select - + - + - - + + @@ -50283,250 +57296,49 @@ A set of codes advising a system or user which name in a set of names to select - + - + - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + @@ -50536,14 +57348,14 @@ It appears that the printnames are suboptimal and should be improved for many of - + - + - - + + @@ -50555,42 +57367,44 @@ It appears that the printnames are suboptimal and should be improved for many of +Concepts that define the telecommunication capabilities of a particular device. Used to identify the expected capabilities to be found at a particular telecommunication address."> - + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + - + - + @@ -50600,14 +57414,14 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + - + - - + + @@ -50620,501 +57434,116 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Take basal body temperature on waking in establishing date of ovulation"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -51124,14 +57553,14 @@ fixing and completion of the hierarchy and proper good definitions of all the co - + - + - - + + @@ -51142,160 +57571,16 @@ fixing and completion of the hierarchy and proper good definitions of all the co - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -54195,10 +60480,10 @@ fixing and completion of the hierarchy and proper good definitions of all the co - + - + @@ -54208,14 +60493,14 @@ fixing and completion of the hierarchy and proper good definitions of all the co - + - + - - + + @@ -54227,6265 +60512,65 @@ fixing and completion of the hierarchy and proper good definitions of all the co +This code system contains all HL7 artifacts of type TE (Trigger Event) that are created by HL7 or its affiliates or their designates using the realm namespacing rules approved by HL7. Local implementations who create trigger events outside of these namespacing rules, (e.g. using the ZZ realm code) must register their own code system. The specific list of legal codes can be found by consulting the HL7 publications (editions, ballots, implementation guides, etc.) published by HL7 Inc. and by the various HL7 affiliates and their designates. Codes shall be expressed in upper case, with separator as shown in HL7 publications with no version id. E.g. PORX_TE123456UV."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -60731,10 +60816,10 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + - + @@ -60744,14 +60829,14 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + - + - - + + @@ -60762,140 +60847,55 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/valuesets.xml b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/valuesets.xml index 97ffd067eab..3d92fa179ca 100644 --- a/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/valuesets.xml +++ b/hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/valueset/valuesets.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -21,7 +21,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -738,13 +738,13 @@ - + - + @@ -788,13 +788,13 @@ - + - + @@ -839,24 +839,1796 @@ - + - + - + + - + + + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -868,40 +2640,6172 @@ - + - + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -912,17 +8816,388 @@ - + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -934,24 +9209,10379 @@ - + - + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -962,7 +19592,7 @@ - + @@ -978,12 +19608,12 @@ - + - + @@ -1123,249 +19753,157 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1377,34 +19915,90 @@ - + - + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + @@ -1415,7 +20009,7 @@ - + @@ -1432,7 +20026,7 @@ - + @@ -1487,625 +20081,12 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2119,288 +20100,180 @@ - + - + - - - + + + - - + + + + + + + + + + + + + - + - - - + + + - - - + + + + + + - - - + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - + + + - + @@ -2412,204 +20285,66 @@ - + - + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - + + + - + @@ -2621,1142 +20356,74 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3764,102 +20431,83 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + + + - - + - + - - - + + + - - - + + + + + + + + + + + + + - + - + - + - + - + - + - + - - - + + + - + @@ -3871,174 +20519,39 @@ - + - + - - - + + + - - - + + + - - - - - - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -4046,51 +20559,168 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + - - + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + @@ -4098,17 +20728,17 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + @@ -4120,60 +20750,739 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4187,17 +21496,17 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + @@ -4209,105 +21518,54 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + + + + - + - - - - + + + + - + @@ -4319,30 +21577,246 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4354,177 +21828,14 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -4534,91 +21845,199 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4629,7 +22048,7 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + @@ -4646,7 +22065,7 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + @@ -7645,13 +25064,4733 @@ Future versions of FHIR may make significant changes to Trial Use content that a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -7667,12 +29806,12 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + @@ -7712,64 +29851,12 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -7781,14 +29868,14 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + @@ -7798,25 +29885,6966 @@ Future versions of FHIR may make significant changes to Trial Use content that a - - + + + + + + + + - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7827,7 +36855,7 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + @@ -7843,12 +36871,12 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + @@ -7928,32 +36956,24 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - + - - - - - - - - - - + - + - - - + + + + @@ -7965,2585 +36985,2864 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10554,7 +39853,7 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + @@ -10570,12 +39869,12 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + @@ -10650,76 +39949,33 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - + - + - + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -10731,145 +39987,35 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -10880,17 +40026,17 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + @@ -10902,69 +40048,178 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + - - + + - + - + - + - + - - - - + - + - + - + - - - - + + + + - + @@ -10976,45 +40231,69 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + + + + - + - - - + + + @@ -11024,155 +40303,136 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - - + + - - - - - - - + + - - - - - - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - + + + - - - + + + + + + + + - + - + - + - + @@ -11180,48 +40440,981 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + - - + - + - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11233,14 +41426,14 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + @@ -11250,47 +41443,202 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + - + + + + + + + + + + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11302,39 +41650,262 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - + - + - - - + + + + + + + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11342,63 +41913,68 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - + + + + + + - + - + - - - + + + - + - + - + - + - + - + - + - - - + + + - + @@ -11410,52 +41986,66 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + - + - + - + - + + + + + + + + + + - + - - - + + + - + @@ -11467,25 +42057,106 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11494,19 +42165,19 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - + - - - + + + - + @@ -11518,1794 +42189,34 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -13316,7 +42227,7 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + @@ -13334,12 +42245,12 @@ Future versions of FHIR may make significant changes to Trial Use content that a - + - + @@ -18169,1175 +47080,15 @@ The primary difference between a medicationusage and a medicationadministration - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -19348,17 +47099,16 @@ The primary difference between a medicationusage and a medicationadministration - - - - - - - - + + + + + + + - + @@ -19370,4718 +47120,49 @@ The primary difference between a medicationusage and a medicationadministration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + - - - - - - - - + + + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -24093,25 +47174,9 @@ The primary difference between a medicationusage and a medicationadministration - + - - - - - - - - - - - - - - - - @@ -24121,7 +47186,7 @@ The primary difference between a medicationusage and a medicationadministration - + @@ -24139,12 +47204,12 @@ The primary difference between a medicationusage and a medicationadministration - + - + @@ -24184,11 +47249,26 @@ The primary difference between a medicationusage and a medicationadministration + + + + + + + + + + + + + + + @@ -24219,6 +47299,11 @@ The primary difference between a medicationusage and a medicationadministration + + + + + @@ -24308,6 +47393,11 @@ The primary difference between a medicationusage and a medicationadministration + + + + + @@ -24432,6 +47522,11 @@ The primary difference between a medicationusage and a medicationadministration + + + + + @@ -24488,1747 +47583,13 @@ The primary difference between a medicationusage and a medicationadministration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -26243,7 +47604,7 @@ or intervention but are still being followed according to the primary objective - + @@ -26341,6238 +47702,19 @@ or intervention but are still being followed according to the primary objective - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -32750,301 +47892,95 @@ A specific time might or might not be pre-allocated."> - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -33052,4471 +47988,33 @@ A specific time might or might not be pre-allocated."> - - - - - - - - + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -37527,7 +48025,7 @@ responding, withdrawal, non-compliance and/or adverse event."> - + @@ -37601,1658 +48099,13 @@ responding, withdrawal, non-compliance and/or adverse event."> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -39401,1673 +48254,20 @@ responding, withdrawal, non-compliance and/or adverse event."> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + @@ -41076,4910 +48276,102 @@ responding, withdrawal, non-compliance and/or adverse event."> - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -45990,7 +48382,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -63285,7 +65677,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -63297,7 +65689,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -63464,1347 +65856,286 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - + + + - + - + - + - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - + + - + + + + + - + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -64815,19 +66146,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -64917,91 +66248,24 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - + - - - - - - - - - - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -65013,148 +66277,47 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - - - - + + - - - + + - - - + + - - - - - - - - + + - + - + - - + - - - - - - - - - - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -65166,64 +66329,52 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - - - - - - - - - - - - - + - + - - - - + + + + - + @@ -65235,54 +66386,42 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - + - + - + - - - - - - - - - - - - - + - + - - - - + + + + - + @@ -65294,997 +66433,381 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + - + - + - - + - - - - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - + - + - - - + + + - + @@ -66296,283 +66819,90 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - + + + - + - + - + - - + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + - - - - - - - - - - - - - + - + - - - - + + + + - + @@ -66584,56 +66914,57 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - - - + + + + + + + + + + + + + - + - + - + - - - - - - - - - - + - + - - - + + + - + @@ -66645,71 +66976,42 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + - - - - - - - - - - + - + - - - + + + - + @@ -66721,727 +67023,52 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - + - - - - - - - - - - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -67453,51 +67080,152 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - + - + - - - + + + - + @@ -67509,423 +67237,403 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - - + + + - + - - + - + - - - + + + - - - + + + - - - + + + + + + + + - + - + - + - - - - - - - - - - + - + - - - + + + - + @@ -67937,71 +67645,295 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - + + + - + - + - - + - - - - - - - - - - + - + - - - + + + + @@ -68013,6 +67945,48 @@ Spelling note: "descendant" is a more correct spelling, but the spelli + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -68023,207 +67997,258 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - - - + + + - - - + + + - - - + + + + + + + + + + + + + - + - + - - + - - - - - - - - - - + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -68234,7 +68259,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -68245,7 +68270,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -68313,7 +68338,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -68324,7 +68349,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -68365,13 +68390,13 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -68406,14 +68431,14 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -68551,14 +68576,14 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -68783,7 +68808,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -68792,7 +68817,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74268,13 +74293,13 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74314,13 +74339,13 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74364,7 +74389,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74373,7 +74398,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74400,13 +74425,13 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74461,7 +74486,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74478,12 +74503,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74507,7 +74532,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74524,12 +74549,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74562,7 +74587,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74573,12 +74598,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74606,7 +74631,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74617,12 +74642,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74649,7 +74674,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74666,12 +74691,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74695,7 +74720,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74712,12 +74737,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74760,7 +74785,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74777,12 +74802,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74806,7 +74831,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74826,12 +74851,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74859,7 +74884,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74870,12 +74895,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74903,7 +74928,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74920,12 +74945,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74957,7 +74982,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -74968,12 +74993,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -74997,7 +75022,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75014,12 +75039,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75047,7 +75072,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75058,12 +75083,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75087,7 +75112,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75104,12 +75129,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75134,7 +75159,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75151,12 +75176,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75184,7 +75209,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75201,12 +75226,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75230,7 +75255,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75247,12 +75272,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75277,7 +75302,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75294,12 +75319,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75323,7 +75348,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75340,12 +75365,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75373,7 +75398,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75390,12 +75415,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75423,7 +75448,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75440,12 +75465,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75470,7 +75495,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75487,12 +75512,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75520,7 +75545,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75537,12 +75562,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75567,7 +75592,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75584,12 +75609,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75617,7 +75642,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75634,12 +75659,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75674,7 +75699,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75694,12 +75719,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75727,7 +75752,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75744,12 +75769,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75779,7 +75804,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75790,12 +75815,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75823,7 +75848,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75834,12 +75859,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75867,7 +75892,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75884,12 +75909,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75917,7 +75942,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75934,12 +75959,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -75963,7 +75988,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -75974,12 +75999,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76032,7 +76057,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76049,12 +76074,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76079,7 +76104,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76096,12 +76121,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76129,7 +76154,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76146,12 +76171,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76179,7 +76204,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76190,12 +76215,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76223,7 +76248,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76236,19 +76261,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -76276,7 +76301,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76293,12 +76318,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76326,7 +76351,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76343,12 +76368,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76376,7 +76401,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76393,12 +76418,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76426,7 +76451,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76443,12 +76468,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76496,7 +76521,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76513,12 +76538,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76547,7 +76572,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76564,12 +76589,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76597,7 +76622,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76614,12 +76639,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76647,7 +76672,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76664,12 +76689,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76694,7 +76719,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76711,12 +76736,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76741,7 +76766,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76758,12 +76783,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76791,7 +76816,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76808,12 +76833,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76841,7 +76866,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76858,12 +76883,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76887,7 +76912,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76898,12 +76923,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76931,7 +76956,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76948,12 +76973,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -76981,7 +77006,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -76998,12 +77023,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77027,7 +77052,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77038,12 +77063,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77071,7 +77096,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77094,12 +77119,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77127,7 +77152,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77138,12 +77163,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77170,7 +77195,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77190,12 +77215,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77223,7 +77248,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77240,12 +77265,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77270,7 +77295,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77287,12 +77312,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77317,7 +77342,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77334,12 +77359,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77364,7 +77389,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77381,12 +77406,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77414,7 +77439,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77431,12 +77456,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77464,7 +77489,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77475,12 +77500,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77508,7 +77533,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77525,12 +77550,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77558,7 +77583,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77575,12 +77600,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77604,7 +77629,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77621,12 +77646,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77670,7 +77695,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77681,12 +77706,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77711,7 +77736,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77728,12 +77753,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77761,7 +77786,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77778,12 +77803,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77812,7 +77837,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77829,12 +77854,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77859,7 +77884,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77876,12 +77901,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77909,7 +77934,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77926,12 +77951,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77959,7 +77984,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -77970,12 +77995,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -77998,7 +78023,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -78009,12 +78034,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -78042,7 +78067,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -78059,12 +78084,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -78092,7 +78117,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -78103,12 +78128,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103740,7 +103765,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103751,12 +103776,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103780,7 +103805,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103797,12 +103822,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103830,7 +103855,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103841,12 +103866,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103871,7 +103896,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103888,12 +103913,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103918,7 +103943,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103935,12 +103960,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -103968,7 +103993,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -103985,12 +104010,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104014,7 +104039,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104025,12 +104050,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104054,7 +104079,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104071,12 +104096,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104104,7 +104129,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104127,12 +104152,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104160,7 +104185,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104171,12 +104196,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104204,7 +104229,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104224,12 +104249,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104257,7 +104282,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104268,12 +104293,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104305,7 +104330,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104322,12 +104347,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104355,7 +104380,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104372,12 +104397,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104402,7 +104427,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104419,12 +104444,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104452,7 +104477,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104469,12 +104494,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104543,7 +104568,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104554,12 +104579,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104589,7 +104614,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104606,12 +104631,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104640,7 +104665,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104657,12 +104682,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104690,7 +104715,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104707,12 +104732,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104737,7 +104762,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104748,12 +104773,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104836,7 +104861,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104847,12 +104872,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104876,7 +104901,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104893,12 +104918,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -104926,7 +104951,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -104943,12 +104968,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105005,7 +105030,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105022,12 +105047,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105055,7 +105080,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105072,12 +105097,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105105,7 +105130,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105116,12 +105141,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105235,7 +105260,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105252,12 +105277,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105304,7 +105329,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105315,12 +105340,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105348,7 +105373,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105368,12 +105393,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105401,7 +105426,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105418,12 +105443,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105919,7 +105944,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105939,12 +105964,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -105972,7 +105997,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -105989,12 +106014,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106072,7 +106097,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106089,7 +106114,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106174,7 +106199,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106191,12 +106216,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106224,7 +106249,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106241,7 +106266,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106274,7 +106299,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106291,12 +106316,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106324,7 +106349,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106341,12 +106366,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106374,7 +106399,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106391,12 +106416,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106424,7 +106449,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106441,12 +106466,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106471,7 +106496,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106488,12 +106513,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106547,7 +106572,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106564,12 +106589,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106597,7 +106622,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106614,12 +106639,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106647,7 +106672,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106664,12 +106689,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106697,7 +106722,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106714,12 +106739,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106747,7 +106772,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106758,12 +106783,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106796,7 +106821,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106807,12 +106832,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106837,7 +106862,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106854,7 +106879,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106883,7 +106908,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106900,12 +106925,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106934,7 +106959,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106945,12 +106970,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -106978,7 +107003,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -106995,12 +107020,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107028,7 +107053,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107045,12 +107070,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107086,7 +107111,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107103,12 +107128,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107137,7 +107162,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107154,12 +107179,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107188,7 +107213,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107205,12 +107230,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107238,7 +107263,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107249,12 +107274,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107278,7 +107303,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107295,12 +107320,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107328,7 +107353,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107345,7 +107370,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107377,7 +107402,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107394,12 +107419,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107458,7 +107483,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107469,12 +107494,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107557,7 +107582,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107574,12 +107599,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107607,7 +107632,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107624,12 +107649,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107647,13 +107672,59 @@ Spelling note: "descendant" is a more correct spelling, but the spelli + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -107670,12 +107741,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107699,7 +107770,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107710,12 +107781,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107743,7 +107814,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107760,12 +107831,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107789,7 +107860,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107800,12 +107871,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107837,7 +107908,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107854,12 +107925,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107883,7 +107954,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107903,12 +107974,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107936,7 +108007,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -107956,12 +108027,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -107989,7 +108060,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108006,12 +108077,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108226,7 +108297,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108237,12 +108308,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108270,7 +108341,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108287,12 +108358,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108487,7 +108558,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108504,12 +108575,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108534,7 +108605,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108551,12 +108622,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108581,7 +108652,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108592,12 +108663,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108626,7 +108697,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108643,12 +108714,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108672,7 +108743,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108692,12 +108763,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108802,7 +108873,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108822,12 +108893,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108855,7 +108926,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108869,12 +108940,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -108950,7 +109021,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -108967,12 +109038,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109020,7 +109091,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109037,12 +109108,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109070,7 +109141,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109087,12 +109158,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109116,7 +109187,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109133,12 +109204,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109193,7 +109264,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109210,12 +109281,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109243,7 +109314,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109260,12 +109331,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109293,7 +109364,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109310,12 +109381,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109395,7 +109466,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109412,12 +109483,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109445,7 +109516,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109456,12 +109527,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109486,7 +109557,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109497,12 +109568,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109525,7 +109596,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109536,12 +109607,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109569,7 +109640,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109586,12 +109657,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109619,7 +109690,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109630,12 +109701,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109659,7 +109730,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109676,12 +109747,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109709,7 +109780,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109726,12 +109797,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109756,7 +109827,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109773,12 +109844,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109806,7 +109877,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109823,12 +109894,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109857,7 +109928,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109868,12 +109939,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109898,7 +109969,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109915,12 +109986,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109948,7 +110019,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -109959,12 +110030,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -109988,7 +110059,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110008,12 +110079,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110041,7 +110112,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110058,12 +110129,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110087,7 +110158,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110104,12 +110175,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110133,7 +110204,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110150,12 +110221,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110179,7 +110250,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110190,12 +110261,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110218,7 +110289,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110241,12 +110312,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110274,7 +110345,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110291,12 +110362,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110324,7 +110395,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110341,12 +110412,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110371,7 +110442,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110382,12 +110453,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110440,7 +110511,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110457,12 +110528,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110485,7 +110556,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110502,12 +110573,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110535,7 +110606,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110552,12 +110623,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110585,7 +110656,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110596,12 +110667,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110629,7 +110700,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110649,12 +110720,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110682,7 +110753,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110693,12 +110764,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110734,7 +110805,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110745,12 +110816,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110775,7 +110846,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110792,12 +110863,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110822,7 +110893,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110833,12 +110904,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -110861,7 +110932,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -110878,12 +110949,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111227,7 +111298,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111238,12 +111309,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111271,7 +111342,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111288,12 +111359,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111316,7 +111387,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111333,12 +111404,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111366,7 +111437,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111386,12 +111457,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111419,7 +111490,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111430,12 +111501,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111463,7 +111534,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111480,12 +111551,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111545,7 +111616,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111562,12 +111633,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111595,7 +111666,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111612,12 +111683,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111645,7 +111716,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111665,7 +111736,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111740,7 +111811,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111754,12 +111825,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111793,7 +111864,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111810,12 +111881,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111840,7 +111911,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111857,12 +111928,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -111890,7 +111961,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111907,7 +111978,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -111995,7 +112066,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112006,12 +112077,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112036,7 +112107,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112047,12 +112118,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112076,7 +112147,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112087,12 +112158,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112138,7 +112209,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112155,12 +112226,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112188,7 +112259,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112205,12 +112276,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112238,7 +112309,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112255,12 +112326,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112285,7 +112356,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112302,12 +112373,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112332,7 +112403,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112349,12 +112420,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112382,7 +112453,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112399,12 +112470,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112432,7 +112503,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112443,12 +112514,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112476,7 +112547,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112493,12 +112564,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112522,7 +112593,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112533,12 +112604,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112566,7 +112637,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112583,12 +112654,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112615,7 +112686,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112632,12 +112703,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112665,7 +112736,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112682,12 +112753,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112715,7 +112786,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112732,12 +112803,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112769,7 +112840,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112789,7 +112860,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112824,7 +112895,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112841,12 +112912,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112874,7 +112945,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112885,12 +112956,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112913,7 +112984,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112930,12 +113001,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -112960,7 +113031,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -112977,12 +113048,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113010,7 +113081,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113027,7 +113098,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113064,7 +113135,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113081,12 +113152,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113115,7 +113186,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113132,12 +113203,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113165,7 +113236,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113182,12 +113253,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113215,7 +113286,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113232,12 +113303,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113261,7 +113332,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113278,7 +113349,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113320,7 +113391,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113337,12 +113408,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113370,7 +113441,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113387,12 +113458,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113420,7 +113491,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113431,12 +113502,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113473,7 +113544,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113490,12 +113561,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113523,7 +113594,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113540,7 +113611,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113573,7 +113644,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113593,12 +113664,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113626,7 +113697,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113643,12 +113714,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113672,7 +113743,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113689,12 +113760,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113735,7 +113806,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113752,12 +113823,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113785,7 +113856,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113802,12 +113873,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113831,7 +113902,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113848,12 +113919,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113881,7 +113952,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113896,12 +113967,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113925,7 +113996,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113942,12 +114013,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -113973,7 +114044,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -113984,12 +114055,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114012,7 +114083,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114029,12 +114100,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114062,7 +114133,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114079,12 +114150,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114109,7 +114180,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114129,12 +114200,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114162,7 +114233,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114173,12 +114244,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114206,7 +114277,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114217,12 +114288,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114274,7 +114345,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114285,12 +114356,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114315,7 +114386,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114326,12 +114397,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114355,7 +114426,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114375,12 +114446,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114408,7 +114479,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114419,7 +114490,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114452,7 +114523,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114469,12 +114540,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114502,7 +114573,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114519,12 +114590,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114552,7 +114623,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114569,12 +114640,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114599,7 +114670,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114616,12 +114687,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114665,7 +114736,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114676,12 +114747,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114709,7 +114780,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114720,7 +114791,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114777,7 +114848,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114794,12 +114865,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114827,7 +114898,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114838,12 +114909,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -114982,7 +115053,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -114993,12 +115064,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115027,7 +115098,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115044,12 +115115,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115092,7 +115163,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115109,12 +115180,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115142,7 +115213,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115159,12 +115230,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115192,7 +115263,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115209,12 +115280,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115242,7 +115313,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115259,12 +115330,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115289,7 +115360,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115306,12 +115377,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115339,7 +115410,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115350,12 +115421,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115380,7 +115451,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115403,12 +115474,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115442,7 +115513,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115460,12 +115531,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115490,7 +115561,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115501,7 +115572,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115534,7 +115605,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115545,7 +115616,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115578,7 +115649,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115595,12 +115666,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115628,7 +115699,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115645,12 +115716,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115678,7 +115749,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115695,12 +115766,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115724,7 +115795,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115741,12 +115812,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115771,7 +115842,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115788,12 +115859,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115843,7 +115914,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115860,12 +115931,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115929,7 +116000,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115946,12 +116017,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -115980,7 +116051,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -115997,12 +116068,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116027,7 +116098,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116044,12 +116115,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116113,7 +116184,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116130,12 +116201,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116163,7 +116234,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116183,12 +116254,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116216,7 +116287,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116233,12 +116304,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116266,7 +116337,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116277,12 +116348,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116318,7 +116389,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116335,12 +116406,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116365,7 +116436,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116385,12 +116456,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116418,7 +116489,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116435,12 +116506,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116468,7 +116539,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116485,12 +116556,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116515,7 +116586,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116532,12 +116603,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116565,7 +116636,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116585,12 +116656,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116618,7 +116689,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116635,12 +116706,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116677,7 +116748,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116694,12 +116765,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116727,7 +116798,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116744,12 +116815,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116777,7 +116848,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116797,12 +116868,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116825,7 +116896,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116845,12 +116916,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116879,7 +116950,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116896,12 +116967,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116929,7 +117000,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116946,12 +117017,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -116979,7 +117050,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -116996,12 +117067,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117029,7 +117100,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117046,12 +117117,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117079,7 +117150,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117090,12 +117161,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117125,7 +117196,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117142,12 +117213,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117172,7 +117243,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117189,12 +117260,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117223,7 +117294,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117234,12 +117305,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117263,7 +117334,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117280,12 +117351,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117313,7 +117384,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117330,12 +117401,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117359,7 +117430,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117370,12 +117441,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117403,7 +117474,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117420,12 +117491,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117453,7 +117524,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117470,12 +117541,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117503,7 +117574,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117520,12 +117591,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117554,7 +117625,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117571,12 +117642,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117604,7 +117675,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117615,12 +117686,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117644,7 +117715,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117657,19 +117728,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -117697,7 +117768,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117714,12 +117785,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117748,7 +117819,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117761,19 +117832,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -117801,7 +117872,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117818,12 +117889,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -117847,7 +117918,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -117864,12 +117935,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118022,7 +118093,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118039,12 +118110,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118072,7 +118143,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118089,12 +118160,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118122,7 +118193,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118139,12 +118210,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118172,7 +118243,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118189,12 +118260,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118222,7 +118293,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118233,7 +118304,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118266,7 +118337,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118283,12 +118354,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118316,7 +118387,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118333,12 +118404,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118366,7 +118437,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118383,12 +118454,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118413,7 +118484,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118424,12 +118495,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118456,7 +118527,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118473,12 +118544,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118506,7 +118577,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118523,12 +118594,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118552,7 +118623,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118569,12 +118640,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118779,7 +118850,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118790,12 +118861,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118826,7 +118897,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118843,12 +118914,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118886,7 +118957,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118903,12 +118974,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118937,7 +119008,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -118954,12 +119025,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -118987,7 +119058,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119004,12 +119075,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119056,7 +119127,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119073,12 +119144,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119114,7 +119185,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119131,12 +119202,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119161,7 +119232,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119181,12 +119252,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119214,7 +119285,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119231,12 +119302,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119261,7 +119332,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119278,12 +119349,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119323,7 +119394,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119340,12 +119411,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119369,7 +119440,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119386,12 +119457,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119415,7 +119486,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119432,12 +119503,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119465,7 +119536,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119485,12 +119556,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119514,7 +119585,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119525,12 +119596,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119574,7 +119645,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119591,12 +119662,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119624,7 +119695,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119641,12 +119712,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119674,7 +119745,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119691,12 +119762,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119721,7 +119792,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119738,12 +119809,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119788,7 +119859,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119805,12 +119876,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119838,7 +119909,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119849,12 +119920,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119882,7 +119953,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119902,12 +119973,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -119930,7 +120001,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -119947,12 +120018,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120024,7 +120095,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120035,12 +120106,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120064,7 +120135,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120081,12 +120152,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120126,7 +120197,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120143,12 +120214,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120177,7 +120248,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120194,12 +120265,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120223,7 +120294,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120240,12 +120311,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120274,7 +120345,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120291,12 +120362,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120323,7 +120394,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120334,12 +120405,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120380,7 +120451,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120397,12 +120468,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120427,7 +120498,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120444,12 +120515,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120478,7 +120549,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120489,12 +120560,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120522,7 +120593,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120539,12 +120610,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120579,7 +120650,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120599,12 +120670,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120660,7 +120731,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120677,12 +120748,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120706,7 +120777,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120723,12 +120794,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -120756,7 +120827,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120769,19 +120840,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -120809,7 +120880,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -120820,12 +120891,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130329,7 +130400,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130346,12 +130417,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130379,7 +130450,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130390,12 +130461,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130492,7 +130563,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130503,12 +130574,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130536,7 +130607,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130547,12 +130618,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130583,7 +130654,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130600,12 +130671,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130630,7 +130701,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130644,12 +130715,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130686,7 +130757,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130697,12 +130768,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130726,7 +130797,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130746,12 +130817,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130779,7 +130850,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130799,12 +130870,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130832,7 +130903,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130852,12 +130923,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130885,7 +130956,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -130896,12 +130967,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -130991,7 +131062,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131008,12 +131079,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131038,7 +131109,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131049,12 +131120,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131082,7 +131153,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131102,12 +131173,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131135,7 +131206,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131152,12 +131223,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131185,7 +131256,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131196,12 +131267,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131229,7 +131300,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131246,12 +131317,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131279,7 +131350,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131291,12 +131362,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131374,7 +131445,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131391,12 +131462,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131424,7 +131495,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131441,12 +131512,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131474,7 +131545,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131491,12 +131562,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131521,7 +131592,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131538,12 +131609,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131567,7 +131638,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131587,12 +131658,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131620,7 +131691,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131637,12 +131708,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131667,7 +131738,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131684,12 +131755,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131714,7 +131785,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131731,12 +131802,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131760,7 +131831,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131777,12 +131848,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131810,7 +131881,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131827,12 +131898,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131860,7 +131931,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131877,12 +131948,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131910,7 +131981,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131927,12 +131998,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -131983,7 +132054,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -131994,12 +132065,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132023,7 +132094,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132043,12 +132114,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132087,7 +132158,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132104,12 +132175,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132137,7 +132208,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132154,12 +132225,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132188,7 +132259,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132200,12 +132271,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132244,7 +132315,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132261,12 +132332,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132291,7 +132362,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132308,12 +132379,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132342,7 +132413,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132359,12 +132430,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132388,7 +132459,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132405,12 +132476,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132438,7 +132509,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132449,12 +132520,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132486,7 +132557,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132499,19 +132570,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -132539,7 +132610,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132556,12 +132627,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132585,7 +132656,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132596,12 +132667,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132629,7 +132700,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132640,12 +132711,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132669,7 +132740,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132686,12 +132757,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132719,7 +132790,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132730,12 +132801,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132759,7 +132830,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132776,12 +132847,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132806,7 +132877,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132817,12 +132888,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132850,7 +132921,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132861,12 +132932,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132891,7 +132962,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132908,12 +132979,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132937,7 +133008,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -132954,12 +133025,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -132987,7 +133058,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133004,12 +133075,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133037,7 +133108,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133048,12 +133119,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133077,7 +133148,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133094,12 +133165,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133127,7 +133198,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133144,12 +133215,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133173,7 +133244,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133190,12 +133261,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133224,7 +133295,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133241,12 +133312,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133270,7 +133341,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133287,12 +133358,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133317,7 +133388,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133334,12 +133405,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133363,7 +133434,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133383,7 +133454,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133631,7 +133702,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133642,12 +133713,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133671,7 +133742,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133688,12 +133759,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133718,7 +133789,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133735,12 +133806,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133790,7 +133861,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133807,12 +133878,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133840,7 +133911,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133854,12 +133925,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133888,7 +133959,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133899,12 +133970,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133928,7 +133999,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133945,12 +134016,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -133978,7 +134049,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -133995,12 +134066,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134024,7 +134095,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134041,12 +134112,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134071,7 +134142,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134088,12 +134159,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134117,7 +134188,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134130,19 +134201,19 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + @@ -134170,7 +134241,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134187,12 +134258,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134220,7 +134291,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134237,12 +134308,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134293,7 +134364,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134310,12 +134381,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134339,7 +134410,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134350,12 +134421,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134383,7 +134454,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134400,12 +134471,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134433,7 +134504,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134450,12 +134521,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134479,7 +134550,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134496,12 +134567,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134529,7 +134600,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134546,12 +134617,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134579,7 +134650,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134590,12 +134661,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134625,7 +134696,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134642,12 +134713,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134675,7 +134746,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134692,12 +134763,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134725,7 +134796,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134736,12 +134807,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134769,7 +134840,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134786,12 +134857,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134863,7 +134934,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134874,7 +134945,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134907,7 +134978,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134924,12 +134995,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -134953,7 +135024,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -134970,12 +135041,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135003,7 +135074,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135023,12 +135094,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135056,7 +135127,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135073,12 +135144,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135123,7 +135194,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135140,12 +135211,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135173,7 +135244,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135190,12 +135261,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135219,7 +135290,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135236,12 +135307,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135269,7 +135340,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135286,12 +135357,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135319,7 +135390,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135339,12 +135410,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135372,7 +135443,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135389,12 +135460,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135419,7 +135490,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135439,12 +135510,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135472,7 +135543,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135489,12 +135560,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135518,7 +135589,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135538,12 +135609,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135571,7 +135642,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135588,7 +135659,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135651,7 +135722,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135668,12 +135739,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135704,7 +135775,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135715,12 +135786,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135743,7 +135814,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135754,12 +135825,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135822,7 +135893,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135833,12 +135904,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135862,7 +135933,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135873,12 +135944,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135906,7 +135977,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135917,12 +135988,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135946,7 +136017,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -135957,12 +136028,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -135990,7 +136061,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136001,12 +136072,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136034,7 +136105,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136051,12 +136122,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136081,7 +136152,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136098,12 +136169,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136128,7 +136199,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136139,12 +136210,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136168,7 +136239,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136185,12 +136256,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136214,7 +136285,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136231,12 +136302,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136264,7 +136335,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136275,12 +136346,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136303,7 +136374,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136314,12 +136385,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136352,7 +136423,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136369,12 +136440,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136399,7 +136470,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136419,12 +136490,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136453,7 +136524,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136470,12 +136541,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136503,7 +136574,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136523,12 +136594,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136555,7 +136626,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136572,12 +136643,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136602,7 +136673,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136619,12 +136690,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136653,7 +136724,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136670,12 +136741,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136703,7 +136774,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136720,12 +136791,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136753,7 +136824,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136770,12 +136841,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136803,7 +136874,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136826,12 +136897,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -136908,7 +136979,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -136925,12 +136996,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137011,7 +137082,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137028,12 +137099,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137061,7 +137132,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137078,12 +137149,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137108,7 +137179,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137119,12 +137190,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137149,7 +137220,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137166,12 +137237,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137199,7 +137270,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137216,12 +137287,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137306,7 +137377,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137323,7 +137394,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137356,7 +137427,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137376,12 +137447,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137409,7 +137480,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137426,12 +137497,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137459,7 +137530,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137476,7 +137547,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137509,7 +137580,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137526,12 +137597,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137559,7 +137630,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137576,12 +137647,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137609,7 +137680,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137626,12 +137697,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137676,7 +137747,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137687,12 +137758,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137744,7 +137815,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137764,12 +137835,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137797,7 +137868,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137814,12 +137885,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137847,7 +137918,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137864,12 +137935,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137897,7 +137968,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137917,12 +137988,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -137976,7 +138047,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -137993,12 +138064,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138028,7 +138099,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138045,12 +138116,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138079,7 +138150,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138096,12 +138167,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138125,7 +138196,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138142,12 +138213,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138171,7 +138242,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138188,12 +138259,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138221,7 +138292,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138244,12 +138315,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138279,7 +138350,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138299,12 +138370,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138332,7 +138403,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138349,12 +138420,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138378,7 +138449,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138395,12 +138466,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138428,7 +138499,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138445,12 +138516,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138476,7 +138547,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138493,12 +138564,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138526,7 +138597,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138537,12 +138608,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138567,7 +138638,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138584,7 +138655,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138617,7 +138688,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138637,12 +138708,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138678,7 +138749,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138695,12 +138766,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138751,7 +138822,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138768,12 +138839,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138801,7 +138872,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138812,12 +138883,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138845,7 +138916,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138865,12 +138936,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138898,7 +138969,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138909,12 +138980,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138942,7 +139013,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -138959,12 +139030,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -138992,7 +139063,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139009,12 +139080,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139042,7 +139113,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139053,12 +139124,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139086,7 +139157,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139106,12 +139177,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139139,7 +139210,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139156,12 +139227,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139186,7 +139257,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139197,12 +139268,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139226,7 +139297,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139243,12 +139314,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139273,7 +139344,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139290,12 +139361,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139320,7 +139391,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139337,12 +139408,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139370,7 +139441,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139381,12 +139452,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139414,7 +139485,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139431,12 +139502,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139460,7 +139531,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139477,12 +139548,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139510,7 +139581,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139527,12 +139598,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139560,7 +139631,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139577,7 +139648,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139682,7 +139753,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139699,12 +139770,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139728,7 +139799,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139745,12 +139816,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139778,7 +139849,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139789,12 +139860,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139822,7 +139893,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139833,7 +139904,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139866,7 +139937,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139877,12 +139948,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139910,7 +139981,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139927,12 +139998,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -139960,7 +140031,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -139977,12 +140048,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140010,7 +140081,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140027,12 +140098,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140057,7 +140128,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140074,12 +140145,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140104,7 +140175,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140121,12 +140192,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140155,7 +140226,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140172,12 +140243,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140205,7 +140276,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140222,12 +140293,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140255,7 +140326,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140266,12 +140337,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -140299,7 +140370,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -140316,7 +140387,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143144,7 +143215,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143161,12 +143232,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143191,7 +143262,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143202,12 +143273,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143232,7 +143303,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143249,12 +143320,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143278,7 +143349,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143295,12 +143366,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143329,7 +143400,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143349,12 +143420,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143382,7 +143453,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143399,7 +143470,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143438,7 +143509,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143455,12 +143526,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143485,7 +143556,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143502,12 +143573,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143536,7 +143607,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143553,12 +143624,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143586,7 +143657,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143606,12 +143677,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143639,7 +143710,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143656,7 +143727,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143703,7 +143774,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143720,12 +143791,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143750,7 +143821,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143770,12 +143841,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143803,7 +143874,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143820,12 +143891,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143860,7 +143931,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143871,12 +143942,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143905,7 +143976,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143922,12 +143993,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -143955,7 +144026,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -143972,12 +144043,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144046,7 +144117,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144066,12 +144137,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144099,7 +144170,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144116,12 +144187,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144149,7 +144220,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144166,12 +144237,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144199,7 +144270,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144216,12 +144287,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144249,7 +144320,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144266,12 +144337,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144324,7 +144395,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144341,12 +144412,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144374,7 +144445,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144391,12 +144462,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144421,7 +144492,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144438,12 +144509,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144471,7 +144542,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144488,12 +144559,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144521,7 +144592,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144538,12 +144609,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144571,7 +144642,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144588,12 +144659,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144622,7 +144693,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144645,12 +144716,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144683,7 +144754,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144700,12 +144771,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144738,7 +144809,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144755,12 +144826,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144784,7 +144855,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144804,12 +144875,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144837,7 +144908,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144848,12 +144919,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144877,7 +144948,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144894,12 +144965,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144923,7 +144994,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144940,12 +145011,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -144969,7 +145040,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -144986,12 +145057,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145019,7 +145090,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145036,12 +145107,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145065,7 +145136,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145082,12 +145153,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145111,7 +145182,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145128,12 +145199,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145157,7 +145228,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145174,12 +145245,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145204,7 +145275,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145221,12 +145292,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145262,7 +145333,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145279,12 +145350,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145312,7 +145383,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145329,12 +145400,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145358,7 +145429,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145375,12 +145446,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145408,7 +145479,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145425,12 +145496,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145458,7 +145529,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145469,12 +145540,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145518,7 +145589,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145535,12 +145606,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145568,7 +145639,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145579,12 +145650,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145612,7 +145683,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145629,12 +145700,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145662,7 +145733,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145679,12 +145750,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145712,7 +145783,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145732,12 +145803,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145765,7 +145836,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145782,12 +145853,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145815,7 +145886,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145832,12 +145903,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145877,7 +145948,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145894,12 +145965,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145924,7 +145995,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145941,12 +146012,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -145975,7 +146046,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -145986,12 +146057,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146016,29 +146087,29 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + - + - + - + @@ -146066,7 +146137,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146086,12 +146157,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146119,7 +146190,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146130,12 +146201,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146159,7 +146230,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146176,12 +146247,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146209,7 +146280,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146226,12 +146297,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146255,7 +146326,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146272,12 +146343,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146305,7 +146376,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146322,12 +146393,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146355,7 +146426,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146372,7 +146443,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146407,7 +146478,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146424,12 +146495,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146457,7 +146528,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146474,12 +146545,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146523,7 +146594,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146534,12 +146605,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146567,7 +146638,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146578,12 +146649,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146611,7 +146682,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146628,12 +146699,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146657,7 +146728,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146674,12 +146745,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146703,7 +146774,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146714,12 +146785,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146784,7 +146855,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146801,12 +146872,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146831,7 +146902,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146848,12 +146919,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146877,7 +146948,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146894,12 +146965,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146927,7 +146998,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146944,12 +147015,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -146973,7 +147044,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -146984,12 +147055,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147031,7 +147102,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147048,12 +147119,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147081,7 +147152,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147101,12 +147172,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147221,7 +147292,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147232,12 +147303,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147265,7 +147336,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147282,12 +147353,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147315,7 +147386,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147335,7 +147406,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147378,7 +147449,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147398,7 +147469,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147646,7 +147717,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147663,12 +147734,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -147693,7 +147764,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -147711,12 +147782,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148032,7 +148103,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148049,12 +148120,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148083,7 +148154,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148100,12 +148171,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148142,7 +148213,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148162,12 +148233,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148195,7 +148266,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148212,12 +148283,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148246,7 +148317,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148263,12 +148334,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148306,7 +148377,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148317,12 +148388,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148350,7 +148421,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148361,12 +148432,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148394,7 +148465,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148411,12 +148482,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148452,7 +148523,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148469,12 +148540,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148515,7 +148586,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148532,12 +148603,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148573,7 +148644,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148584,12 +148655,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148617,7 +148688,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148634,12 +148705,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148662,7 +148733,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148679,12 +148750,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148764,7 +148835,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148775,12 +148846,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148804,7 +148875,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148821,12 +148892,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -148854,7 +148925,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -148871,12 +148942,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149045,7 +149116,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149062,12 +149133,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149091,7 +149162,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149108,12 +149179,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149138,7 +149209,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149155,12 +149226,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149185,7 +149256,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149199,12 +149270,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149238,7 +149309,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149255,12 +149326,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149283,7 +149354,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149294,12 +149365,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149327,7 +149398,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149338,12 +149409,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149367,7 +149438,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149384,12 +149455,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149417,7 +149488,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149434,12 +149505,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149508,7 +149579,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149519,12 +149590,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149547,7 +149618,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149564,12 +149635,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149598,7 +149669,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149618,12 +149689,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149651,7 +149722,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149662,12 +149733,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149690,7 +149761,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149707,12 +149778,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149736,7 +149807,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149753,12 +149824,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149786,7 +149857,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149803,7 +149874,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149836,7 +149907,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149847,12 +149918,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149896,7 +149967,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149913,12 +149984,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149946,7 +150017,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -149966,12 +150037,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -149994,7 +150065,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -150011,12 +150082,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150044,7 +150115,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -150061,12 +150132,12 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150090,10 +150161,10 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150125,10 +150196,10 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150160,11 +150231,11 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150196,10 +150267,10 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -150266,11 +150337,11 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -151529,11 +151600,11 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -152556,11 +152627,11 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + - + @@ -152592,7 +152663,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + @@ -152607,7 +152678,7 @@ Spelling note: "descendant" is a more correct spelling, but the spelli - + diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 751a3b721ee..8fe9898edcb 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -31,6 +31,11 @@ org.hl7.fhir.validation ${fhir_core_version} + + ca.uhn.hapi.fhir + org.hl7.fhir.utilities + ${fhir_core_version} + com.github.ben-manes.caffeine @@ -41,6 +46,15 @@ jsr305 + + + com.google.code.gson + gson + + diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseStaticResourceValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseStaticResourceValidationSupport.java new file mode 100644 index 00000000000..6ef2b5966d0 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseStaticResourceValidationSupport.java @@ -0,0 +1,27 @@ +package org.hl7.fhir.common.hapi.validation.support; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public abstract class BaseStaticResourceValidationSupport extends BaseValidationSupport implements IValidationSupport { + + /** + * Constructor + */ + protected BaseStaticResourceValidationSupport(FhirContext theFhirContext) { + super(theFhirContext); + } + + @SuppressWarnings("unchecked") + static List toList(Map theMap) { + ArrayList retVal = new ArrayList<>(theMap.values()); + return (List) Collections.unmodifiableList(retVal); + } + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupport.java new file mode 100644 index 00000000000..adc638150fb --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupport.java @@ -0,0 +1,22 @@ +package org.hl7.fhir.common.hapi.validation.support; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; +import org.apache.commons.lang3.Validate; + +public abstract class BaseValidationSupport implements IValidationSupport { + protected final FhirContext myCtx; + + /** + * Constructor + */ + public BaseValidationSupport(FhirContext theFhirContext) { + Validate.notNull(theFhirContext, "theFhirContext must not be null"); + myCtx = theFhirContext; + } + + @Override + public FhirContext getFhirContext() { + return myCtx; + } +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupportWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupportWrapper.java new file mode 100644 index 00000000000..380aedfef9b --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/BaseValidationSupportWrapper.java @@ -0,0 +1,102 @@ +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.ValueSetExpansionOptions; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import javax.annotation.Nonnull; +import java.util.List; + +/** + * This class is a wrapper for an existing {@link @IContextValidationSupport} object, intended to be + * subclassed in order to layer functionality on top of the existing validation support object. + * + * @since 5.0.0 + */ +public class BaseValidationSupportWrapper extends BaseValidationSupport { + private final IValidationSupport myWrap; + + /** + * Constructor + * + * @param theFhirContext The FhirContext object (must be initialized for the appropriate FHIR version) + * @param theWrap The validation support object to wrap + */ + public BaseValidationSupportWrapper(FhirContext theFhirContext, IValidationSupport theWrap) { + super(theFhirContext); + Validate.notNull(theWrap, "theWrap must not be null"); + + myWrap = theWrap; + } + + @Override + public List fetchAllConformanceResources() { + return myWrap.fetchAllConformanceResources(); + } + + @Override + public List fetchAllStructureDefinitions() { + return myWrap.fetchAllStructureDefinitions(); + } + + @Override + public T fetchResource(Class theClass, String theUri) { + return myWrap.fetchResource(theClass, theUri); + } + + @Override + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + return myWrap.isCodeSystemSupported(myWrap, 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); + } + + @Override + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return myWrap.lookupCode(theRootValidationSupport, theSystem, theCode); + } + + @Override + public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) { + return myWrap.isValueSetSupported(myWrap, theValueSetUrl); + } + + @Override + public IValidationSupport.ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { + return myWrap.expandValueSet(theRootValidationSupport, null, theValueSetToExpand); + } + + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + return myWrap.fetchCodeSystem(theSystem); + } + + @Override + public IBaseResource fetchValueSet(String theUri) { + return myWrap.fetchValueSet(theUri); + } + + + @Override + public IBaseResource fetchStructureDefinition(String theUrl) { + return myWrap.fetchStructureDefinition(theUrl); + } + + @Override + public IBaseResource generateSnapshot(IValidationSupport theRootValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) { + return myWrap.generateSnapshot(theRootValidationSupport, 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); + } + + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java new file mode 100644 index 00000000000..423bf0221be --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java @@ -0,0 +1,104 @@ +package org.hl7.fhir.common.hapi.validation.support; + +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; + +@SuppressWarnings("unchecked") +public class CachingValidationSupport extends BaseValidationSupportWrapper implements IValidationSupport { + + private static final Logger ourLog = LoggerFactory.getLogger(CachingValidationSupport.class); + private final Cache myCache; + private final Cache myValidateCodeCache; + private final Cache myLookupCodeCache; + + + public CachingValidationSupport(IValidationSupport theWrap) { + super(theWrap.getFhirContext(), theWrap); + myValidateCodeCache = Caffeine + .newBuilder() + .expireAfterWrite(60, TimeUnit.SECONDS) + .maximumSize(5000) + .build(); + myLookupCodeCache = Caffeine + .newBuilder() + .expireAfterWrite(60, TimeUnit.SECONDS) + .maximumSize(5000) + .build(); + myCache = Caffeine + .newBuilder() + .expireAfterWrite(60, TimeUnit.SECONDS) + .maximumSize(5000) + .build(); + } + + @Override + public List fetchAllConformanceResources() { + String key = "fetchAllConformanceResources"; + return loadFromCache(myCache, key, t -> super.fetchAllConformanceResources()); + } + + @Override + public List fetchAllStructureDefinitions() { + String key = "fetchAllStructureDefinitions"; + return loadFromCache(myCache, key, t -> super.fetchAllStructureDefinitions()); + } + + @Override + public T fetchResource(Class theClass, String theUri) { + return loadFromCache(myCache, "fetchResource " + theClass.getName() + " " + theUri, + t -> super.fetchResource(theClass, theUri)); + } + + @Override + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + String key = "isCodeSystemSupported " + theSystem; + Boolean retVal = loadFromCache(myCache, key, t -> super.isCodeSystemSupported(theRootValidationSupport, theSystem)); + assert retVal != null; + return retVal; + } + + @Override + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, 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)); + } + + @Override + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + String key = "lookupCode " + theSystem + " " + theCode; + return loadFromCache(myLookupCodeCache, key, t -> super.lookupCode(theRootValidationSupport, theSystem, theCode)); + } + + @SuppressWarnings("OptionalAssignedToNull") + @Nullable + private T loadFromCache(Cache theCache, String theKey, Function theLoader) { + ourLog.trace("Fetching from cache: {}", theKey); + + Function> loaderWrapper = key -> Optional.ofNullable(theLoader.apply(theKey)); + Optional result = (Optional) theCache.get(theKey, loaderWrapper); + assert result != null; + + return result.orElse(null); + + } + + @Override + public void invalidateCaches() { + myLookupCodeCache.invalidateAll(); + myCache.invalidateAll(); + myValidateCodeCache.invalidateAll(); + } +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyService.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyService.java new file mode 100644 index 00000000000..9d564af8aa4 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CommonCodeSystemsTerminologyService.java @@ -0,0 +1,187 @@ +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 org.apache.commons.lang3.Validate; +import org.hl7.fhir.dstu2.model.ValueSet; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import javax.annotation.Nonnull; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * This {@link IValidationSupport validation support module} can be used to validate codes against common + * CodeSystems that are commonly used, but are not distriuted with the FHIR specification for various reasons + * (size, complexity, etc.). + *

    + * See CommonCodeSystemsTerminologyService in the HAPI FHIR documentation + * for details about what is and isn't covered by this class. + *

    + */ +public class CommonCodeSystemsTerminologyService implements IValidationSupport { + public static final String LANGUAGES_VALUESET_URL = "http://hl7.org/fhir/ValueSet/languages"; + public static final String MIMETYPES_VALUESET_URL = "http://hl7.org/fhir/ValueSet/mimetypes"; + private static final String USPS_CODESYSTEM_URL = "https://www.usps.com/"; + private static final String USPS_VALUESET_URL = "http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state"; + private static Map USPS_CODES = Collections.unmodifiableMap(buildUspsCodes()); + + + private final FhirContext myFhirContext; + + /** + * Constructor + */ + public CommonCodeSystemsTerminologyService(FhirContext theFhirContext) { + Validate.notNull(theFhirContext); + + myFhirContext = theFhirContext; + } + + @Override + public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { + String url = getValueSetUrl(theValueSet); + + /* ************************************************************************************** + * NOTE: Update validation_support_modules.html if any of the support in this module + * changes in any way! + * **************************************************************************************/ + + boolean handled = false; + if (USPS_VALUESET_URL.equals(url)) { + handled = true; + String display = USPS_CODES.get(theCode); + if (display != null) { + if (USPS_CODESYSTEM_URL.equals(theCodeSystem) || theOptions.isInferSystem()) { + return new CodeValidationResult() + .setCode(theCode) + .setDisplay(display); + } + } + } + + // This is a pretty naive implementation - Will be enhanced in future + if (LANGUAGES_VALUESET_URL.equals(url)) { + return new CodeValidationResult() + .setCode(theCode) + .setDisplay(theDisplay); + } + + // This is a pretty naive implementation - Will be enhanced in future + if (MIMETYPES_VALUESET_URL.equals(url)) { + return new CodeValidationResult() + .setCode(theCode) + .setDisplay(theDisplay); + } + + if (handled) { + return new CodeValidationResult() + .setSeverity(IssueSeverity.ERROR) + .setMessage("Code \"" + theCode + "\" is not in system: " + USPS_CODESYSTEM_URL); + } + + return null; + } + + public String getValueSetUrl(@Nonnull IBaseResource theValueSet) { + String url; + switch (getFhirContext().getVersion().getVersion()) { + case DSTU2: { + url = ((ca.uhn.fhir.model.dstu2.resource.ValueSet) theValueSet).getUrl(); + break; + } + case DSTU2_HL7ORG: { + url = ((ValueSet) theValueSet).getUrl(); + break; + } + case DSTU3: { + url = ((org.hl7.fhir.dstu3.model.ValueSet) theValueSet).getUrl(); + break; + } + case R4: { + url = ((org.hl7.fhir.r4.model.ValueSet) theValueSet).getUrl(); + break; + } + case R5: { + url = ((org.hl7.fhir.r5.model.ValueSet) theValueSet).getUrl(); + break; + } + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + getFhirContext().getVersion().getVersion()); + } + return url; + } + + @Override + public FhirContext getFhirContext() { + return myFhirContext; + } + + private static HashMap buildUspsCodes() { + HashMap uspsCodes = new HashMap<>(); + uspsCodes.put("AK", "Alaska"); + uspsCodes.put("AL", "Alabama"); + uspsCodes.put("AR", "Arkansas"); + uspsCodes.put("AS", "American Samoa"); + uspsCodes.put("AZ", "Arizona"); + uspsCodes.put("CA", "California"); + uspsCodes.put("CO", "Colorado"); + uspsCodes.put("CT", "Connecticut"); + uspsCodes.put("DC", "District of Columbia"); + uspsCodes.put("DE", "Delaware"); + uspsCodes.put("FL", "Florida"); + uspsCodes.put("FM", "Federated States of Micronesia"); + uspsCodes.put("GA", "Georgia"); + uspsCodes.put("GU", "Guam"); + uspsCodes.put("HI", "Hawaii"); + uspsCodes.put("IA", "Iowa"); + uspsCodes.put("ID", "Idaho"); + uspsCodes.put("IL", "Illinois"); + uspsCodes.put("IN", "Indiana"); + uspsCodes.put("KS", "Kansas"); + uspsCodes.put("KY", "Kentucky"); + uspsCodes.put("LA", "Louisiana"); + uspsCodes.put("MA", "Massachusetts"); + uspsCodes.put("MD", "Maryland"); + uspsCodes.put("ME", "Maine"); + uspsCodes.put("MH", "Marshall Islands"); + uspsCodes.put("MI", "Michigan"); + uspsCodes.put("MN", "Minnesota"); + uspsCodes.put("MO", "Missouri"); + uspsCodes.put("MP", "Northern Mariana Islands"); + uspsCodes.put("MS", "Mississippi"); + uspsCodes.put("MT", "Montana"); + uspsCodes.put("NC", "North Carolina"); + uspsCodes.put("ND", "North Dakota"); + uspsCodes.put("NE", "Nebraska"); + uspsCodes.put("NH", "New Hampshire"); + uspsCodes.put("NJ", "New Jersey"); + uspsCodes.put("NM", "New Mexico"); + uspsCodes.put("NV", "Nevada"); + uspsCodes.put("NY", "New York"); + uspsCodes.put("OH", "Ohio"); + uspsCodes.put("OK", "Oklahoma"); + uspsCodes.put("OR", "Oregon"); + uspsCodes.put("PA", "Pennsylvania"); + uspsCodes.put("PR", "Puerto Rico"); + uspsCodes.put("PW", "Palau"); + uspsCodes.put("RI", "Rhode Island"); + uspsCodes.put("SC", "South Carolina"); + uspsCodes.put("SD", "South Dakota"); + uspsCodes.put("TN", "Tennessee"); + uspsCodes.put("TX", "Texas"); + uspsCodes.put("UM", "U.S. Minor Outlying Islands"); + uspsCodes.put("UT", "Utah"); + uspsCodes.put("VA", "Virginia"); + uspsCodes.put("VI", "Virgin Islands of the U.S."); + uspsCodes.put("VT", "Vermont"); + uspsCodes.put("WA", "Washington"); + uspsCodes.put("WI", "Wisconsin"); + uspsCodes.put("WV", "West Virginia"); + uspsCodes.put("WY", "Wyoming"); + return uspsCodes; + } +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java new file mode 100644 index 00000000000..0b608ede8b1 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/InMemoryTerminologyServerValidationSupport.java @@ -0,0 +1,496 @@ +package org.hl7.fhir.common.hapi.validation.support; + +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.ValueSetExpansionOptions; +import ca.uhn.fhir.util.VersionIndependentConcept; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.convertors.conv10_50.ValueSet10_50; +import org.hl7.fhir.convertors.conv30_50.CodeSystem30_50; +import org.hl7.fhir.convertors.conv30_50.ValueSet30_50; +import org.hl7.fhir.convertors.conv40_50.CodeSystem40_50; +import org.hl7.fhir.convertors.conv40_50.ValueSet40_50; +import org.hl7.fhir.dstu2.model.ValueSet; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.hl7.fhir.r5.model.CanonicalType; +import org.hl7.fhir.r5.model.CodeSystem; +import org.hl7.fhir.utilities.validation.ValidationMessage; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +/** + * This class is a basic in-memory terminology service, designed to expand ValueSets and validate codes + * completely in-memory. It is suitable for runtime validation purposes where no dedicated terminology + * service exists (either an internal one such as the HAPI FHIR JPA terminology service, or an + * external term service API) + */ +public class InMemoryTerminologyServerValidationSupport implements IValidationSupport { + private final FhirContext myCtx; + + public InMemoryTerminologyServerValidationSupport(FhirContext theCtx) { + Validate.notNull(theCtx, "theCtx must not be null"); + myCtx = theCtx; + } + + @Override + public FhirContext getFhirContext() { + return myCtx; + } + + @Override + public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { + + org.hl7.fhir.r5.model.ValueSet expansionR5 = expandValueSetToCanonical(theRootValidationSupport, theValueSetToExpand); + if (expansionR5 == null) { + return null; + } + + IBaseResource expansion; + switch (myCtx.getVersion().getVersion()) { + case DSTU2_HL7ORG: { + expansion = ValueSet10_50.convertValueSet(expansionR5); + break; + } + case DSTU3: { + expansion = ValueSet30_50.convertValueSet(expansionR5); + break; + } + case R4: { + expansion = ValueSet40_50.convertValueSet(expansionR5); + break; + } + case R5: { + expansion = expansionR5; + break; + } + case DSTU2: + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + myCtx.getVersion().getVersion()); + } + + return new ValueSetExpansionOutcome(expansion, null); + } + + private org.hl7.fhir.r5.model.ValueSet expandValueSetToCanonical(IValidationSupport theRootValidationSupport, IBaseResource theValueSetToExpand) { + org.hl7.fhir.r5.model.ValueSet expansionR5; + switch (myCtx.getVersion().getVersion()) { + case DSTU2: + case DSTU2_HL7ORG: { + expansionR5 = expandValueSetDstu2Hl7Org(theRootValidationSupport, (ValueSet) theValueSetToExpand); + break; + } + case DSTU3: { + expansionR5 = expandValueSetDstu3(theRootValidationSupport, (org.hl7.fhir.dstu3.model.ValueSet) theValueSetToExpand); + break; + } + case R4: { + expansionR5 = expandValueSetR4(theRootValidationSupport, (org.hl7.fhir.r4.model.ValueSet) theValueSetToExpand); + break; + } + case R5: { + expansionR5 = expandValueSetR5(theRootValidationSupport, (org.hl7.fhir.r5.model.ValueSet) theValueSetToExpand); + break; + } + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + myCtx.getVersion().getVersion()); + } + + if (expansionR5 == null) { + return null; + } + return expansionR5; + } + + @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); + if (expansion == null) { + return null; + } + return validateCodeInExpandedValueSet(theRootValidationSupport, theOptions, theCodeSystem, theCode, expansion); + } + + + @Override + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + IBaseResource vs; + if (isNotBlank(theValueSetUrl)) { + vs = theRootValidationSupport.fetchValueSet(theValueSetUrl); + if (vs == null) { + return null; + } + } else { + switch (myCtx.getVersion().getVersion()) { + case DSTU2_HL7ORG: + vs = new org.hl7.fhir.dstu2.model.ValueSet() + .setCompose(new org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent() + .addInclude(new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent().setSystem(theCodeSystem))); + break; + case DSTU3: + vs = new org.hl7.fhir.dstu3.model.ValueSet() + .setCompose(new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent() + .addInclude(new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent().setSystem(theCodeSystem))); + break; + case R4: + vs = new org.hl7.fhir.r4.model.ValueSet() + .setCompose(new org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent() + .addInclude(new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent().setSystem(theCodeSystem))); + break; + case R5: + vs = new org.hl7.fhir.r5.model.ValueSet() + .setCompose(new org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent() + .addInclude(new org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent().setSystem(theCodeSystem))); + break; + case DSTU2: + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + myCtx.getVersion().getVersion()); + } + } + + ValueSetExpansionOutcome valueSetExpansionOutcome = expandValueSet(theRootValidationSupport, null, vs); + if (valueSetExpansionOutcome == null) { + return null; + } + + IBaseResource expansion = valueSetExpansionOutcome.getValueSet(); + + return validateCodeInExpandedValueSet(theRootValidationSupport, theOptions, theCodeSystem, theCode, expansion); + + } + + private CodeValidationResult validateCodeInExpandedValueSet(IValidationSupport theRootValidationSupport, 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); + if (system == null) { + return null; + } + } + + List codes = new ArrayList<>(); + switch (theExpansion.getStructureFhirVersionEnum()) { + case DSTU2_HL7ORG: { + ValueSet expansionVs = (ValueSet) theExpansion; + List contains = expansionVs.getExpansion().getContains(); + flattenAndConvertCodesDstu2(contains, codes); + break; + } + case DSTU3: { + org.hl7.fhir.dstu3.model.ValueSet expansionVs = (org.hl7.fhir.dstu3.model.ValueSet) theExpansion; + List contains = expansionVs.getExpansion().getContains(); + flattenAndConvertCodesDstu3(contains, codes); + break; + } + case R4: { + org.hl7.fhir.r4.model.ValueSet expansionVs = (org.hl7.fhir.r4.model.ValueSet) theExpansion; + List contains = expansionVs.getExpansion().getContains(); + flattenAndConvertCodesR4(contains, codes); + break; + } + case R5: { + org.hl7.fhir.r5.model.ValueSet expansionVs = (org.hl7.fhir.r5.model.ValueSet) theExpansion; + List contains = expansionVs.getExpansion().getContains(); + flattenAndConvertCodesR5(contains, codes); + break; + } + case DSTU2: + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + myCtx.getVersion().getVersion()); + } + + String codeSystemName = null; + String codeSystemVersion = null; + if (system != null) { + switch (system.getStructureFhirVersionEnum()) { + case DSTU2_HL7ORG: { + caseSensitive = true; + break; + } + case DSTU3: { + org.hl7.fhir.dstu3.model.CodeSystem systemDstu3 = (org.hl7.fhir.dstu3.model.CodeSystem) system; + caseSensitive = systemDstu3.getCaseSensitive(); + codeSystemName = systemDstu3.getName(); + codeSystemVersion = systemDstu3.getVersion(); + break; + } + case R4: { + org.hl7.fhir.r4.model.CodeSystem systemR4 = (org.hl7.fhir.r4.model.CodeSystem) system; + caseSensitive = systemR4.getCaseSensitive(); + codeSystemName = systemR4.getName(); + codeSystemVersion = systemR4.getVersion(); + break; + } + case R5: { + CodeSystem systemR5 = (CodeSystem) system; + caseSensitive = systemR5.getCaseSensitive(); + codeSystemName = systemR5.getName(); + codeSystemVersion = systemR5.getVersion(); + break; + } + case DSTU2: + case DSTU2_1: + default: + throw new IllegalArgumentException("Can not handle version: " + myCtx.getVersion().getVersion()); + } + } + + for (VersionIndependentConcept nextExpansionCode : codes) { + + boolean codeMatches; + if (caseSensitive) { + codeMatches = theCode.equals(nextExpansionCode.getCode()); + } else { + codeMatches = theCode.equalsIgnoreCase(nextExpansionCode.getCode()); + } + if (codeMatches) { + if (theOptions.isInferSystem() || nextExpansionCode.getSystem().equals(theCodeSystem)) { + return new CodeValidationResult() + .setCode(theCode) + .setDisplay(nextExpansionCode.getDisplay()) + .setCodeSystemName(codeSystemName) + .setCodeSystemVersion(codeSystemVersion); + } + } + } + + ValidationMessage.IssueSeverity severity = ValidationMessage.IssueSeverity.ERROR; + + String message = "Unknown code '" + (isNotBlank(theCodeSystem) ? theCodeSystem + "#" : "") + theCode + "'"; + return new CodeValidationResult() + .setSeverityCode(severity.toCode()) + .setMessage(message); + } + + @Override + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + return validateCode(theRootValidationSupport, new ConceptValidationOptions(), theSystem, theCode, null, null).asLookupCodeResult(theSystem, theCode); + } + + @Nullable + private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu2Hl7Org(IValidationSupport theRootValidationSupport, ValueSet theInput) { + Function codeSystemLoader = t -> { + org.hl7.fhir.dstu2.model.ValueSet codeSystem = (org.hl7.fhir.dstu2.model.ValueSet) theRootValidationSupport.fetchCodeSystem(t); + CodeSystem retVal = new CodeSystem(); + addCodesDstu2Hl7Org(codeSystem.getCodeSystem().getConcept(), retVal.getConcept()); + return retVal; + }; + Function valueSetLoader = t -> { + org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theRootValidationSupport.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(input, codeSystemLoader, valueSetLoader); + return (output); + } + + + @Override + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + if (isBlank(theSystem)) { + return false; + } + + IBaseResource cs = theRootValidationSupport.fetchCodeSystem(theSystem); + + if (!myCtx.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU2_1)) { + return cs != null; + } + + if (cs != null) { + IPrimitiveType content = getFhirContext().newTerser().getSingleValueOrNull(cs, "content", IPrimitiveType.class); + if (!"not-present".equals(content.getValueAsString())) { + return true; + } + } + + return false; + } + + @Override + public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) { + return isNotBlank(theValueSetUrl) && theRootValidationSupport.fetchValueSet(theValueSetUrl) != null; + } + + + private void addCodesDstu2Hl7Org(List theSourceList, List theTargetList) { + for (ValueSet.ConceptDefinitionComponent nextSource : theSourceList) { + CodeSystem.ConceptDefinitionComponent targetConcept = new CodeSystem.ConceptDefinitionComponent().setCode(nextSource.getCode()).setDisplay(nextSource.getDisplay()); + theTargetList.add(targetConcept); + addCodesDstu2Hl7Org(nextSource.getConcept(), targetConcept.getConcept()); + } + } + + @Nullable + private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu3(IValidationSupport theRootValidationSupport, org.hl7.fhir.dstu3.model.ValueSet theInput) { + Function codeSystemLoader = t -> { + org.hl7.fhir.dstu3.model.CodeSystem codeSystem = (org.hl7.fhir.dstu3.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t); + return CodeSystem30_50.convertCodeSystem(codeSystem); + }; + Function valueSetLoader = t -> { + org.hl7.fhir.dstu3.model.ValueSet valueSet = (org.hl7.fhir.dstu3.model.ValueSet) theRootValidationSupport.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(input, codeSystemLoader, valueSetLoader); + return (output); + } + + @Nullable + private org.hl7.fhir.r5.model.ValueSet expandValueSetR4(IValidationSupport theRootValidationSupport, org.hl7.fhir.r4.model.ValueSet theInput) { + Function codeSystemLoader = t -> { + org.hl7.fhir.r4.model.CodeSystem codeSystem = (org.hl7.fhir.r4.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t); + return CodeSystem40_50.convertCodeSystem(codeSystem); + }; + Function valueSetLoader = t -> { + org.hl7.fhir.r4.model.ValueSet valueSet = (org.hl7.fhir.r4.model.ValueSet) theRootValidationSupport.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(input, codeSystemLoader, valueSetLoader); + return (output); + } + + @Nullable + private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(IValidationSupport theRootValidationSupport, org.hl7.fhir.r5.model.ValueSet theInput) { + Function codeSystemLoader = t -> (org.hl7.fhir.r5.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t); + Function valueSetLoader = t -> (org.hl7.fhir.r5.model.ValueSet) theRootValidationSupport.fetchValueSet(t); + + return expandValueSetR5(theInput, codeSystemLoader, valueSetLoader); + } + + @Nullable + private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(org.hl7.fhir.r5.model.ValueSet theInput, Function theCodeSystemLoader, Function theValueSetLoader) { + Set concepts = new HashSet<>(); + + try { + expandValueSetR5IncludeOrExclude(concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getInclude(), true); + expandValueSetR5IncludeOrExclude(concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getExclude(), false); + } catch (ExpansionCouldNotBeCompletedInternallyException e) { + return null; + } + + org.hl7.fhir.r5.model.ValueSet retVal = new org.hl7.fhir.r5.model.ValueSet(); + for (VersionIndependentConcept next : concepts) { + org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent contains = retVal.getExpansion().addContains(); + contains.setSystem(next.getSystem()); + contains.setCode(next.getCode()); + contains.setDisplay(next.getDisplay()); + } + + return retVal; + } + + private void expandValueSetR5IncludeOrExclude(Set theConcepts, Function theCodeSystemLoader, Function theValueSetLoader, List theComposeList, boolean theComposeListIsInclude) throws ExpansionCouldNotBeCompletedInternallyException { + for (org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent nextInclude : theComposeList) { + + List nextCodeList = new ArrayList<>(); + String system = nextInclude.getSystem(); + if (isNotBlank(system)) { + CodeSystem codeSystem = theCodeSystemLoader.apply(system); + if (codeSystem == null) { + throw new ExpansionCouldNotBeCompletedInternallyException(); + } + if (codeSystem.getContent() == CodeSystem.CodeSystemContentMode.NOTPRESENT) { + throw new ExpansionCouldNotBeCompletedInternallyException(); + } + + Set wantCodes; + if (nextInclude.getConcept().isEmpty()) { + wantCodes = null; + } else { + wantCodes = nextInclude.getConcept().stream().map(t -> t.getCode()).collect(Collectors.toSet()); + } + + addCodes(system, codeSystem.getConcept(), nextCodeList, wantCodes); + } + + 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(vs, theCodeSystemLoader, theValueSetLoader); + if (subExpansion == null) { + throw new ExpansionCouldNotBeCompletedInternallyException(); + } + for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent next : subExpansion.getExpansion().getContains()) { + nextCodeList.add(new VersionIndependentConcept(next.getSystem(), next.getCode(), next.getDisplay())); + } + } + } + + if (theComposeListIsInclude) { + theConcepts.addAll(nextCodeList); + } else { + theConcepts.removeAll(nextCodeList); + } + + } + + } + + private void addCodes(String theSystem, List theSource, List theTarget, Set theCodeFilter) { + for (CodeSystem.ConceptDefinitionComponent next : theSource) { + if (isNotBlank(next.getCode())) { + if (theCodeFilter == null || theCodeFilter.contains(next.getCode())) { + theTarget.add(new VersionIndependentConcept(theSystem, next.getCode(), next.getDisplay())); + } + } + addCodes(theSystem, next.getConcept(), theTarget, theCodeFilter); + } + } + + private static class ExpansionCouldNotBeCompletedInternallyException extends Exception { + + } + + private static void flattenAndConvertCodesDstu2(List theInput, List theVersionIndependentConcepts) { + for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent next : theInput) { + theVersionIndependentConcepts.add(new VersionIndependentConcept(next.getSystem(), next.getCode(), next.getDisplay())); + flattenAndConvertCodesDstu2(next.getContains(), theVersionIndependentConcepts); + } + } + + private static void flattenAndConvertCodesDstu3(List theInput, List theVersionIndependentConcepts) { + for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent next : theInput) { + theVersionIndependentConcepts.add(new VersionIndependentConcept(next.getSystem(), next.getCode(), next.getDisplay())); + flattenAndConvertCodesDstu3(next.getContains(), theVersionIndependentConcepts); + } + } + + private static void flattenAndConvertCodesR4(List theInput, List theVersionIndependentConcepts) { + for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent next : theInput) { + theVersionIndependentConcepts.add(new VersionIndependentConcept(next.getSystem(), next.getCode(), next.getDisplay())); + flattenAndConvertCodesR4(next.getContains(), theVersionIndependentConcepts); + } + } + + private static void flattenAndConvertCodesR5(List theInput, List theVersionIndependentConcepts) { + for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent next : theInput) { + theVersionIndependentConcepts.add(new VersionIndependentConcept(next.getSystem(), next.getCode(), next.getDisplay())); + flattenAndConvertCodesR5(next.getContains(), theVersionIndependentConcepts); + } + } + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/PrePopulatedValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/PrePopulatedValidationSupport.java similarity index 50% rename from hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/PrePopulatedValidationSupport.java rename to hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/PrePopulatedValidationSupport.java index a2d6ac628ba..edd11e70fa0 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/PrePopulatedValidationSupport.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/PrePopulatedValidationSupport.java @@ -1,20 +1,21 @@ -package org.hl7.fhir.r5.hapi.validation; +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 org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.MetadataResource; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.ValueSet; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -22,19 +23,18 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * This class is an implementation of {@link IValidationSupport} which may be pre-populated * with a collection of validation resources to be used by the validator. */ -public class PrePopulatedValidationSupport implements IValidationSupport { +public class PrePopulatedValidationSupport extends BaseStaticResourceValidationSupport implements IValidationSupport { - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; + private final FhirContext myFhirContext; + private final Map myCodeSystems; + private final Map myStructureDefinitions; + private final Map myValueSets; /** * Constructor */ - public PrePopulatedValidationSupport() { - myStructureDefinitions = new HashMap<>(); - myValueSets = new HashMap<>(); - myCodeSystems = new HashMap<>(); + public PrePopulatedValidationSupport(FhirContext theContext) { + this(theContext, new HashMap<>(), new HashMap<>(), new HashMap<>()); } @@ -48,7 +48,13 @@ public class PrePopulatedValidationSupport implements IValidationSupport { * @param theCodeSystems The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are * the resource itself. */ - public PrePopulatedValidationSupport(Map theStructureDefinitions, Map theValueSets, Map theCodeSystems) { + public PrePopulatedValidationSupport(FhirContext theFhirContext, Map theStructureDefinitions, Map theValueSets, Map theCodeSystems) { + super(theFhirContext); + Validate.notNull(theFhirContext, "theFhirContext must not be null"); + Validate.notNull(theStructureDefinitions, "theStructureDefinitions must not be null"); + Validate.notNull(theValueSets, "theValueSets must not be null"); + Validate.notNull(theCodeSystems, "theCodeSystems must not be null"); + myFhirContext = theFhirContext; myStructureDefinitions = theStructureDefinitions; myValueSets = theValueSets; myCodeSystems = theCodeSystems; @@ -68,9 +74,23 @@ public class PrePopulatedValidationSupport implements IValidationSupport { * *

    */ - public void addCodeSystem(CodeSystem theCodeSystem) { - Validate.notBlank(theCodeSystem.getUrl(), "theCodeSystem.getUrl() must not return a value"); - addToMap(theCodeSystem, myCodeSystems, theCodeSystem.getUrl()); + public void addCodeSystem(IBaseResource theCodeSystem) { + String url = processResourceAndReturnUrl(theCodeSystem, "CodeSystem"); + addToMap(theCodeSystem, myCodeSystems, url); + } + + private String processResourceAndReturnUrl(IBaseResource theCodeSystem, String theResourceName) { + Validate.notNull(theCodeSystem, "the" + theResourceName + " must not be null"); + RuntimeResourceDefinition resourceDef = myFhirContext.getResourceDefinition(theCodeSystem); + String actualResourceName = resourceDef.getName(); + Validate.isTrue(actualResourceName.equals(theResourceName), "the" + theResourceName + " must be a " + theResourceName + " - Got: " + actualResourceName); + + Optional urlValue = resourceDef.getChildByName("url").getAccessor().getFirstValueOrNull(theCodeSystem); + String url = urlValue.map(t -> (((IPrimitiveType) t).getValueAsString())).orElse(null); + + Validate.notNull(url, "the" + theResourceName + ".getUrl() must not return null"); + Validate.notBlank(url, "the" + theResourceName + ".getUrl() must return a value"); + return url; } /** @@ -87,12 +107,12 @@ public class PrePopulatedValidationSupport implements IValidationSupport { * *

    */ - public void addStructureDefinition(StructureDefinition theStructureDefinition) { - Validate.notBlank(theStructureDefinition.getUrl(), "theStructureDefinition.getUrl() must not return a value"); - addToMap(theStructureDefinition, myStructureDefinitions, theStructureDefinition.getUrl()); + public void addStructureDefinition(IBaseResource theStructureDefinition) { + String url = processResourceAndReturnUrl(theStructureDefinition, "StructureDefinition"); + addToMap(theStructureDefinition, myStructureDefinitions, url); } - private void addToMap(T theStructureDefinition, Map map, String theUrl) { + private void addToMap(T theStructureDefinition, Map map, String theUrl) { if (isNotBlank(theUrl)) { map.put(theUrl, theStructureDefinition); @@ -123,17 +143,13 @@ public class PrePopulatedValidationSupport implements IValidationSupport { *

    */ public void addValueSet(ValueSet theValueSet) { - Validate.notBlank(theValueSet.getUrl(), "theValueSet.getUrl() must not return a value"); - addToMap(theValueSet, myValueSets, theValueSet.getUrl()); + String url = processResourceAndReturnUrl(theValueSet, "ValueSet"); + addToMap(theValueSet, myValueSets, url); } - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } @Override - public List fetchAllConformanceResources(FhirContext theContext) { + public List fetchAllConformanceResources() { ArrayList retVal = new ArrayList<>(); retVal.addAll(myCodeSystems.values()); retVal.addAll(myStructureDefinitions.values()); @@ -142,59 +158,33 @@ public class PrePopulatedValidationSupport implements IValidationSupport { } @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList(myStructureDefinitions.values()); + public List fetchAllStructureDefinitions() { + return toList(myStructureDefinitions); } @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myCodeSystems.get(uri); + public IBaseResource fetchCodeSystem(String theSystem) { + return myCodeSystems.get(theSystem); } @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myValueSets.get(uri); - } - - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) myStructureDefinitions.get(theUri); - } - if (theClass.equals(ValueSet.class)) { - return (T) myValueSets.get(theUri); - } - if (theClass.equals(CodeSystem.class)) { - return (T) myCodeSystems.get(theUri); - } - return null; + public IBaseResource fetchValueSet(String theUri) { + return myValueSets.get(theUri); } @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { + public IBaseResource fetchStructureDefinition(String theUrl) { return myStructureDefinitions.get(theUrl); } @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + return myCodeSystems.containsKey(theSystem); } @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; + public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) { + return myValueSets.containsKey(theValueSetUrl); } } diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java new file mode 100644 index 00000000000..c2a7fcec04c --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java @@ -0,0 +1,140 @@ +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.rest.client.api.IGenericClient; +import ca.uhn.fhir.util.ParametersUtil; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +/** + * This class is an implementation of {@link IValidationSupport} that fetches validation codes + * from a remote FHIR based terminology server. It will invoke the FHIR + * ValueSet/$validate-code + * operation in order to validate codes. + */ +public class RemoteTerminologyServiceValidationSupport extends BaseValidationSupport implements IValidationSupport { + + private String myBaseUrl; + private List myClientInterceptors = new ArrayList<>(); + + /** + * Constructor + * + * @param theFhirContext The FhirContext object to use + */ + public RemoteTerminologyServiceValidationSupport(FhirContext theFhirContext) { + super(theFhirContext); + } + + @Override + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { + return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, theValueSetUrl, null); + } + + private IGenericClient provideClient() { + IGenericClient retVal = myCtx.newRestfulGenericClient(myBaseUrl); + for (Object next : myClientInterceptors) { + retVal.registerInterceptor(next); + } + return retVal; + } + + @Override + public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { + return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, null, theValueSet); + } + + protected CodeValidationResult invokeRemoteValidateCode(String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl, IBaseResource theValueSet) { + if (isBlank(theCode)) { + return null; + } + + IGenericClient client = provideClient(); + + IBaseParameters input = ParametersUtil.newInstance(getFhirContext()); + + if (isNotBlank(theValueSetUrl)) { + ParametersUtil.addParameterToParametersUri(getFhirContext(), input, "url", theValueSetUrl); + } + ParametersUtil.addParameterToParametersString(getFhirContext(), input, "code", theCode); + if (isNotBlank(theCodeSystem)) { + ParametersUtil.addParameterToParametersUri(getFhirContext(), input, "system", theCodeSystem); + } + if (isNotBlank(theDisplay)) { + ParametersUtil.addParameterToParametersString(getFhirContext(), input, "display", theDisplay); + } + if (theValueSet != null) { + ParametersUtil.addParameterToParameters(getFhirContext(), input, "valueSet", theValueSet); + } + + IBaseParameters output = client + .operation() + .onType("ValueSet") + .named("validate-code") + .withParameters(input) + .execute(); + + List resultValues = ParametersUtil.getNamedParameterValuesAsString(getFhirContext(), output, "result"); + if (resultValues.size() < 1 || isBlank(resultValues.get(0))) { + return null; + } + Validate.isTrue(resultValues.size() == 1, "Response contained %d 'result' values", resultValues.size()); + + boolean success = "true".equalsIgnoreCase(resultValues.get(0)); + + CodeValidationResult retVal = new CodeValidationResult(); + if (success) { + + retVal.setCode(theCode); + List displayValues = ParametersUtil.getNamedParameterValuesAsString(getFhirContext(), output, "display"); + if (displayValues.size() > 0) { + retVal.setDisplay(displayValues.get(0)); + } + + } else { + + retVal.setSeverity(IssueSeverity.ERROR); + List messageValues = ParametersUtil.getNamedParameterValuesAsString(getFhirContext(), output, "message"); + if (messageValues.size() > 0) { + retVal.setMessage(messageValues.get(0)); + } + + } + return retVal; + } + + /** + * Sets the FHIR Terminology Server base URL + * + * @param theBaseUrl The base URL, e.g. "https://hapi.fhir.org/baseR4" + */ + public void setBaseUrl(String theBaseUrl) { + Validate.notBlank(theBaseUrl, "theBaseUrl must be provided"); + myBaseUrl = theBaseUrl; + } + + /** + * Adds an interceptor that will be registered to all clients. + *

    + * Note that this method is not thread-safe and should only be called prior to this module + * being used. + *

    + * + * @param theClientInterceptor The interceptor (must not be null) + */ + public void addClientInterceptor(@Nonnull Object theClientInterceptor) { + Validate.notNull(theClientInterceptor, "theClientInterceptor must not be null"); + myClientInterceptors.add(theClientInterceptor); + } + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/SnapshotGeneratingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/SnapshotGeneratingValidationSupport.java new file mode 100644 index 00000000000..77c45ad93f7 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/SnapshotGeneratingValidationSupport.java @@ -0,0 +1,194 @@ +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.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.instance.model.api.IBaseResource; +import org.hl7.fhir.utilities.validation.ValidationMessage; + +import java.util.ArrayList; + +/** + * Simple validation support module that handles profile snapshot generation. + *

    + * This module currently supports the following FHIR versions: + *

      + *
    • DSTU3
    • + *
    • R4
    • + *
    • R5
    • + *
    + */ +public class SnapshotGeneratingValidationSupport implements IValidationSupport { + private final FhirContext myCtx; + + /** + * Constructor + */ + public SnapshotGeneratingValidationSupport(FhirContext theCtx) { + Validate.notNull(theCtx); + myCtx = theCtx; + } + + + @Override + public IBaseResource generateSnapshot(IValidationSupport theValidationSupport, 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 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 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 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; + } + + // 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()); + } + + return theInput; + } + + @Override + public FhirContext getFhirContext() { + return myCtx; + } + + + 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; + } + + } + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/ValidationSupportChain.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/ValidationSupportChain.java new file mode 100644 index 00000000000..616fc53a14c --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/ValidationSupportChain.java @@ -0,0 +1,257 @@ +package org.hl7.fhir.common.hapi.validation.support; + +import ca.uhn.fhir.context.ConfigurationException; +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.ValueSetExpansionOptions; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IPrimitiveType; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.apache.commons.lang3.StringUtils.isBlank; + +public class ValidationSupportChain implements IValidationSupport { + + private List myChain; + + /** + * Constructor + */ + public ValidationSupportChain() { + myChain = new ArrayList<>(); + } + + /** + * Constructor + */ + public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { + this(); + for (IValidationSupport next : theValidationSupportModules) { + if (next != null) { + addValidationSupport(next); + } + } + } + + @Override + public void invalidateCaches() { + for (IValidationSupport next : myChain) { + next.invalidateCaches(); + } + } + + @Override + public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) { + for (IValidationSupport next : myChain) { + boolean retVal = next.isValueSetSupported(theRootValidationSupport, theValueSetUrl); + if (retVal) { + return true; + } + } + return false; + } + + @Override + public IBaseResource generateSnapshot(IValidationSupport theRootValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) { + for (IValidationSupport next : myChain) { + IBaseResource retVal = next.generateSnapshot(theRootValidationSupport, theInput, theUrl, theWebUrl, theProfileName); + if (retVal != null) { + return retVal; + } + } + return null; + } + + @Override + public FhirContext getFhirContext() { + if (myChain.size() == 0) { + return null; + } + return myChain.get(0).getFhirContext(); + } + + /** + * Add a validation support module to the chain. + *

    + * Note that this method is not thread-safe. All validation support modules should be added prior to use. + *

    + * + * @param theValidationSupport The validation support. Must not be null, and must have a {@link #getFhirContext() FhirContext} that is configured for the same FHIR version as other entries in the chain. + */ + public void addValidationSupport(IValidationSupport theValidationSupport) { + int index = myChain.size(); + addValidationSupport(index, theValidationSupport); + } + + /** + * Add a validation support module to the chain at the given index. + *

    + * Note that this method is not thread-safe. All validation support modules should be added prior to use. + *

    + * + * @param theIndex The index to add to + * @param theValidationSupport The validation support. Must not be null, and must have a {@link #getFhirContext() FhirContext} that is configured for the same FHIR version as other entries in the chain. + */ + public void addValidationSupport(int theIndex, IValidationSupport theValidationSupport) { + Validate.notNull(theValidationSupport, "theValidationSupport must not be null"); + + if (theValidationSupport.getFhirContext() == null) { + String message = "Can not add validation support: getFhirContext() returns null"; + throw new ConfigurationException(message); + } + + FhirContext existingFhirContext = getFhirContext(); + if (existingFhirContext != null) { + FhirVersionEnum newVersion = theValidationSupport.getFhirContext().getVersion().getVersion(); + FhirVersionEnum existingVersion = existingFhirContext.getVersion().getVersion(); + if (!existingVersion.equals(newVersion)) { + String message = "Trying to add validation support of version " + newVersion + " to chain with " + myChain.size() + " entries of version " + existingVersion; + throw new ConfigurationException(message); + } + } + + myChain.add(theIndex, theValidationSupport); + } + + @Override + public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) { + for (IValidationSupport next : myChain) { + // TODO: test if code system is supported? + ValueSetExpansionOutcome expanded = next.expandValueSet(theRootValidationSupport, null, theValueSetToExpand); + if (expanded != null) { + return expanded; + } + } + return null; + } + + @Override + public List fetchAllConformanceResources() { + List retVal = new ArrayList<>(); + for (IValidationSupport next : myChain) { + List candidates = next.fetchAllConformanceResources(); + if (candidates != null) { + retVal.addAll(candidates); + } + } + return retVal; + } + + @Override + public List fetchAllStructureDefinitions() { + ArrayList retVal = new ArrayList<>(); + Set urls = new HashSet<>(); + for (IValidationSupport nextSupport : myChain) { + List allStructureDefinitions = nextSupport.fetchAllStructureDefinitions(); + if (allStructureDefinitions != null) { + for (IBaseResource next : allStructureDefinitions) { + + IPrimitiveType urlType = getFhirContext().newTerser().getSingleValueOrNull(next, "url", IPrimitiveType.class); + if (urlType == null || isBlank(urlType.getValueAsString()) || urls.add(urlType.getValueAsString())) { + retVal.add(next); + } + } + } + } + return retVal; + } + + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + for (IValidationSupport next : myChain) { + IBaseResource retVal = next.fetchCodeSystem(theSystem); + if (retVal != null) { + return retVal; + } + } + return null; + } + + @Override + public IBaseResource fetchValueSet(String theUrl) { + for (IValidationSupport next : myChain) { + IBaseResource retVal = next.fetchValueSet(theUrl); + if (retVal != null) { + return retVal; + } + } + return null; + } + + + @Override + public T fetchResource(Class theClass, String theUri) { + for (IValidationSupport next : myChain) { + T retVal = next.fetchResource(theClass, theUri); + if (retVal != null) { + return retVal; + } + } + return null; + } + + @Override + public IBaseResource fetchStructureDefinition(String theUrl) { + for (IValidationSupport next : myChain) { + IBaseResource retVal = next.fetchStructureDefinition(theUrl); + if (retVal != null) { + return retVal; + } + } + return null; + } + + @Override + public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) { + for (IValidationSupport next : myChain) { + if (next.isCodeSystemSupported(theRootValidationSupport, theSystem)) { + return true; + } + } + return false; + } + + @Override + public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, 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 (retVal != null) { + return retVal; + } + } + } + return null; + } + + @Override + public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, 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); + if (retVal != null) { + return retVal; + } + } + return null; + } + + @Override + public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) { + for (IValidationSupport next : myChain) { + if (next.isCodeSystemSupported(theRootValidationSupport, theSystem)) { + return next.lookupCode(theRootValidationSupport, theSystem, theCode); + } + } + return null; + } + + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/BaseValidatorBridge.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/BaseValidatorBridge.java similarity index 96% rename from hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/BaseValidatorBridge.java rename to hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/BaseValidatorBridge.java index 55475941eb7..f72dcb8daf8 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/BaseValidatorBridge.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/BaseValidatorBridge.java @@ -1,4 +1,4 @@ -package org.hl7.fhir.r5.hapi.validation; +package org.hl7.fhir.common.hapi.validation.validator; import ca.uhn.fhir.validation.IValidationContext; import ca.uhn.fhir.validation.IValidatorModule; diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java new file mode 100644 index 00000000000..804c22a5164 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java @@ -0,0 +1,396 @@ +package org.hl7.fhir.common.hapi.validation.validator; + +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.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; +import org.hl7.fhir.r5.model.Base; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.TypeDetails; +import org.hl7.fhir.r5.model.ValueSet; +import org.hl7.fhir.r5.utils.FHIRPathEngine; +import org.hl7.fhir.r5.utils.IResourceValidator; +import org.hl7.fhir.r5.utils.IResourceValidator.BestPracticeWarningLevel; +import org.hl7.fhir.utilities.validation.ValidationMessage; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +@SuppressWarnings({"PackageAccessibility", "Duplicates"}) +public class FhirInstanceValidator extends BaseValidatorBridge implements IInstanceValidatorModule { + + private boolean myAnyExtensionsAllowed = true; + private BestPracticeWarningLevel myBestPracticeWarningLevel; + private IValidationSupport myValidationSupport; + private boolean noTerminologyChecks = false; + private volatile VersionSpecificWorkerContextWrapper myWrappedWorkerContext; + private boolean errorForUnknownProfiles; + private boolean assumeValidRestReferences; + private List myExtensionDomains = Collections.emptyList(); + private IResourceValidator.IValidatorResourceFetcher validatorResourceFetcher; + private volatile FhirContext myDstu2Context; + private volatile FhirContext myHl7OrgDstu2Context; + + /** + * Constructor + *

    + * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} + */ + public FhirInstanceValidator(FhirContext theContext) { + this(theContext.getValidationSupport()); + } + + /** + * Constructor which uses the given validation support + * + * @param theValidationSupport The validation support + */ + public FhirInstanceValidator(IValidationSupport theValidationSupport) { + if (theValidationSupport.getFhirContext().getVersion().getVersion() == FhirVersionEnum.DSTU2) { + myValidationSupport = new HapiToHl7OrgDstu2ValidatingSupportWrapper(theValidationSupport); + } else { + myValidationSupport = theValidationSupport; + } + } + + /** + * Every element in a resource or data type includes an optional extension child element + * which is identified by it's {@code url attribute}. There exists a number of predefined + * extension urls or extension domains:

      + *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • + *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • + *
    + * It is possible to extend this list of known extension by defining custom extensions: + * Any url which starts which one of the elements in the list of custom extension domains is + * considered as known. + *

    + * Any unknown extension domain will result in an information message when validating a resource. + *

    + */ + public FhirInstanceValidator setCustomExtensionDomains(List extensionDomains) { + this.myExtensionDomains = extensionDomains; + return this; + } + + /** + * Every element in a resource or data type includes an optional extension child element + * which is identified by it's {@code url attribute}. There exists a number of predefined + * extension urls or extension domains:
      + *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • + *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • + *
    + * It is possible to extend this list of known extension by defining custom extensions: + * Any url which starts which one of the elements in the list of custom extension domains is + * considered as known. + *

    + * Any unknown extension domain will result in an information message when validating a resource. + *

    + */ + public FhirInstanceValidator setCustomExtensionDomains(String... extensionDomains) { + this.myExtensionDomains = Arrays.asList(extensionDomains); + return this; + } + + /** + * Returns the "best practice" warning level (default is {@link BestPracticeWarningLevel#Hint}). + *

    + * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is + * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be + * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice + * guielines will be ignored. + *

    + * + * @see #setBestPracticeWarningLevel(BestPracticeWarningLevel) + */ + public BestPracticeWarningLevel getBestPracticeWarningLevel() { + return myBestPracticeWarningLevel; + } + + /** + * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at + * this level. + *

    + * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is + * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be + * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice + * guielines will be ignored. + *

    + * + * @param theBestPracticeWarningLevel The level, must not be null + */ + public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPracticeWarningLevel) { + Validate.notNull(theBestPracticeWarningLevel); + myBestPracticeWarningLevel = theBestPracticeWarningLevel; + } + + /** + * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of + * DefaultProfileValidationSupport if the no-arguments constructor for this object was used. + * + * @return + */ + public IValidationSupport getValidationSupport() { + return myValidationSupport; + } + + /** + * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of + * DefaultProfileValidationSupport if the no-arguments constructor for this object was used. + */ + public void setValidationSupport(IValidationSupport theValidationSupport) { + myValidationSupport = theValidationSupport; + myWrappedWorkerContext = null; + } + + /** + * If set to {@literal true} (default is true) extensions which are not known to the + * validator (e.g. because they have not been explicitly declared in a profile) will + * be validated but will not cause an error. + */ + public boolean isAnyExtensionsAllowed() { + return myAnyExtensionsAllowed; + } + + /** + * If set to {@literal true} (default is true) extensions which are not known to the + * validator (e.g. because they have not been explicitly declared in a profile) will + * be validated but will not cause an error. + */ + public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { + myAnyExtensionsAllowed = theAnyExtensionsAllowed; + } + + public boolean isErrorForUnknownProfiles() { + return errorForUnknownProfiles; + } + + public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { + this.errorForUnknownProfiles = errorForUnknownProfiles; + } + + /** + * If set to {@literal true} (default is false) the valueSet will not be validate + */ + public boolean isNoTerminologyChecks() { + return noTerminologyChecks; + } + + /** + * If set to {@literal true} (default is false) the valueSet will not be validate + */ + public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { + noTerminologyChecks = theNoTerminologyChecks; + } + + public List getExtensionDomains() { + return myExtensionDomains; + } + + @Override + protected List validate(IValidationContext theValidationCtx) { + VersionSpecificWorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; + if (wrappedWorkerContext == null) { + VersionSpecificWorkerContextWrapper.IVersionTypeConverter converter; + + switch (myValidationSupport.getFhirContext().getVersion().getVersion()) { + case DSTU2: + case DSTU2_HL7ORG: { + converter = new VersionSpecificWorkerContextWrapper.IVersionTypeConverter() { + @Override + public Resource toCanonical(IBaseResource theNonCanonical) { + IBaseResource nonCanonical = theNonCanonical; + Resource retVal = VersionConvertor_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) nonCanonical); + if (nonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) { + org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) nonCanonical; + if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) { + if (!valueSet.hasCompose()) { + org.hl7.fhir.r5.model.ValueSet valueSetR5 = (org.hl7.fhir.r5.model.ValueSet) retVal; + valueSetR5.getCompose().addInclude().setSystem(valueSet.getCodeSystem().getSystem()); + } + } + } + return retVal; + } + + @Override + public IBaseResource fromCanonical(Resource theCanonical) { + IBaseResource canonical = VersionConvertor_10_50.convertResource(theCanonical); + return canonical; + } + }; + break; + } + + 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); + } + }; + 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); + } + }; + 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); + } + }; + break; + } + + case R5: { + converter = VersionSpecificWorkerContextWrapper.IDENTITY_VERSION_TYPE_CONVERTER; + break; + } + + default: + throw new IllegalStateException(); + } + + wrappedWorkerContext = new VersionSpecificWorkerContextWrapper(myValidationSupport, converter); + } + myWrappedWorkerContext = wrappedWorkerContext; + + return new ValidatorWrapper() + .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) + .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) + .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) + .setExtensionDomains(getExtensionDomains()) + .setNoTerminologyChecks(isNoTerminologyChecks()) + .setValidatorResourceFetcher(getValidatorResourceFetcher()) + .setAssumeValidRestReferences(isAssumeValidRestReferences()) + .validate(wrappedWorkerContext, theValidationCtx); + } + + private FhirContext getDstu2Context() { + FhirContext dstu2Context = myDstu2Context; + if (dstu2Context == null) { + dstu2Context = FhirContext.forDstu2(); + myDstu2Context = dstu2Context; + } + return dstu2Context; + } + + private FhirContext getHl7OrgDstu2Context() { + FhirContext hl7OrgDstu2Context = myHl7OrgDstu2Context; + if (hl7OrgDstu2Context == null) { + hl7OrgDstu2Context = FhirContext.forDstu2Hl7Org(); + myHl7OrgDstu2Context = hl7OrgDstu2Context; + } + return hl7OrgDstu2Context; + } + + public IResourceValidator.IValidatorResourceFetcher getValidatorResourceFetcher() { + return validatorResourceFetcher; + } + + public void setValidatorResourceFetcher(IResourceValidator.IValidatorResourceFetcher validatorResourceFetcher) { + this.validatorResourceFetcher = validatorResourceFetcher; + } + + public boolean isAssumeValidRestReferences() { + return assumeValidRestReferences; + } + + public void setAssumeValidRestReferences(boolean assumeValidRestReferences) { + this.assumeValidRestReferences = assumeValidRestReferences; + } + + /** + * Clear any cached data held by the validator or any of its internal stores. This is mostly intended + * for unit tests, but could be used for production uses too. + */ + public void invalidateCaches() { + myValidationSupport.invalidateCaches(); + myWrappedWorkerContext.invalidateCaches(); + } + + + public static class NullEvaluationContext implements FHIRPathEngine.IEvaluationContext { + @Override + public Base resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { + return null; + } + + @Override + public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException { + return null; + } + + @Override + public boolean log(String argument, List focus) { + return false; + } + + @Override + public FunctionDetails resolveFunction(String functionName) { + return null; + } + + @Override + public TypeDetails checkFunction(Object appContext, String functionName, List parameters) throws PathEngineException { + return null; + } + + @Override + public List executeFunction(Object appContext, String functionName, List> parameters) { + return null; + } + + @Override + public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException { + return null; + } + + @Override + public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException { + return false; + } + + @Override + public ValueSet resolveValueSet(Object appContext, String url) { + return null; + } + } + + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/HapiToHl7OrgDstu2ValidatingSupportWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/HapiToHl7OrgDstu2ValidatingSupportWrapper.java new file mode 100644 index 00000000000..26a005207e3 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/HapiToHl7OrgDstu2ValidatingSupportWrapper.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.common.hapi.validation.validator; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.context.support.IValidationSupport; +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.common.hapi.validation.support.BaseValidationSupportWrapper; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import java.util.List; +import java.util.stream.Collectors; + +public class HapiToHl7OrgDstu2ValidatingSupportWrapper extends BaseValidationSupportWrapper implements IValidationSupport { + private final FhirContext myHapiCtx; + + /** + * Constructor + */ + public HapiToHl7OrgDstu2ValidatingSupportWrapper(IValidationSupport theWrap) { + super(FhirContext.forDstu2Hl7Org(), theWrap); + + Validate.isTrue(theWrap.getFhirContext().getVersion().getVersion() == FhirVersionEnum.DSTU2); + myHapiCtx = theWrap.getFhirContext(); + } + + @Override + public List fetchAllConformanceResources() { + return super.fetchAllConformanceResources(); + } + + @Override + public List fetchAllStructureDefinitions() { + return super + .fetchAllStructureDefinitions() + .stream() + .map(t -> translate(t)) + .collect(Collectors.toList()); + } + + @Override + public T fetchResource(Class theClass, String theUri) { + Class type = translateTypeToHapi(theClass); + IBaseResource output = super.fetchResource(type, theUri); + return theClass.cast(translate(output)); + } + + @Override + public IBaseResource fetchCodeSystem(String theSystem) { + IBaseResource output = super.fetchCodeSystem(theSystem); + return translate(output); + } + + @Override + public IBaseResource fetchValueSet(String theUri) { + return translate(super.fetchValueSet(theUri)); + } + + @Override + public IBaseResource fetchStructureDefinition(String theUrl) { + return translate(super.fetchStructureDefinition(theUrl)); + } + + private Class translateTypeToHapi(Class theCodeSystemType) { + String resName = getFhirContext().getResourceDefinition(theCodeSystemType).getName(); + return myHapiCtx.getResourceDefinition(resName).getImplementingClass(); + } + + private IBaseResource translate(IBaseResource theInput) { + if (theInput == null) { + return null; + } + String encoded = myHapiCtx.newJsonParser().encodeResourceToString(theInput); + return getFhirContext().newJsonParser().parseResource(encoded); + } +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ProfileKnowledgeWorkerR5.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ProfileKnowledgeWorkerR5.java new file mode 100644 index 00000000000..d4bfea7ce0e --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ProfileKnowledgeWorkerR5.java @@ -0,0 +1,69 @@ +package org.hl7.fhir.common.hapi.validation.validator; + +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 org.apache.commons.lang3.Validate; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.ElementDefinition; +import org.hl7.fhir.r5.model.StructureDefinition; + +public class ProfileKnowledgeWorkerR5 implements org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider { + private final FhirContext myCtx; + + public ProfileKnowledgeWorkerR5(FhirContext theCtx) { + myCtx = theCtx; + } + + @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(StructureDefinition theStructureDefinition, ElementDefinition.ElementDefinitionBindingComponent theElementDefinitionBindingComponent, String theS) throws FHIRException { + return null; + } + + @Override + public BindingResolution resolveBinding(StructureDefinition theStructureDefinition, String theS, String theS1) throws FHIRException { + return null; + } + + @Override + public String getLinkForProfile(StructureDefinition theStructureDefinition, String theS) { + return null; + } + + @Override + public boolean prependLinks() { + return false; + } + + @Override + public String getLinkForUrl(String corePath, String url) { + throw new UnsupportedOperationException(); + } + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/ValidatorWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java similarity index 69% rename from hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/ValidatorWrapper.java rename to hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java index 61f1358ec1b..243fb93814e 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/ValidatorWrapper.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java @@ -1,23 +1,27 @@ -package org.hl7.fhir.common.hapi.validation; +package org.hl7.fhir.common.hapi.validation.validator; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.util.XmlUtil; import ca.uhn.fhir.validation.IValidationContext; -import com.google.gson.*; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; import org.apache.commons.codec.Charsets; import org.apache.commons.io.input.ReaderInputStream; +import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.context.IWorkerContext; import org.hl7.fhir.r5.elementmodel.Manager; +import org.hl7.fhir.r5.model.StructureDefinition; import org.hl7.fhir.r5.utils.FHIRPathEngine; import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.utils.ValidationProfileSet; -import org.hl7.fhir.r5.validation.InstanceValidator; import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.hl7.fhir.validation.instance.InstanceValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; -import org.w3c.dom.Element; import org.w3c.dom.NodeList; import java.io.InputStream; @@ -26,14 +30,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -public class ValidatorWrapper { +class ValidatorWrapper { private static final Logger ourLog = LoggerFactory.getLogger(ValidatorWrapper.class); private IResourceValidator.BestPracticeWarningLevel myBestPracticeWarningLevel; private boolean myAnyExtensionsAllowed; private boolean myErrorForUnknownProfiles; private boolean myNoTerminologyChecks; + private boolean myAssumeValidRestReferences; private Collection myExtensionDomains; + private IResourceValidator.IValidatorResourceFetcher myValidatorResourceFetcher; /** * Constructor @@ -42,6 +48,15 @@ public class ValidatorWrapper { super(); } + public boolean isAssumeValidRestReferences() { + return myAssumeValidRestReferences; + } + + public ValidatorWrapper setAssumeValidRestReferences(boolean assumeValidRestReferences) { + this.myAssumeValidRestReferences = assumeValidRestReferences; + return this; + } + public ValidatorWrapper setBestPracticeWarningLevel(IResourceValidator.BestPracticeWarningLevel theBestPracticeWarningLevel) { myBestPracticeWarningLevel = theBestPracticeWarningLevel; return this; @@ -67,27 +82,36 @@ public class ValidatorWrapper { return this; } + + public ValidatorWrapper setValidatorResourceFetcher(IResourceValidator.IValidatorResourceFetcher validatorResourceFetcher) { + this.myValidatorResourceFetcher = validatorResourceFetcher; + return this; + } + public List validate(IWorkerContext theWorkerContext, IValidationContext theValidationContext) { InstanceValidator v; - FHIRPathEngine.IEvaluationContext evaluationCtx = new org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator.NullEvaluationContext(); + FHIRPathEngine.IEvaluationContext evaluationCtx = new FhirInstanceValidator.NullEvaluationContext(); try { v = new InstanceValidator(theWorkerContext, evaluationCtx); } catch (Exception e) { throw new ConfigurationException(e); } + v.setAssumeValidRestReferences(isAssumeValidRestReferences()); v.setBestPracticeWarningLevel(myBestPracticeWarningLevel); v.setAnyExtensionsAllowed(myAnyExtensionsAllowed); v.setResourceIdRule(IResourceValidator.IdStatus.OPTIONAL); v.setNoTerminologyChecks(myNoTerminologyChecks); v.setErrorForUnknownProfiles(myErrorForUnknownProfiles); v.getExtensionDomains().addAll(myExtensionDomains); + v.setFetcher(myValidatorResourceFetcher); + v.setAllowXsiLocation(true); List messages = new ArrayList<>(); - ValidationProfileSet profileSet = new ValidationProfileSet(); + List profileUrls = new ArrayList<>(); for (String next : theValidationContext.getOptions().getProfiles()) { - profileSet.getCanonical().add(new ValidationProfileSet.ProfileRegistration(next, true)); + fetchAndAddProfile(theWorkerContext, profileUrls, next); } String input = theValidationContext.getResourceAsString(); @@ -108,14 +132,14 @@ public class ValidatorWrapper { // Determine if meta/profiles are present... ArrayList profiles = determineIfProfilesSpecified(document); for (String nextProfile : profiles) { - profileSet.getCanonical().add(new ValidationProfileSet.ProfileRegistration(nextProfile, true)); + fetchAndAddProfile(theWorkerContext, profileUrls, nextProfile); } String resourceAsString = theValidationContext.getResourceAsString(); InputStream inputStream = new ReaderInputStream(new StringReader(resourceAsString), Charsets.UTF_8); Manager.FhirFormat format = Manager.FhirFormat.XML; - v.validate(null, messages, inputStream, format, profileSet); + v.validate(null, messages, inputStream, format, profileUrls); } else if (encoding == EncodingEnum.JSON) { @@ -128,7 +152,8 @@ public class ValidatorWrapper { if (profileElement != null && profileElement.isJsonArray()) { JsonArray profiles = profileElement.getAsJsonArray(); for (JsonElement element : profiles) { - profileSet.getCanonical().add(new ValidationProfileSet.ProfileRegistration(element.getAsString(), true)); + String nextProfile = element.getAsString(); + fetchAndAddProfile(theWorkerContext, profileUrls, nextProfile); } } } @@ -137,7 +162,7 @@ public class ValidatorWrapper { InputStream inputStream = new ReaderInputStream(new StringReader(resourceAsString), Charsets.UTF_8); Manager.FhirFormat format = Manager.FhirFormat.JSON; - v.validate(null, messages, inputStream, format, profileSet); + v.validate(null, messages, inputStream, format, profileUrls); } else { throw new IllegalArgumentException("Unknown encoding: " + encoding); @@ -146,27 +171,36 @@ public class ValidatorWrapper { for (int i = 0; i < messages.size(); i++) { ValidationMessage next = messages.get(i); String message = next.getMessage(); + + // TODO: are these still needed? if ("Binding has no source, so can't be checked".equals(message) || "ValueSet http://hl7.org/fhir/ValueSet/mimetypes not found".equals(message)) { messages.remove(i); i--; } + + if (message.endsWith("\" could not be resolved, so has not been checked") && next.getLevel() == ValidationMessage.IssueSeverity.WARNING) { + next.setLevel(ValidationMessage.IssueSeverity.ERROR); + } + } return messages; } + private void fetchAndAddProfile(IWorkerContext theWorkerContext, List theProfileStructureDefinitions, String theUrl) throws org.hl7.fhir.exceptions.FHIRException { + try { - private String determineResourceName(Document theDocument) { - NodeList list = theDocument.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i) instanceof Element) { - return list.item(i).getLocalName(); - } + // NOTE: We expect the following call to generate a snapshot if needed + StructureDefinition structureDefinition = theWorkerContext.fetchRawProfile(theUrl); + + theProfileStructureDefinitions.add(structureDefinition); + } catch (FHIRException e) { + ourLog.debug("Failed to load profile: {}", theUrl); } - return theDocument.getDocumentElement().getLocalName(); } + private ArrayList determineIfProfilesSpecified(Document theDocument) { ArrayList profileNames = new ArrayList<>(); NodeList list = theDocument.getChildNodes().item(0).getChildNodes(); diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java new file mode 100644 index 00000000000..c48c6121b82 --- /dev/null +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java @@ -0,0 +1,578 @@ +package org.hl7.fhir.common.hapi.validation.validator; + +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.rest.api.Constants; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.time.DateUtils; +import org.fhir.ucum.UcumService; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.exceptions.TerminologyServiceException; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.formats.IParser; +import org.hl7.fhir.r5.formats.ParserType; +import org.hl7.fhir.r5.model.CanonicalResource; +import org.hl7.fhir.r5.model.Coding; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.StructureDefinition; +import org.hl7.fhir.r5.model.ValueSet; +import org.hl7.fhir.r5.terminologies.ValueSetExpander; +import org.hl7.fhir.r5.utils.INarrativeGenerator; +import org.hl7.fhir.r5.utils.IResourceValidator; +import org.hl7.fhir.utilities.TranslationServices; +import org.hl7.fhir.utilities.i18n.I18nBase; +import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.hl7.fhir.utilities.validation.ValidationOptions; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +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 static final IVersionTypeConverter IDENTITY_VERSION_TYPE_CONVERTER = new VersionTypeConverterR5(); + private static FhirContext ourR5Context = FhirContext.forR5(); + private final IValidationSupport myValidationSupport; + private final IVersionTypeConverter myModelConverter; + private volatile List myAllStructures; + private LoadingCache myFetchResourceCache; + private org.hl7.fhir.r5.model.Parameters myExpansionProfile; + + public VersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport, IVersionTypeConverter theModelConverter) { + myValidationSupport = theValidationSupport; + myModelConverter = theModelConverter; + + long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND; + if (System.getProperties().containsKey(ca.uhn.fhir.rest.api.Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)) { + timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); + } + + myFetchResourceCache = Caffeine.newBuilder() + .expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS) + .maximumSize(10000) + .build(key -> { + + String fetchResourceName = key.getResourceName(); + if (myValidationSupport.getFhirContext().getVersion().getVersion() == FhirVersionEnum.DSTU2) { + if ("CodeSystem".equals(fetchResourceName)) { + fetchResourceName = "ValueSet"; + } + } + Class fetchResourceType = myValidationSupport.getFhirContext().getResourceDefinition(fetchResourceName).getImplementingClass(); + IBaseResource fetched = myValidationSupport.fetchResource(fetchResourceType, key.getUri()); + + if (fetched == null) { + return null; + } + + + Resource canonical = myModelConverter.toCanonical(fetched); + + if (canonical instanceof StructureDefinition) { + if (((StructureDefinition) canonical).getSnapshot().isEmpty()) { + fetched = myValidationSupport.generateSnapshot(myValidationSupport, fetched, "", null, ""); + canonical = myModelConverter.toCanonical(fetched); + } + } + + return canonical; + }); + + setValidationMessageLanguage(getLocale()); + } + + @Override + public List allConformanceResources() { + throw new UnsupportedOperationException(); + } + + @Override + public String getLinkForUrl(String corePath, String url) { + throw new UnsupportedOperationException(); + } + + @Override + public Map getBinaries() { + return null; + } + + @Override + public void generateSnapshot(StructureDefinition input) throws FHIRException { + if (input.hasSnapshot()) { + return; + } + + org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new ProfileKnowledgeWorkerR5(ourR5Context); + ArrayList messages = new ArrayList<>(); + org.hl7.fhir.r5.model.StructureDefinition base = (org.hl7.fhir.r5.model.StructureDefinition) fetchResource(StructureDefinition.class, input.getBaseDefinition()); + if (base == null) { + throw new PreconditionFailedException("Unknown base definition: " + input.getBaseDefinition()); + } + new org.hl7.fhir.r5.conformance.ProfileUtilities(this, messages, profileKnowledgeProvider).generateSnapshot(base, input, "", null, ""); + + } + + @Override + public void generateSnapshot(StructureDefinition theStructureDefinition, boolean theB) { + // nothing yet + } + + @Override + public org.hl7.fhir.r5.model.Parameters getExpansionParameters() { + return myExpansionProfile; + } + + @Override + public void setExpansionProfile(org.hl7.fhir.r5.model.Parameters expParameters) { + myExpansionProfile = expParameters; + } + + @Override + public List allStructures() { + + List retVal = myAllStructures; + if (retVal == null) { + retVal = new ArrayList<>(); + for (IBaseResource next : myValidationSupport.fetchAllStructureDefinitions()) { + try { + Resource converted = myModelConverter.toCanonical(next); + retVal.add((StructureDefinition) converted); + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + } + myAllStructures = retVal; + } + + return retVal; + } + + @Override + public List getStructures() { + return allStructures(); + } + + @Override + public void cacheResource(Resource res) { + throw new UnsupportedOperationException(); + } + + @Nonnull + private ValidationResult convertValidationResult(@Nullable IValidationSupport.CodeValidationResult theResult) { + ValidationResult retVal = null; + if (theResult != null) { + String code = theResult.getCode(); + String display = theResult.getDisplay(); + String issueSeverity = theResult.getSeverityCode(); + String message = theResult.getMessage(); + if (isNotBlank(code)) { + retVal = new ValidationResult(new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent() + .setCode(code) + .setDisplay(display)); + } else if (isNotBlank(issueSeverity)) { + retVal = new ValidationResult(ValidationMessage.IssueSeverity.fromCode(issueSeverity), message, ValueSetExpander.TerminologyServiceErrorClass.UNKNOWN); + } + + } + + if (retVal == null) { + retVal = new ValidationResult(ValidationMessage.IssueSeverity.ERROR, "Validation failed"); + } + + return retVal; + } + + @Override + public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean Hierarchical) { + IBaseResource convertedSource; + try { + convertedSource = myModelConverter.fromCanonical(source); + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + IValidationSupport.ValueSetExpansionOutcome expanded = myValidationSupport.expandValueSet(myValidationSupport, null, convertedSource); + + org.hl7.fhir.r5.model.ValueSet convertedResult = null; + if (expanded.getValueSet() != null) { + try { + convertedResult = (ValueSet) myModelConverter.toCanonical(expanded.getValueSet()); + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + } + + String error = expanded.getError(); + ValueSetExpander.TerminologyServiceErrorClass result = null; + + return new ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, result); + } + + @Override + public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean Hierarchical) { + throw new UnsupportedOperationException(); + } + + @Override + public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { + throw new UnsupportedOperationException(); + } + + @Override + public Locale getLocale() { + return myValidationSupport.getFhirContext().getLocalizer().getLocale(); + } + + @Override + public void setLocale(Locale locale) { + // ignore + } + + @Override + public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { + IBaseResource fetched = myValidationSupport.fetchCodeSystem(system); + if (fetched == null) { + return null; + } + try { + return (org.hl7.fhir.r5.model.CodeSystem) myModelConverter.toCanonical(fetched); + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + } + + @Override + public T fetchResource(Class class_, String uri) { + + if (isBlank(uri)) { + return null; + } + + ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); + @SuppressWarnings("unchecked") + T retVal = (T) myFetchResourceCache.get(key); + + return retVal; + } + + @Override + public Resource fetchResourceById(String type, String uri) { + throw new UnsupportedOperationException(); + } + + @Override + public T fetchResourceWithException(Class class_, String uri) throws FHIRException { + T retVal = fetchResource(class_, uri); + if (retVal == null) { + throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); + } + return retVal; + } + + @Override + public List findMapsForSource(String url) { + throw new UnsupportedOperationException(); + } + + @Override + public String getAbbreviation(String name) { + throw new UnsupportedOperationException(); + } + + @Override + public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { + throw new UnsupportedOperationException(); + } + + @Override + public IParser getParser(ParserType type) { + throw new UnsupportedOperationException(); + } + + @Override + public IParser getParser(String type) { + throw new UnsupportedOperationException(); + } + + @Override + public List getResourceNames() { + return new ArrayList<>(myValidationSupport.getFhirContext().getResourceNames()); + } + + @Override + public Set getResourceNamesAsSet() { + return myValidationSupport.getFhirContext().getResourceNames(); + } + + @Override + public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { + throw new UnsupportedOperationException(); + } + + @Override + public String getOverrideVersionNs() { + return null; + } + + @Override + public void setOverrideVersionNs(String value) { + + } + + @Override + public StructureDefinition fetchTypeDefinition(String typeName) { + return fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); + } + + @Override + public StructureDefinition fetchRawProfile(String url) { + StructureDefinition retVal = fetchResource(StructureDefinition.class, url); + + if (retVal != null && retVal.getSnapshot().isEmpty()) { + generateSnapshot(retVal); + } + + return retVal; + } + + @Override + public List getTypeNames() { + throw new UnsupportedOperationException(); + } + + @Override + public UcumService getUcumService() { + throw new UnsupportedOperationException(); + } + + @Override + public void setUcumService(UcumService ucumService) { + throw new UnsupportedOperationException(); + } + + @Override + public String getVersion() { + return myValidationSupport.getFhirContext().getVersion().getVersion().getFhirVersionString(); + } + + @Override + public boolean hasCache() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean hasResource(Class class_, String uri) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isNoTerminologyServer() { + return false; + } + + @Override + public List listTransforms() { + throw new UnsupportedOperationException(); + } + + @Override + public IParser newJsonParser() { + throw new UnsupportedOperationException(); + } + + @Override + public IResourceValidator newValidator() { + throw new UnsupportedOperationException(); + } + + @Override + public IParser newXmlParser() { + throw new UnsupportedOperationException(); + } + + @Override + public String oid2Uri(String code) { + throw new UnsupportedOperationException(); + } + + @Override + public ILoggingService getLogger() { + return null; + } + + @Override + public void setLogger(ILoggingService logger) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean supportsSystem(String system) { + return myValidationSupport.isCodeSystemSupported(myValidationSupport, system); + } + + @Override + public TranslationServices translator() { + throw new UnsupportedOperationException(); + } + + @Override + public ValidationResult validateCode(ValidationOptions theOptions, String system, String code, String display) { + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), system, code, display, null); + return convertValidationResult(result); + } + + @Override + public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String display, org.hl7.fhir.r5.model.ValueSet theValueSet) { + IBaseResource convertedVs = null; + + try { + if (theValueSet != null) { + convertedVs = myModelConverter.fromCanonical(theValueSet); + } + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, display, convertedVs); + return convertValidationResult(result); + } + + @Override + public ValidationResult validateCode(ValidationOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet theValueSet) { + IBaseResource convertedVs = null; + try { + if (theValueSet != null) { + convertedVs = myModelConverter.fromCanonical(theValueSet); + } + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions).setInferSystem(true), null, code, null, convertedVs); + return convertValidationResult(result); + } + + @Override + public ValidationResult validateCode(ValidationOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet theValueSet) { + IBaseResource convertedVs = null; + + try { + if (theValueSet != null) { + convertedVs = myModelConverter.fromCanonical(theValueSet); + } + } catch (FHIRException e) { + throw new InternalErrorException(e); + } + + IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), code.getSystem(), code.getCode(), code.getDisplay(), convertedVs); + return convertValidationResult(result); + } + + @Override + public ValidationResult validateCode(ValidationOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet theVs) { + for (Coding next : code.getCoding()) { + ValidationResult retVal = validateCode(theOptions, next, theVs); + if (retVal.isOk()) { + return retVal; + } + } + + return new ValidationResult(ValidationMessage.IssueSeverity.ERROR, null); + } + + public void invalidateCaches() { + myFetchResourceCache.invalidateAll(); + } + + public interface IVersionTypeConverter { + + org.hl7.fhir.r5.model.Resource toCanonical(IBaseResource theNonCanonical); + + IBaseResource fromCanonical(org.hl7.fhir.r5.model.Resource theCanonical); + + } + + private static class ResourceKey { + private final int myHashCode; + private String myResourceName; + private String myUri; + + private ResourceKey(String theResourceName, String theUri) { + myResourceName = theResourceName; + myUri = theUri; + myHashCode = new HashCodeBuilder(17, 37) + .append(myResourceName) + .append(myUri) + .toHashCode(); + } + + @Override + public boolean equals(Object theO) { + if (this == theO) { + return true; + } + + if (theO == null || getClass() != theO.getClass()) { + return false; + } + + ResourceKey that = (ResourceKey) theO; + + return new EqualsBuilder() + .append(myResourceName, that.myResourceName) + .append(myUri, that.myUri) + .isEquals(); + } + + public String getResourceName() { + return myResourceName; + } + + public String getUri() { + return myUri; + } + + @Override + public int hashCode() { + return myHashCode; + } + } + + private static class VersionTypeConverterR5 implements IVersionTypeConverter { + @Override + public Resource toCanonical(IBaseResource theNonCanonical) { + return (Resource) theNonCanonical; + } + + @Override + public IBaseResource fromCanonical(Resource theCanonical) { + return theCanonical; + } + } + + public static ConceptValidationOptions convertConceptValidationOptions(ValidationOptions theOptions) { + ConceptValidationOptions retVal = new ConceptValidationOptions(); + if (theOptions.isGuessSystem()) { + retVal = retVal.setInferSystem(true); + } + return retVal; + } + +} + + + diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/FhirInstanceValidator.java deleted file mode 100644 index f7721f971c2..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu2016may/hapi/validation/FhirInstanceValidator.java +++ /dev/null @@ -1,789 +0,0 @@ -package org.hl7.fhir.dstu2016may.hapi.validation; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.*; -import java.util.concurrent.TimeUnit; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import ca.uhn.fhir.rest.api.Constants; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.time.DateUtils; -import org.fhir.ucum.UcumService; -import org.hl7.fhir.common.hapi.validation.ValidatorWrapper; -import org.hl7.fhir.convertors.VersionConvertor_14_50; -import org.hl7.fhir.dstu2016may.terminologies.ValueSetExpander; -import org.hl7.fhir.exceptions.TerminologyServiceException; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.formats.IParser; -import org.hl7.fhir.r5.formats.ParserType; -import org.hl7.fhir.r5.utils.INarrativeGenerator; -import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.model.Resource; -import org.hl7.fhir.dstu2016may.model.*; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.utilities.TerminologyServiceOptions; -import org.hl7.fhir.utilities.TranslationServices; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.w3c.dom.*; -import org.w3c.dom.Element; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.validation.IValidationContext; -import ca.uhn.fhir.validation.IValidatorModule; - -public class FhirInstanceValidator extends BaseValidatorBridge implements IValidatorModule { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidator.class); - - private boolean myAnyExtensionsAllowed = true; - private IResourceValidator.BestPracticeWarningLevel myBestPracticeWarningLevel; - private StructureDefinition myStructureDefintion; - private IValidationSupport myValidationSupport; - private boolean noTerminologyChecks = false; - private volatile WorkerContextWrapper myWrappedWorkerContext; - - private boolean errorForUnknownProfiles; - private List myExtensionDomains = Collections.emptyList(); - - /** - * Constructor - *

    - * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} - */ - public FhirInstanceValidator() { - this(new DefaultProfileValidationSupport()); - } - - /** - * Constructor which uses the given validation support - * - * @param theValidationSupport The validation support - */ - public FhirInstanceValidator(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:

      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(List extensionDomains) { - this.myExtensionDomains = extensionDomains; - return this; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:
      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(String... extensionDomains) { - this.myExtensionDomains = Arrays.asList(extensionDomains); - return this; - } - - private String determineResourceName(Document theDocument) { - NodeList list = theDocument.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i) instanceof Element) { - return list.item(i).getLocalName(); - } - } - return theDocument.getDocumentElement().getLocalName(); - } - - private ArrayList determineIfProfilesSpecified(Document theDocument) { - ArrayList profileNames = new ArrayList(); - NodeList list = theDocument.getChildNodes().item(0).getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeName().compareToIgnoreCase("meta") == 0) { - NodeList metaList = list.item(i).getChildNodes(); - for (int j = 0; j < metaList.getLength(); j++) { - if (metaList.item(j).getNodeName().compareToIgnoreCase("profile") == 0) { - profileNames.add(metaList.item(j).getAttributes().item(0).getNodeValue()); - } - } - break; - } - } - return profileNames; - } - - private StructureDefinition findStructureDefinitionForResourceName(final FhirContext theCtx, String resourceName) { - String sdName = null; - try { - // Test if a URL was passed in specifying the structure definition and test if "StructureDefinition" is part of the URL - URL testIfUrl = new URL(resourceName); - sdName = resourceName; - } catch (MalformedURLException e) { - sdName = "http://hl7.org/fhir/StructureDefinition/" + resourceName; - } - StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : myValidationSupport.fetchStructureDefinition(theCtx, sdName); - return profile; - } - - public void flushCaches() { - myWrappedWorkerContext = null; - } - - /** - * Returns the "best practice" warning level (default is {@link IResourceValidator.BestPracticeWarningLevel#Hint}). - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link IResourceValidator.BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link IResourceValidator.BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - */ - public IResourceValidator.BestPracticeWarningLevel getBestPracticeWarningLevel() { - return myBestPracticeWarningLevel; - } - - /** - * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at - * this level. - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link IResourceValidator.BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link IResourceValidator.BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @param theBestPracticeWarningLevel The level, must not be null - */ - public void setBestPracticeWarningLevel(IResourceValidator.BestPracticeWarningLevel theBestPracticeWarningLevel) { - Validate.notNull(theBestPracticeWarningLevel); - myBestPracticeWarningLevel = theBestPracticeWarningLevel; - } - - /** - * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public IValidationSupport getValidationSupport() { - return myValidationSupport; - } - - /** - * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public void setValidationSupport(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - myWrappedWorkerContext = null; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public boolean isAnyExtensionsAllowed() { - return myAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { - myAnyExtensionsAllowed = theAnyExtensionsAllowed; - } - - public boolean isErrorForUnknownProfiles() { - return errorForUnknownProfiles; - } - - public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { - this.errorForUnknownProfiles = errorForUnknownProfiles; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public boolean isNoTerminologyChecks() { - return noTerminologyChecks; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { - noTerminologyChecks = theNoTerminologyChecks; - } - - public void setStructureDefintion(StructureDefinition theStructureDefintion) { - myStructureDefintion = theStructureDefintion; - } - - private List getExtensionDomains() { - return myExtensionDomains; - } - - @Override - protected List validate(IValidationContext theValidationCtx) { - final FhirContext ctx = theValidationCtx.getFhirContext(); - - WorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; - if (wrappedWorkerContext == null) { - HapiWorkerContext workerContext = new HapiWorkerContext(ctx, myValidationSupport); - wrappedWorkerContext = new WorkerContextWrapper(workerContext); - } - myWrappedWorkerContext = wrappedWorkerContext; - - return new ValidatorWrapper() - .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) - .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) - .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) - .setExtensionDomains(getExtensionDomains()) - .setNoTerminologyChecks(isNoTerminologyChecks()) - .validate(wrappedWorkerContext, theValidationCtx); - - } - - - private static class WorkerContextWrapper implements IWorkerContext { - private final HapiWorkerContext myWrap; - private volatile List myAllStructures; - private LoadingCache myFetchResourceCache; - private org.hl7.fhir.r5.model.Parameters myExpansionProfile; - - WorkerContextWrapper(HapiWorkerContext theWorkerContext) { - myWrap = theWorkerContext; - - long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND; - if (System.getProperties().containsKey(ca.uhn.fhir.rest.api.Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)) { - timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); - } - - myFetchResourceCache = Caffeine.newBuilder() - .expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS) - .maximumSize(10000) - .build(key -> { - org.hl7.fhir.dstu2016may.model.Resource fetched; - switch (key.getResourceName()) { - case "StructureDefinition": - fetched = myWrap.fetchResource(StructureDefinition.class, key.getUri()); - break; - case "ValueSet": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "CodeSystem": - fetched = myWrap.fetchResource(CodeSystem.class, key.getUri()); - break; - case "Questionnaire": - fetched = myWrap.fetchResource(Questionnaire.class, key.getUri()); - break; - case "ImplementationGuide": - fetched = myWrap.fetchResource(ImplementationGuide.class, key.getUri()); - break; - default: - throw new UnsupportedOperationException("Don't know how to fetch " + key.getResourceName()); - } - - if (fetched == null) { - return null; - } - - try { - if (fetched instanceof StructureDefinition) { - return convert((StructureDefinition) fetched); - } - return VersionConvertor_14_50.convertResource(fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - }); - } - - @Override - public List allConformanceResources() { - throw new UnsupportedOperationException(); - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - @Override - public void generateSnapshot(org.hl7.fhir.r5.model.StructureDefinition p) throws FHIRException { - // nothing yet - } - - @Override - public org.hl7.fhir.r5.model.Parameters getExpansionParameters() { - return myExpansionProfile; - } - - @Override - public void setExpansionProfile(org.hl7.fhir.r5.model.Parameters expParameters) { - myExpansionProfile = expParameters; - } - - @Override - public List allStructures() { - - List retVal = myAllStructures; - if (retVal == null) { - retVal = new ArrayList<>(); - for (StructureDefinition next : myWrap.allStructures()) { - try { - retVal.add(convert(next)); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - myAllStructures = retVal; - } - - return retVal; - } - - public org.hl7.fhir.r5.model.StructureDefinition convert(StructureDefinition next) { - org.hl7.fhir.r5.model.StructureDefinition structureDefinition = VersionConvertor_14_50.convertStructureDefinition(next); - if (next.getDerivation() != org.hl7.fhir.dstu2016may.model.StructureDefinition.TypeDerivationRule.CONSTRAINT) { - structureDefinition.setType(next.getName()); - } - return structureDefinition; - } - - @Override - public List getStructures() { - return allStructures(); - } - - @Override - public void cacheResource(org.hl7.fhir.r5.model.Resource res) { - throw new UnsupportedOperationException(); - } - - @Nonnull - private ValidationResult convertValidationResult(@Nullable org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult theResult) { - ValidationResult retVal = null; - if (theResult != null) { - ValidationMessage.IssueSeverity issueSeverity = ValidationMessage.IssueSeverity.fromCode(theResult.getSeverity().toCode()); - String message = theResult.getMessage(); - org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent conceptDefinition = null; - if (theResult.asConceptDefinition() != null) { - try { - conceptDefinition = VersionConvertor_14_50.convertConceptDefinitionComponent(theResult.asConceptDefinition()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - retVal = new ValidationResult(issueSeverity, message, conceptDefinition); - } - - if (retVal == null) { - retVal = new ValidationResult(ValidationMessage.IssueSeverity.ERROR, "Validation failed"); - } - - return retVal; - } - - @Override - public org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean heiarchical) { - ValueSet convertedSource; - try { - convertedSource = VersionConvertor_14_50.convertValueSet(source); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - org.hl7.fhir.dstu2016may.terminologies.ValueSetExpander.ValueSetExpansionOutcome expanded = myWrap.expandVS(convertedSource, false); - - org.hl7.fhir.r5.model.ValueSet convertedResult = null; - if (expanded.getValueset() != null) { - try { - convertedResult = VersionConvertor_14_50.convertValueSet(expanded.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - String error = expanded.getError(); - - return new org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, null); - } - - @Override - public org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heiarchical) { - throw new UnsupportedOperationException(); - } - - @Override - public org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { - ValueSet.ConceptSetComponent convertedInc = null; - if (inc != null) { - try { - convertedInc = VersionConvertor_14_50.convertConceptSetComponent(inc); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSet.ValueSetExpansionComponent expansion = myWrap.expandVS(convertedInc); - org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent valueSetExpansionComponent = null; - if (expansion != null) { - try { - valueSetExpansionComponent = VersionConvertor_14_50.convertValueSetExpansionComponent(expansion); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.r5.model.ValueSet vsc = new org.hl7.fhir.r5.model.ValueSet(); - vsc.setExpansion(valueSetExpansionComponent); - org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome outcome2 = new org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome(vsc); - return outcome2; - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions options, String system, String code, String display) { - return null; - } - - @Override - public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { - CodeSystem fetched = myWrap.fetchCodeSystem(system); - if (fetched == null) { - return null; - } - try { - return VersionConvertor_14_50.convertCodeSystem(fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - @Override - public T fetchResource(Class class_, String uri) { - - ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); - @SuppressWarnings("unchecked") - T retVal = (T) myFetchResourceCache.get(key); - - return retVal; - } - - @Override - public org.hl7.fhir.r5.model.Resource fetchResourceById(String type, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public T fetchResourceWithException(Class class_, String uri) throws FHIRException { - T retVal = fetchResource(class_, uri); - if (retVal == null) { - throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); - } - return retVal; - } - - @Override - public List findMapsForSource(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String name) { - return myWrap.getAbbreviation(name); - } - - @Override - public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String type) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - return myWrap.getResourceNames(); - } - - @Override - public Set getResourceNamesAsSet() { - return new HashSet<>(myWrap.getResourceNames()); - } - - @Override - public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getOverrideVersionNs() { - return null; - } - - @Override - public void setOverrideVersionNs(String value) { - - } - - @Override - public org.hl7.fhir.r5.model.StructureDefinition fetchTypeDefinition(String typeName) { - return fetchResource(org.hl7.fhir.r5.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); - } - - - @Override - public List getTypeNames() { - return myWrap.getResourceNames(); - } - - @Override - public UcumService getUcumService() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType type) { - throw new UnsupportedOperationException(); - } - - @Override - public void setUcumService(UcumService ucumService) { - throw new UnsupportedOperationException(); - } - - @Override - public String getVersion() { - return "1.4"; - } - - @Override - public boolean hasCache() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasResource(Class class_, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isNoTerminologyServer() { - throw new UnsupportedOperationException(); - } - - @Override - public TranslationServices translator() { - throw new UnsupportedOperationException(); - } - - @Override - public List listTransforms() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public String oid2Uri(String code) { - return myWrap.oid2Uri(code); - } - - @Override - public ILoggingService getLogger() { - return null; - } - - @Override - public void setLogger(ILoggingService logger) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean supportsSystem(String system) { - return myWrap.supportsSystem(system); - } - - @Override - public Set typeTails() { - return myWrap.typeTails(); - } - - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - - try { - if (vs != null) { - convertedVs = VersionConvertor_14_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - try { - if (vs != null) { - convertedVs = VersionConvertor_14_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet vs) { - Coding convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_14_50.convertCoding(code); - } - if (vs != null) { - convertedVs = VersionConvertor_14_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet vs) { - CodeableConcept convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_14_50.convertCodeableConcept(code); - } - if (vs != null) { - convertedVs = VersionConvertor_14_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent vsi) { - ValueSet.ConceptSetComponent conceptSetComponent = null; - if (vsi != null) { - try { - conceptSetComponent = VersionConvertor_14_50.convertConceptSetComponent(vsi); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.dstu2016may.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, conceptSetComponent); - return convertValidationResult(result); - } - - } - - private static class ResourceKey { - private final int myHashCode; - private String myResourceName; - private String myUri; - - private ResourceKey(String theResourceName, String theUri) { - myResourceName = theResourceName; - myUri = theUri; - myHashCode = new HashCodeBuilder(17, 37) - .append(myResourceName) - .append(myUri) - .toHashCode(); - } - - @Override - public boolean equals(Object theO) { - if (this == theO) { - return true; - } - - if (theO == null || getClass() != theO.getClass()) { - return false; - } - - ResourceKey that = (ResourceKey) theO; - - return new EqualsBuilder() - .append(myResourceName, that.myResourceName) - .append(myUri, that.myUri) - .isEquals(); - } - - public String getResourceName() { - return myResourceName; - } - - public String getUri() { - return myUri; - } - - @Override - public int hashCode() { - return myHashCode; - } - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/BaseValidatorBridge.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/BaseValidatorBridge.java deleted file mode 100644 index 0cdc2411681..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/BaseValidatorBridge.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import ca.uhn.fhir.validation.*; - -/** - * Base class for a bridge between the RI validation tools and HAPI - */ -abstract class BaseValidatorBridge implements IValidatorModule { - - public BaseValidatorBridge() { - super(); - } - - private void doValidate(IValidationContext theCtx) { - List messages = validate(theCtx); - - for (ValidationMessage riMessage : messages) { - SingleValidationMessage hapiMessage = new SingleValidationMessage(); - if (riMessage.getCol() != -1) { - hapiMessage.setLocationCol(riMessage.getCol()); - } - if (riMessage.getLine() != -1) { - hapiMessage.setLocationLine(riMessage.getLine()); - } - hapiMessage.setLocationString(riMessage.getLocation()); - hapiMessage.setMessage(riMessage.getMessage()); - if (riMessage.getLevel() != null) { - hapiMessage.setSeverity(ResultSeverityEnum.fromCode(riMessage.getLevel().toCode())); - } - theCtx.addValidationMessage(hapiMessage); - } - } - - protected abstract List validate(IValidationContext theCtx); - - @Override - public void validateResource(IValidationContext theCtx) { - doValidate(theCtx); - } - -} \ No newline at end of file diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/CachingValidationSupport.java deleted file mode 100644 index 4eda95a6cb3..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/CachingValidationSupport.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.dstu3.model.ValueSet; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; - -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; - -@SuppressWarnings("unchecked") -public class CachingValidationSupport implements IValidationSupport { - - private static final Logger ourLog = LoggerFactory.getLogger(CachingValidationSupport.class); - private final IValidationSupport myWrap; - private final Cache myCache; - - public CachingValidationSupport(IValidationSupport theWrap) { - myWrap = theWrap; - myCache = Caffeine.newBuilder().expireAfterWrite(60, TimeUnit.SECONDS).build(); - } - - @Override - public ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return myWrap.expandValueSet(theContext, theInclude); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return loadFromCache("fetchAllConformanceResources", - t -> myWrap.fetchAllConformanceResources(theContext)); - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return loadFromCache("fetchAllStructureDefinitions", - t -> myWrap.fetchAllStructureDefinitions(theContext)); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myWrap.fetchCodeSystem(theContext, uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myWrap.fetchValueSet(theContext, uri); - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return loadFromCache("fetchResource " + theClass.getName() + " " + theUri, - t -> myWrap.fetchResource(theContext, theClass, theUri)); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myWrap.fetchStructureDefinition(theCtx, theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return myWrap.isCodeSystemSupported(theContext, theSystem); - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - String key = "validateCode " + theCodeSystem + " " + theCode + " " + defaultIfBlank(theValueSetUrl, "NO_VS"); - return loadFromCache(key, t -> myWrap.validateCode(theContext, theCodeSystem, theCode, theDisplay, theValueSetUrl)); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - return myWrap.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return myWrap.lookupCode(theContext, theSystem, theCode); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return myWrap.generateSnapshot(theInput, theUrl, theName); - } - - @Nullable - private T loadFromCache(String theKey, Function theLoader) { - ourLog.trace("Loading: {}", theKey); - Function> loaderWrapper = key -> { - ourLog.trace("Loading {} from cache", theKey); - return Optional.ofNullable(theLoader.apply(theKey)); - }; - Optional result = (Optional) myCache.get(theKey, loaderWrapper); - return result.orElse(null); - } - - public void flushCaches() { - myCache.invalidateAll(); - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidator.java deleted file mode 100644 index 25c4cd84b3e..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidator.java +++ /dev/null @@ -1,788 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.validation.IInstanceValidatorModule; -import ca.uhn.fhir.validation.IValidationContext; -import ca.uhn.fhir.validation.IValidatorModule; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.time.DateUtils; -import org.fhir.ucum.UcumService; -import org.hl7.fhir.common.hapi.validation.ValidatorWrapper; -import org.hl7.fhir.convertors.VersionConvertor_30_50; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.*; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.exceptions.TerminologyServiceException; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.formats.IParser; -import org.hl7.fhir.r5.formats.ParserType; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.utils.INarrativeGenerator; -import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.utils.IResourceValidator.BestPracticeWarningLevel; -import org.hl7.fhir.utilities.TerminologyServiceOptions; -import org.hl7.fhir.utilities.TranslationServices; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.*; -import java.util.concurrent.TimeUnit; - -@SuppressWarnings({"PackageAccessibility", "Duplicates"}) -public class FhirInstanceValidator extends BaseValidatorBridge implements IInstanceValidatorModule { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidator.class); - - private boolean myAnyExtensionsAllowed = true; - private BestPracticeWarningLevel myBestPracticeWarningLevel; - private StructureDefinition myStructureDefintion; - private IValidationSupport myValidationSupport; - private boolean noTerminologyChecks = false; - private volatile WorkerContextWrapper myWrappedWorkerContext; - - private boolean errorForUnknownProfiles; - private List myExtensionDomains = Collections.emptyList(); - - /** - * Constructor - *

    - * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} - */ - public FhirInstanceValidator() { - this(new DefaultProfileValidationSupport()); - } - - /** - * Constructor which uses the given validation support - * - * @param theValidationSupport The validation support - */ - public FhirInstanceValidator(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:

      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(List extensionDomains) { - this.myExtensionDomains = extensionDomains; - return this; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:
      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(String... extensionDomains) { - this.myExtensionDomains = Arrays.asList(extensionDomains); - return this; - } - - private String determineResourceName(Document theDocument) { - NodeList list = theDocument.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i) instanceof Element) { - return list.item(i).getLocalName(); - } - } - return theDocument.getDocumentElement().getLocalName(); - } - - private ArrayList determineIfProfilesSpecified(Document theDocument) { - ArrayList profileNames = new ArrayList(); - NodeList list = theDocument.getChildNodes().item(0).getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeName().compareToIgnoreCase("meta") == 0) { - NodeList metaList = list.item(i).getChildNodes(); - for (int j = 0; j < metaList.getLength(); j++) { - if (metaList.item(j).getNodeName().compareToIgnoreCase("profile") == 0) { - profileNames.add(metaList.item(j).getAttributes().item(0).getNodeValue()); - } - } - break; - } - } - return profileNames; - } - - private StructureDefinition findStructureDefinitionForResourceName(final FhirContext theCtx, String resourceName) { - String sdName = null; - try { - // Test if a URL was passed in specifying the structure definition and test if "StructureDefinition" is part of the URL - URL testIfUrl = new URL(resourceName); - sdName = resourceName; - } catch (MalformedURLException e) { - sdName = "http://hl7.org/fhir/StructureDefinition/" + resourceName; - } - StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : myValidationSupport.fetchStructureDefinition(theCtx, sdName); - return profile; - } - - public void flushCaches() { - myWrappedWorkerContext = null; - } - - /** - * Returns the "best practice" warning level (default is {@link BestPracticeWarningLevel#Hint}). - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @see #setBestPracticeWarningLevel(BestPracticeWarningLevel) - */ - public BestPracticeWarningLevel getBestPracticeWarningLevel() { - return myBestPracticeWarningLevel; - } - - /** - * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at - * this level. - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @param theBestPracticeWarningLevel The level, must not be null - */ - public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPracticeWarningLevel) { - Validate.notNull(theBestPracticeWarningLevel); - myBestPracticeWarningLevel = theBestPracticeWarningLevel; - } - - /** - * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public IValidationSupport getValidationSupport() { - return myValidationSupport; - } - - /** - * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public void setValidationSupport(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - myWrappedWorkerContext = null; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public boolean isAnyExtensionsAllowed() { - return myAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { - myAnyExtensionsAllowed = theAnyExtensionsAllowed; - } - - public boolean isErrorForUnknownProfiles() { - return errorForUnknownProfiles; - } - - public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { - this.errorForUnknownProfiles = errorForUnknownProfiles; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public boolean isNoTerminologyChecks() { - return noTerminologyChecks; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { - noTerminologyChecks = theNoTerminologyChecks; - } - - public void setStructureDefintion(StructureDefinition theStructureDefintion) { - myStructureDefintion = theStructureDefintion; - } - - private List getExtensionDomains() { - return myExtensionDomains; - } - - @Override - protected List validate(IValidationContext theValidationCtx) { - final FhirContext ctx = theValidationCtx.getFhirContext(); - - WorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; - if (wrappedWorkerContext == null) { - HapiWorkerContext workerContext = new HapiWorkerContext(ctx, myValidationSupport); - wrappedWorkerContext = new WorkerContextWrapper(workerContext); - } - myWrappedWorkerContext = wrappedWorkerContext; - - return new ValidatorWrapper() - .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) - .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) - .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) - .setExtensionDomains(getExtensionDomains()) - .setNoTerminologyChecks(isNoTerminologyChecks()) - .validate(wrappedWorkerContext, theValidationCtx); - - } - - - private static class WorkerContextWrapper implements IWorkerContext { - private final HapiWorkerContext myWrap; - private final VersionConvertor_30_50 myConverter; - private volatile List myAllStructures; - private LoadingCache myFetchResourceCache; - private org.hl7.fhir.r5.model.Parameters myExpansionProfile; - - WorkerContextWrapper(HapiWorkerContext theWorkerContext) { - myWrap = theWorkerContext; - myConverter = new VersionConvertor_30_50(); - - long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND; - if (System.getProperties().containsKey(ca.uhn.fhir.rest.api.Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)) { - timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); - } - - myFetchResourceCache = Caffeine.newBuilder() - .expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS) - .maximumSize(10000) - .build(key -> { - Resource fetched; - switch (key.getResourceName()) { - case "StructureDefinition": - fetched = myWrap.fetchResource(StructureDefinition.class, key.getUri()); - break; - case "ValueSet": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "CodeSystem": - fetched = myWrap.fetchResource(CodeSystem.class, key.getUri()); - break; - case "Questionnaire": - fetched = myWrap.fetchResource(Questionnaire.class, key.getUri()); - break; - case "ImplementationGuide": - fetched = myWrap.fetchResource(ImplementationGuide.class, key.getUri()); - break; - default: - throw new UnsupportedOperationException("Don't know how to fetch " + key.getResourceName()); - } - - if (fetched == null) { - return null; - } - - try { - return VersionConvertor_30_50.convertResource(fetched, true); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - }); - } - - @Override - public List allConformanceResources() { - throw new UnsupportedOperationException(); - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - @Override - public void generateSnapshot(org.hl7.fhir.r5.model.StructureDefinition p) throws FHIRException { - // nothing yet - } - - @Override - public org.hl7.fhir.r5.model.Parameters getExpansionParameters() { - return myExpansionProfile; - } - - @Override - public void setExpansionProfile(org.hl7.fhir.r5.model.Parameters expParameters) { - myExpansionProfile = expParameters; - } - - @Override - public List allStructures() { - - List retVal = myAllStructures; - if (retVal == null) { - retVal = new ArrayList<>(); - for (StructureDefinition next : myWrap.allStructures()) { - try { - retVal.add(VersionConvertor_30_50.convertStructureDefinition(next)); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - myAllStructures = retVal; - } - - return retVal; - } - - @Override - public List getStructures() { - return allStructures(); - } - - @Override - public void cacheResource(org.hl7.fhir.r5.model.Resource res) { - throw new UnsupportedOperationException(); - } - - @Nonnull - private ValidationResult convertValidationResult(@Nullable org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult theResult) { - ValidationResult retVal = null; - if (theResult != null) { - IssueSeverity issueSeverity = theResult.getSeverity(); - String message = theResult.getMessage(); - org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent conceptDefinition = null; - if (theResult.asConceptDefinition() != null) { - try { - conceptDefinition = VersionConvertor_30_50.convertConceptDefinitionComponent(theResult.asConceptDefinition()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - retVal = new ValidationResult(issueSeverity, message, conceptDefinition); - } - - if (retVal == null) { - retVal = new ValidationResult(IssueSeverity.ERROR, "Validation failed"); - } - - return retVal; - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean heiarchical) { - ValueSet convertedSource; - try { - convertedSource = VersionConvertor_30_50.convertValueSet(source); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome expanded = myWrap.expandVS(convertedSource, cacheOk, heiarchical); - - org.hl7.fhir.r5.model.ValueSet convertedResult = null; - if (expanded.getValueset() != null) { - try { - convertedResult = VersionConvertor_30_50.convertValueSet(expanded.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - String error = expanded.getError(); - ValueSetExpander.TerminologyServiceErrorClass result = null; - - return new ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, result); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heiarchical) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { - ValueSet.ConceptSetComponent convertedInc = null; - if (inc != null) { - try { - convertedInc = VersionConvertor_30_50.convertConceptSetComponent(inc); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSet.ValueSetExpansionComponent expansion = myWrap.expandVS(convertedInc, heirarchical); - org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent valueSetExpansionComponent = null; - if (expansion != null) { - try { - valueSetExpansionComponent = VersionConvertor_30_50.convertValueSetExpansionComponent(expansion); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSetExpander.ValueSetExpansionOutcome outcome = new ValueSetExpander.ValueSetExpansionOutcome(new org.hl7.fhir.r5.model.ValueSet()); - outcome.getValueset().setExpansion(valueSetExpansionComponent); - return outcome; - } - - @Override - public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { - CodeSystem fetched = myWrap.fetchCodeSystem(system); - if (fetched == null) { - return null; - } - try { - return VersionConvertor_30_50.convertCodeSystem(fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - @Override - public T fetchResource(Class class_, String uri) { - - ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); - @SuppressWarnings("unchecked") - T retVal = (T) myFetchResourceCache.get(key); - - return retVal; - } - - @Override - public org.hl7.fhir.r5.model.Resource fetchResourceById(String type, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public T fetchResourceWithException(Class class_, String uri) throws FHIRException { - T retVal = fetchResource(class_, uri); - if (retVal == null) { - throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); - } - return retVal; - } - - @Override - public List findMapsForSource(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String name) { - return myWrap.getAbbreviation(name); - } - - public VersionConvertor_30_50 getConverter() { - return myConverter; - } - - @Override - public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType type) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String type) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - return myWrap.getResourceNames(); - } - - @Override - public Set getResourceNamesAsSet() { - return new HashSet<>(myWrap.getResourceNames()); - } - - @Override - public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getOverrideVersionNs() { - return null; - } - - @Override - public void setOverrideVersionNs(String value) { - - } - - @Override - public org.hl7.fhir.r5.model.StructureDefinition fetchTypeDefinition(String typeName) { - return fetchResource(org.hl7.fhir.r5.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); - } - - @Override - public List getTypeNames() { - return myWrap.getTypeNames(); - } - - @Override - public UcumService getUcumService() { - throw new UnsupportedOperationException(); - } - - @Override - public void setUcumService(UcumService ucumService) { - throw new UnsupportedOperationException(); - } - - @Override - public String getVersion() { - return myWrap.getVersion(); - } - - @Override - public boolean hasCache() { - return myWrap.hasCache(); - } - - @Override - public boolean hasResource(Class class_, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isNoTerminologyServer() { - return myWrap.isNoTerminologyServer(); - } - - @Override - public List listTransforms() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public String oid2Uri(String code) { - return myWrap.oid2Uri(code); - } - - @Override - public ILoggingService getLogger() { - return null; - } - - @Override - public void setLogger(ILoggingService logger) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean supportsSystem(String system) { - return myWrap.supportsSystem(system); - } - - @Override - public TranslationServices translator() { - throw new UnsupportedOperationException(); - } - - @Override - public Set typeTails() { - return myWrap.typeTails(); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display) { - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - - try { - if (vs != null) { - convertedVs = VersionConvertor_30_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - try { - if (vs != null) { - convertedVs = VersionConvertor_30_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet vs) { - Coding convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_30_50.convertCoding(code); - } - if (vs != null) { - convertedVs = VersionConvertor_30_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet vs) { - CodeableConcept convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_30_50.convertCodeableConcept(code); - } - if (vs != null) { - convertedVs = VersionConvertor_30_50.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent vsi) { - ValueSet.ConceptSetComponent conceptSetComponent = null; - if (vsi != null) { - try { - conceptSetComponent = VersionConvertor_30_50.convertConceptSetComponent(vsi); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, conceptSetComponent); - return convertValidationResult(result); - } - - } - - private static class ResourceKey { - private final int myHashCode; - private String myResourceName; - private String myUri; - - private ResourceKey(String theResourceName, String theUri) { - myResourceName = theResourceName; - myUri = theUri; - myHashCode = new HashCodeBuilder(17, 37) - .append(myResourceName) - .append(myUri) - .toHashCode(); - } - - @Override - public boolean equals(Object theO) { - if (this == theO) { - return true; - } - - if (theO == null || getClass() != theO.getClass()) { - return false; - } - - ResourceKey that = (ResourceKey) theO; - - return new EqualsBuilder() - .append(myResourceName, that.myResourceName) - .append(myUri, that.myUri) - .isEquals(); - } - - public String getResourceName() { - return myResourceName; - } - - public String getUri() { - return myUri; - } - - @Override - public int hashCode() { - return myHashCode; - } - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/PrePopulatedValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/PrePopulatedValidationSupport.java deleted file mode 100644 index 1e1e4f176d0..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/PrePopulatedValidationSupport.java +++ /dev/null @@ -1,198 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.MetadataResource; -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.instance.model.api.IBaseResource; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -/** - * This class is an implementation of {@link IValidationSupport} which may be pre-populated - * with a collection of validation resources to be used by the validator. - */ -public class PrePopulatedValidationSupport implements IValidationSupport { - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - - /** - * Constructor - */ - public PrePopulatedValidationSupport() { - myStructureDefinitions = new HashMap<>(); - myValueSets = new HashMap<>(); - myCodeSystems = new HashMap<>(); - } - - /** - * Constructor - * - * @param theStructureDefinitions The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and - * values are the resource itself. - * @param theValueSets The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - * @param theCodeSystems The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - */ - public PrePopulatedValidationSupport(Map theStructureDefinitions, Map theValueSets, Map theCodeSystems) { - myStructureDefinitions = theStructureDefinitions; - myValueSets = theValueSets; - myCodeSystems = theCodeSystems; - } - - /** - * Add a new CodeSystem resource which will be available to the validator. Note that - * {@link CodeSystem#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addCodeSystem(CodeSystem theCodeSystem) { - Validate.notBlank(theCodeSystem.getUrl(), "theCodeSystem.getUrl() must not return a value"); - addToMap(theCodeSystem, myCodeSystems, theCodeSystem.getUrl()); - } - - /** - * Add a new StructureDefinition resource which will be available to the validator. Note that - * {@link StructureDefinition#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addStructureDefinition(StructureDefinition theStructureDefinition) { - Validate.notBlank(theStructureDefinition.getUrl(), "theStructureDefinition.getUrl() must not return a value"); - addToMap(theStructureDefinition, myStructureDefinitions, theStructureDefinition.getUrl()); - } - - private void addToMap(T theStructureDefinition, Map map, String theUrl) { - if (isNotBlank(theUrl)) { - map.put(theUrl, theStructureDefinition); - - int lastSlashIdx = theUrl.lastIndexOf('/'); - if (lastSlashIdx != -1) { - map.put(theUrl.substring(lastSlashIdx + 1), theStructureDefinition); - int previousSlashIdx = theUrl.lastIndexOf('/', lastSlashIdx - 1); - if (previousSlashIdx != -1) { - map.put(theUrl.substring(previousSlashIdx + 1), theStructureDefinition); - } - } - - } - } - - /** - * Add a new ValueSet resource which will be available to the validator. Note that - * {@link ValueSet#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addValueSet(ValueSet theValueSet) { - Validate.notBlank(theValueSet.getUrl(), "theValueSet.getUrl() must not return a value"); - addToMap(theValueSet, myValueSets, theValueSet.getUrl()); - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList<>(myStructureDefinitions.values()); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myCodeSystems.get(uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myValueSets.get(uri); - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) myStructureDefinitions.get(theUri); - } - if (theClass.equals(ValueSet.class)) { - return (T) myValueSets.get(theUri); - } - if (theClass.equals(CodeSystem.class)) { - return (T) myCodeSystems.get(theUri); - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myStructureDefinitions.get(theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theName) { - return null; - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/SnapshotGeneratingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/SnapshotGeneratingValidationSupport.java deleted file mode 100644 index 2c13ae643e7..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/SnapshotGeneratingValidationSupport.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.conformance.ProfileUtilities; -import org.hl7.fhir.dstu3.context.IWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.ElementDefinition; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.dstu3.model.ValueSet; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import java.util.ArrayList; -import java.util.List; - -/** - * Simple validation support module that handles profile snapshot generation. This is - * separate from other funcrtions since it needs a link to a validation support - * module itself, and it is useful to be able to pass a chain in. - */ -public class SnapshotGeneratingValidationSupport implements IValidationSupport { - private final FhirContext myCtx; - private final IValidationSupport myValidationSupport; - - public SnapshotGeneratingValidationSupport(FhirContext theCtx, IValidationSupport theValidationSupport) { - Validate.notNull(theCtx); - Validate.notNull(theValidationSupport); - myCtx = theCtx; - myValidationSupport = theValidationSupport; - } - - @Override - public ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return null; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theProfileName) { - IWorkerContext context = new HapiWorkerContext(myCtx, myValidationSupport); - ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new MyProfileKnowledgeWorker(); - ArrayList messages = new ArrayList<>(); - - StructureDefinition base = myValidationSupport.fetchStructureDefinition(myCtx, theInput.getBaseDefinition()); - if (base == null) { - throw new PreconditionFailedException("Unknown base definition: " + theInput.getBaseDefinition()); - } - - new ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, theInput, theUrl, theProfileName); - - return theInput; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - private class MyProfileKnowledgeWorker implements 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(StructureDefinition def, ElementDefinition.ElementDefinitionBindingComponent binding, String path) throws FHIRException { - return null; - } - - @Override - public String getLinkForProfile(StructureDefinition profile, String url) { - return null; - } - - @Override - public boolean prependLinks() { - return false; - } - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/ValidationSupportChain.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/ValidationSupportChain.java deleted file mode 100644 index 9cc2432ca0d..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/hapi/validation/ValidationSupportChain.java +++ /dev/null @@ -1,205 +0,0 @@ -package org.hl7.fhir.dstu3.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.StructureDefinition; -import org.hl7.fhir.dstu3.model.ValueSet; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class ValidationSupportChain implements IValidationSupport { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidationSupportChain.class); - - private List myChain; - - /** - * Constructor - */ - public ValidationSupportChain() { - myChain = new ArrayList<>(); - } - - /** - * Constructor - */ - public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { - this(); - for (IValidationSupport next : theValidationSupportModules) { - if (next != null) { - myChain.add(next); - } - } - } - - public void addValidationSupport(IValidationSupport theValidationSupport) { - myChain.add(theValidationSupport); - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - for (IValidationSupport next : myChain) { - if (isNotBlank(theInclude.getSystem())) { - if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) { - ValueSetExpansionComponent expansion = next.expandValueSet(theCtx, theInclude); - if (expansion != null) { - return expansion; - } - } - } - ValueSetExpansionComponent retVal = next.expandValueSet(theCtx, theInclude); - if (retVal != null && retVal.getContains().size() > 0) { - return retVal; - } - } - return myChain.get(0).expandValueSet(theCtx, theInclude); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - List retVal = new ArrayList<>(); - for (IValidationSupport next : myChain) { - List candidates = next.fetchAllConformanceResources(theContext); - if (candidates != null) { - retVal.addAll(candidates); - } - } - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - ArrayList retVal = new ArrayList(); - Set urls = new HashSet<>(); - for (IValidationSupport nextSupport : myChain) { - List list = nextSupport.fetchAllStructureDefinitions(theContext); - if (list != null) { - for (StructureDefinition next : list) { - if (isBlank(next.getUrl()) || urls.add(next.getUrl())) { - retVal.add(next); - } - } - } - } - return retVal; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String uri) { - for (IValidationSupport next : myChain) { - ValueSet retVal = next.fetchValueSet(theCtx, uri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - for (IValidationSupport next : myChain) { - T retVal = next.fetchResource(theContext, theClass, theUri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - for (IValidationSupport next : myChain) { - StructureDefinition retVal = next.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theSystem)) { - return true; - } - } - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - - ourLog.debug("Validating code {} in chain with {} items", theCode, myChain.size()); - - for (IValidationSupport next : myChain) { - if (theCodeSystem != null && next.isCodeSystemSupported(theCtx, theCodeSystem)) { - CodeValidationResult result = next.validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - if (result != null) { - ourLog.debug("Chain item {} returned outcome {}", next, result.isOk()); - return result; - } - } else { - ourLog.debug("Chain item {} does not support code system {}", next, theCodeSystem); - } - } - return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - CodeValidationResult retVal = null; - for (IValidationSupport next : myChain) { - retVal = next.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - if (retVal != null) { - break; - } - } - return retVal; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theContext, theSystem)) { - return next.lookupCode(theContext, theSystem, theCode); - } - } - return null; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theProfileName) { - StructureDefinition outcome = null; - for (org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport next : myChain) { - outcome = next.generateSnapshot(theInput, theUrl, theProfileName); - if (outcome != null) { - break; - } - } - return outcome; - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/BaseValidatorBridge.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/BaseValidatorBridge.java deleted file mode 100644 index 502102f37f7..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/BaseValidatorBridge.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import ca.uhn.fhir.validation.*; - -/** - * Base class for a bridge between the RI validation tools and HAPI - */ -abstract class BaseValidatorBridge implements IValidatorModule { - - public BaseValidatorBridge() { - super(); - } - - private void doValidate(IValidationContext theCtx) { - List messages = validate(theCtx); - - for (ValidationMessage riMessage : messages) { - SingleValidationMessage hapiMessage = new SingleValidationMessage(); - if (riMessage.getCol() != -1) { - hapiMessage.setLocationCol(riMessage.getCol()); - } - if (riMessage.getLine() != -1) { - hapiMessage.setLocationLine(riMessage.getLine()); - } - hapiMessage.setLocationString(riMessage.getLocation()); - hapiMessage.setMessage(riMessage.getMessage()); - if (riMessage.getLevel() != null) { - hapiMessage.setSeverity(ResultSeverityEnum.fromCode(riMessage.getLevel().toCode())); - } - theCtx.addValidationMessage(hapiMessage); - } - } - - protected abstract List validate(IValidationContext theCtx); - - @Override - public void validateResource(IValidationContext theCtx) { - doValidate(theCtx); - } - -} \ No newline at end of file diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/CachingValidationSupport.java deleted file mode 100644 index f202393a24f..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/CachingValidationSupport.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import org.hl7.fhir.dstu2.model.StructureDefinition; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import javax.annotation.Nonnull; -import java.util.List; -import java.util.concurrent.TimeUnit; - -@SuppressWarnings("unchecked") -public class CachingValidationSupport implements IValidationSupport { - - private final IValidationSupport myWrap; - private final Cache myCache; - - public CachingValidationSupport(IValidationSupport theWrap) { - myWrap = theWrap; - myCache = Caffeine.newBuilder().expireAfterWrite(60, TimeUnit.SECONDS).build(); - } - - - @Override - public List allStructures() { - return (List) myCache.get("fetchAllStructureDefinitions", - t -> myWrap.allStructures()); - } - - @Override - public ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return myWrap.expandValueSet(theContext, theInclude); - } - - @Override - public ValueSet fetchCodeSystem(FhirContext theContext, String theSystem) { - return myWrap.fetchCodeSystem(theContext, theSystem); - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return myWrap.fetchResource(theContext, theClass, theUri); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return myWrap.isCodeSystemSupported(theContext, theSystem); - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { - return myWrap.validateCode(theContext, theCodeSystem, theCode, theDisplay); - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/DefaultProfileValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/DefaultProfileValidationSupport.java deleted file mode 100644 index 50be9aa2c3f..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/DefaultProfileValidationSupport.java +++ /dev/null @@ -1,178 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu2.model.*; -import org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class DefaultProfileValidationSupport implements IValidationSupport { - - private Map myDefaultValueSets; - private Map myCodeSystems; - private static final Set ourResourceNames; - private static final FhirContext ourHl7OrgCtx; - - static { - ourHl7OrgCtx = FhirContext.forDstu2Hl7Org(); - ourResourceNames = FhirContext.forDstu2().getResourceNames(); - } - - /** - * Constructor - */ - public DefaultProfileValidationSupport() { - super(); - } - - @Override - public List allStructures() { - ArrayList retVal = new ArrayList<>(); - - for (String next : ourResourceNames) { - StructureDefinition profile = FhirInstanceValidator.loadProfileOrReturnNull(null, ourHl7OrgCtx, next); - retVal.add(profile); - } - - return retVal; - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - return null; - } - - @Override - public ValueSet fetchCodeSystem(FhirContext theContext, String theSystem) { - synchronized (this) { - Map valueSets = myCodeSystems; - if (valueSets == null) { - valueSets = new HashMap<>(); - - loadValueSets(theContext, valueSets, "/org/hl7/fhir/instance/model/valueset/valuesets.xml"); - loadValueSets(theContext, valueSets, "/org/hl7/fhir/instance/model/valueset/v2-tables.xml"); - loadValueSets(theContext, valueSets, "/org/hl7/fhir/instance/model/valueset/v3-codesystems.xml"); - - myCodeSystems = valueSets; - } - - return valueSets.get(theSystem); - } - } - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theUri.startsWith("http://hl7.org/fhir/StructureDefinition/")) { - return (T) FhirInstanceValidator.loadProfileOrReturnNull(null, theContext, theUri.substring("http://hl7.org/fhir/StructureDefinition/".length())); - } - if (theUri.startsWith("http://hl7.org/fhir/ValueSet/")) { - Map defaultValueSets = myDefaultValueSets; - if (defaultValueSets == null) { - String path = theContext.getVersion().getPathToSchemaDefinitions().replace("/schema", "/valueset") + "/valuesets.xml"; - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(path); - if (valuesetText == null) { - return null; - } - InputStreamReader reader; - try { - reader = new InputStreamReader(valuesetText, "UTF-8"); - } catch (UnsupportedEncodingException e) { - // Shouldn't happen! - throw new InternalErrorException("UTF-8 encoding not supported on this platform", e); - } - - defaultValueSets = new HashMap<>(); - - FhirContext ctx = FhirInstanceValidator.getHl7OrgDstu2Ctx(theContext); - Bundle bundle = ctx.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - IdType nextId = new IdType(next.getFullUrl()); - if (nextId.isEmpty() || !nextId.getValue().startsWith("http://hl7.org/fhir/ValueSet/")) { - continue; - } - defaultValueSets.put(nextId.toVersionless().getValue(), (ValueSet) next.getResource()); - } - - myDefaultValueSets = defaultValueSets; - } - - return (T) defaultValueSets.get(theUri); - } - - return null; - } - - public void flush() { - myDefaultValueSets = null; - myCodeSystems = null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - private void loadValueSets(FhirContext theContext, Map theValueSets, String theFile) { - InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theFile); - try { - if (valuesetText != null) { - InputStreamReader reader = null; - try { - reader = new InputStreamReader(valuesetText, "UTF-8"); - - FhirContext ctx = FhirInstanceValidator.getHl7OrgDstu2Ctx(theContext); - Bundle bundle = ctx.newXmlParser().parseResource(Bundle.class, reader); - for (BundleEntryComponent next : bundle.getEntry()) { - ValueSet nextValueSet = (ValueSet) next.getResource(); - String system = nextValueSet.getCodeSystem().getSystem(); - if (isNotBlank(system)) { - theValueSets.put(system, nextValueSet); - } - } - - } catch (UnsupportedEncodingException e) { - // Shouldn't happen! - throw new InternalErrorException("UTF-8 encoding not supported on this platform", e); - } finally { - IOUtils.closeQuietly(reader); - } - - } - } finally { - IOUtils.closeQuietly(valuesetText); - } - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { - if (Constants.codeSystemNotNeeded(theCodeSystem)) { - return null; - } - - ValueSet vs = fetchCodeSystem(theContext, theCodeSystem); - if (vs != null) { - for (ValueSet.ConceptDefinitionComponent nextConcept : vs.getCodeSystem().getConcept()) { - if (nextConcept.getCode().equals(theCode)) { - ValueSet.ConceptDefinitionComponent component = new ValueSet.ConceptDefinitionComponent(new CodeType(theCode)); - return new CodeValidationResult(component); - } - } - } - - return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidator.java deleted file mode 100644 index d90fcc64124..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidator.java +++ /dev/null @@ -1,935 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.EncodingEnum; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.util.XmlUtil; -import ca.uhn.fhir.validation.IInstanceValidatorModule; -import ca.uhn.fhir.validation.IValidationContext; -import ca.uhn.fhir.validation.IValidatorModule; -import com.github.benmanes.caffeine.cache.CacheLoader; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import com.google.gson.*; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.fhir.ucum.UcumService; -import org.hl7.fhir.converter.NullVersionConverterAdvisor50; -import org.hl7.fhir.convertors.VersionConvertorAdvisor50; -import org.hl7.fhir.convertors.VersionConvertor_10_50; -import org.hl7.fhir.dstu2.model.*; -import org.hl7.fhir.exceptions.DefinitionException; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.exceptions.TerminologyServiceException; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.formats.IParser; -import org.hl7.fhir.r5.formats.ParserType; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.Parameters; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.utils.FHIRPathEngine; -import org.hl7.fhir.r5.utils.INarrativeGenerator; -import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.utils.IResourceValidator.BestPracticeWarningLevel; -import org.hl7.fhir.r5.utils.IResourceValidator.IdStatus; -import org.hl7.fhir.r5.validation.InstanceValidator; -import org.hl7.fhir.utilities.TerminologyServiceOptions; -import org.hl7.fhir.utilities.TranslationServices; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.*; -import java.util.concurrent.TimeUnit; - -import static org.apache.commons.lang3.StringUtils.isBlank; - -public class FhirInstanceValidator extends BaseValidatorBridge implements IInstanceValidatorModule { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidator.class); - private static final FhirContext FHIR_CONTEXT = FhirContext.forDstu2(); - private static FhirContext ourHl7OrgCtx; - - private boolean myAnyExtensionsAllowed = true; - private BestPracticeWarningLevel myBestPracticeWarningLevel; - private StructureDefinition myStructureDefintion; - private IValidationSupport myValidationSupport; - private boolean noTerminologyChecks = false; - private volatile WorkerContextWrapper myWrappedWorkerContext; - private VersionConvertorAdvisor50 myAdvisor = new NullVersionConverterAdvisor50(); - - /** - * Constructor - *

    - * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} - */ - public FhirInstanceValidator() { - this(new DefaultProfileValidationSupport()); - } - - /** - * Constructor which uses the given validation support - * - * @param theValidationSupport The validation support - */ - public FhirInstanceValidator(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - } - - private CodeSystem convertCodeSystem(ValueSet theFetched) { - CodeSystem retVal = new CodeSystem(); - - retVal.setUrl(theFetched.getCodeSystem().getSystem()); - retVal.setVersion(theFetched.getVersion()); - - List sourceConceptList = theFetched.getCodeSystem().getConcept(); - List targetConceptList = retVal.getConcept(); - convertConceptList(sourceConceptList, targetConceptList); - - return retVal; - } - - private CodeSystem.ConceptDefinitionComponent convertConceptDefinition(ValueSet.ConceptDefinitionComponent next) { - CodeSystem.ConceptDefinitionComponent convertedConceptDef = new CodeSystem.ConceptDefinitionComponent(); - convertedConceptDef.setCode(next.getCode()); - convertedConceptDef.setDisplay(next.getDisplay()); - - convertConceptList(next.getConcept(), convertedConceptDef.getConcept()); - return convertedConceptDef; - } - - private void convertConceptList(List theSourceConceptList, List theTargetConceptList) { - for (ValueSet.ConceptDefinitionComponent next : theSourceConceptList) { - CodeSystem.ConceptDefinitionComponent convertedConceptDef = convertConceptDefinition(next); - theTargetConceptList.add(convertedConceptDef); - } - } - - private String determineResourceName(Document theDocument) { - Element root = null; - - NodeList list = theDocument.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i) instanceof Element) { - root = (Element) list.item(i); - break; - } - } - root = theDocument.getDocumentElement(); - return root.getLocalName(); - } - - private ArrayList determineIfProfilesSpecified(Document theDocument) - { - ArrayList profileNames = new ArrayList(); - NodeList list = theDocument.getChildNodes().item(0).getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeName().compareToIgnoreCase("meta") == 0) - { - NodeList metaList = list.item(i).getChildNodes(); - for (int j = 0; j < metaList.getLength(); j++) - { - if (metaList.item(j).getNodeName().compareToIgnoreCase("profile") == 0) - { - profileNames.add(metaList.item(j).getAttributes().item(0).getNodeValue()); - } - } - break; - } - } - return profileNames; - } - - private StructureDefinition findStructureDefinitionForResourceName(final FhirContext theCtx, String resourceName) { - String sdName = null; - try { - // Test if a URL was passed in specifying the structure definition and test if "StructureDefinition" is part of the URL - URL testIfUrl = new URL(resourceName); - sdName = resourceName; - } - catch (MalformedURLException e) - { - sdName = "http://hl7.org/fhir/StructureDefinition/" + resourceName; - } - StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : myValidationSupport.fetchResource(theCtx, StructureDefinition.class, sdName); - return profile; - } - - /** - * Returns the "best practice" warning level (default is {@link BestPracticeWarningLevel#Hint}). - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @see {@link #setBestPracticeWarningLevel(BestPracticeWarningLevel)} - */ - public BestPracticeWarningLevel getBestPracticeWarningLevel() { - return myBestPracticeWarningLevel; - } - - /** - * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at - * this level. - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @param theBestPracticeWarningLevel The level, must not be null - */ - public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPracticeWarningLevel) { - Validate.notNull(theBestPracticeWarningLevel); - myBestPracticeWarningLevel = theBestPracticeWarningLevel; - } - - /** - * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public IValidationSupport getValidationSupport() { - return myValidationSupport; - } - - /** - * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public void setValidationSupport(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - myWrappedWorkerContext = null; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public boolean isAnyExtensionsAllowed() { - return myAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { - myAnyExtensionsAllowed = theAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public boolean isNoTerminologyChecks() { - return noTerminologyChecks; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { - noTerminologyChecks = theNoTerminologyChecks; - } - - public void setStructureDefintion(StructureDefinition theStructureDefintion) { - myStructureDefintion = theStructureDefintion; - } - - protected List validate(final FhirContext theCtx, String theInput, EncodingEnum theEncoding) { - - WorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; - if (wrappedWorkerContext == null) { - HapiWorkerContext workerContext = new HapiWorkerContext(theCtx, myValidationSupport); - wrappedWorkerContext = new WorkerContextWrapper(workerContext); - } - myWrappedWorkerContext = wrappedWorkerContext; - - InstanceValidator v; - FHIRPathEngine.IEvaluationContext evaluationCtx = new org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator.NullEvaluationContext(); - try { - v = new InstanceValidator(wrappedWorkerContext, evaluationCtx); - } catch (Exception e) { - throw new ConfigurationException(e); - } - - v.setBestPracticeWarningLevel(getBestPracticeWarningLevel()); - v.setAnyExtensionsAllowed(isAnyExtensionsAllowed()); - v.setResourceIdRule(IdStatus.OPTIONAL); - v.setNoTerminologyChecks(isNoTerminologyChecks()); - - List messages = new ArrayList<>(); - - if (theEncoding == EncodingEnum.XML) { - Document document; - try { - document = XmlUtil.parseDocument(theInput); - } catch (Exception e2) { - ourLog.error("Failure to parse XML input", e2); - ValidationMessage m = new ValidationMessage(); - m.setLevel(IssueSeverity.FATAL); - m.setMessage("Failed to parse input, it does not appear to be valid XML:" + e2.getMessage()); - return Collections.singletonList(m); - } - - // Determine if meta/profiles are present... - ArrayList resourceNames = determineIfProfilesSpecified(document); - if (resourceNames.isEmpty()) - { - resourceNames.add(determineResourceName(document)); - } - - for (String resourceName : resourceNames) { - StructureDefinition profile = findStructureDefinitionForResourceName(theCtx, resourceName); - if (profile != null) { - try { - v.validate(null, messages, document, profile.getUrl()); - } catch (Exception e) { - ourLog.error("Failure during validation", e); - throw new InternalErrorException("Unexpected failure while validating resource", e); - } - } - else - { - profile = findStructureDefinitionForResourceName(theCtx, determineResourceName(document)); - if (profile != null) { - try { - v.validate(null, messages, document, profile.getUrl()); - } catch (Exception e) { - ourLog.error("Failure during validation", e); - throw new InternalErrorException("Unexpected failure while validating resource", e); - } - } - } - } - } else if (theEncoding == EncodingEnum.JSON) { - Gson gson = new GsonBuilder().create(); - JsonObject json = gson.fromJson(theInput, JsonObject.class); - - ArrayList resourceNames = new ArrayList(); - JsonArray profiles = null; - try { - profiles = json.getAsJsonObject("meta").getAsJsonArray("profile"); - for (JsonElement element : profiles) - { - resourceNames.add(element.getAsString()); - } - } catch (Exception e) { - resourceNames.add(json.get("resourceType").getAsString()); - } - - for (String resourceName : resourceNames) { - StructureDefinition profile = findStructureDefinitionForResourceName(theCtx, resourceName); - if (profile != null) { - try { - v.validate(null, messages, json, profile.getUrl()); - } catch (Exception e) { - throw new InternalErrorException("Unexpected failure while validating resource", e); - } - } - else - { - profile = findStructureDefinitionForResourceName(theCtx, json.get("resourceType").getAsString()); - if (profile != null) { - try { - v.validate(null, messages, json, profile.getUrl()); - } catch (Exception e) { - ourLog.error("Failure during validation", e); - throw new InternalErrorException("Unexpected failure while validating resource", e); - } - } - } - } - } else { - throw new IllegalArgumentException("Unknown encoding: " + theEncoding); - } - - for (int i = 0; i < messages.size(); i++) { - ValidationMessage next = messages.get(i); - if ("Binding has no source, so can't be checked".equals(next.getMessage())) { - messages.remove(i); - i--; - } - if (next.getLocation().contains("text")) { - messages.remove(i); - i--; - } - } - return messages; - } - - @Override - protected List validate(IValidationContext theCtx) { - return validate(theCtx.getFhirContext(), theCtx.getResourceAsString(), theCtx.getResourceAsStringEncoding()); - } - - static FhirContext getHl7OrgDstu2Ctx(FhirContext theCtx) { - if (theCtx.getVersion().getVersion() == FhirVersionEnum.DSTU2_HL7ORG) { - return theCtx; - } - FhirContext retVal = ourHl7OrgCtx; - if (retVal == null) { - retVal = FhirContext.forDstu2Hl7Org(); - ourHl7OrgCtx = retVal; - } - return retVal; - } - - static StructureDefinition loadProfileOrReturnNull(List theMessages, FhirContext theCtx, - String theResourceName) { - if (isBlank(theResourceName)) { - if (theMessages != null) { - theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL) - .setMessage("Could not determine resource type from request. Content appears invalid.")); - } - return null; - } - - String profileClasspath = theCtx.getVersion().getPathToSchemaDefinitions().replace("/schema", "/profile"); - String profileCpName = profileClasspath + '/' + theResourceName.toLowerCase() + ".profile.xml"; - String profileText; - try (InputStream inputStream = FhirInstanceValidator.class.getResourceAsStream(profileCpName)) { - if (inputStream == null) { - if (theMessages != null) { - theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL) - .setMessage("No profile found for resource type " + theResourceName)); - return null; - } else { - return null; - } - } - profileText = IOUtils.toString(inputStream, "UTF-8"); - } catch (IOException e1) { - if (theMessages != null) { - theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL) - .setMessage("No profile found for resource type " + theResourceName)); - } - return null; - } - StructureDefinition profile = getHl7OrgDstu2Ctx(theCtx).newXmlParser().parseResource(StructureDefinition.class, - profileText); - return profile; - } - - private class WorkerContextWrapper implements IWorkerContext { - private final HapiWorkerContext myWrap; - private final VersionConvertor_10_50 myConverter; - private volatile List myAllStructures; - private LoadingCache myFetchResourceCache - = Caffeine.newBuilder() - .expireAfterWrite(10, TimeUnit.SECONDS) - .maximumSize(10000) - .build(new CacheLoader() { - @Override - public org.hl7.fhir.r5.model.Resource load(FhirInstanceValidator.ResourceKey key) throws Exception { - org.hl7.fhir.dstu2.model.Resource fetched; - switch (key.getResourceName()) { - case "StructureDefinition": - fetched = myWrap.fetchResource(StructureDefinition.class, key.getUri()); - break; - case "ValueSet": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "CodeSystem": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "Questionnaire": - fetched = myWrap.fetchResource(Questionnaire.class, key.getUri()); - break; - default: - throw new UnsupportedOperationException("Don't know how to fetch " + key.getResourceName()); - } - - if (fetched == null) { - if (key.getUri().equals("http://hl7.org/fhir/StructureDefinition/xhtml")) { - return null; - } - } - - try { - org.hl7.fhir.r5.model.Resource converted = new VersionConvertor_10_50(myAdvisor).convertResource(fetched); - - if (fetched instanceof StructureDefinition) { - StructureDefinition fetchedSd = (StructureDefinition) fetched; - StructureDefinition.StructureDefinitionKind kind = fetchedSd.getKind(); - if (kind == StructureDefinition.StructureDefinitionKind.DATATYPE) { - BaseRuntimeElementDefinition element = FHIR_CONTEXT.getElementDefinition(fetchedSd.getName()); - if (element instanceof RuntimePrimitiveDatatypeDefinition) { - org.hl7.fhir.r5.model.StructureDefinition convertedSd = (org.hl7.fhir.r5.model.StructureDefinition) converted; - convertedSd.setKind(org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE); - } - } - } - - return converted; - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - }); - private Parameters myExpansionProfile; - - public WorkerContextWrapper(HapiWorkerContext theWorkerContext) { - myWrap = theWorkerContext; - myConverter = new VersionConvertor_10_50(myAdvisor); - } - - @Override - public List allConformanceResources() { - throw new UnsupportedOperationException(); - } - - @Override - public void generateSnapshot(org.hl7.fhir.r5.model.StructureDefinition p) throws DefinitionException, FHIRException { - - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - @Override - public Parameters getExpansionParameters() { - return myExpansionProfile; - } - - @Override - public void setExpansionProfile(Parameters expParameters) { - myExpansionProfile = expParameters; - } - - @Override - public List allStructures() { - - List retVal = myAllStructures; - if (retVal == null) { - retVal = new ArrayList<>(); - for (StructureDefinition next : myWrap.allStructures()) { - try { - org.hl7.fhir.r5.model.StructureDefinition converted = new VersionConvertor_10_50(myAdvisor).convertStructureDefinition(next); - if (converted != null) { - retVal.add(converted); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - myAllStructures = retVal; - } - - return retVal; - } - - @Override - public List getStructures() { - return allStructures(); - } - - @Override - public void cacheResource(org.hl7.fhir.r5.model.Resource res) throws FHIRException { - throw new UnsupportedOperationException(); - } - - private ValidationResult convertValidationResult(org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult theResult) { - IssueSeverity issueSeverity = theResult.getSeverity(); - String message = theResult.getMessage(); - org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent conceptDefinition = null; - if (theResult.asConceptDefinition() != null) { - conceptDefinition = convertConceptDefinition(theResult.asConceptDefinition()); - } - - ValidationResult retVal = new ValidationResult(issueSeverity, message, conceptDefinition); - return retVal; - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean heiarchical) { - ValueSet convertedSource = null; - try { - convertedSource = new VersionConvertor_10_50(myAdvisor).convertValueSet(source); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - org.hl7.fhir.dstu2.terminologies.ValueSetExpander.ValueSetExpansionOutcome expanded = myWrap.expandVS(convertedSource, cacheOk); - - org.hl7.fhir.r5.model.ValueSet convertedResult = null; - if (expanded.getValueset() != null) { - try { - convertedResult = new VersionConvertor_10_50(myAdvisor).convertValueSet(expanded.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - String error = expanded.getError(); - ValueSetExpander.TerminologyServiceErrorClass result = null; - - return new ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, result); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heiarchical) throws FHIRException { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { - ValueSet.ConceptSetComponent convertedInc = null; - if (inc != null) { - try { - convertedInc = new VersionConvertor_10_50(myAdvisor).convertConceptSetComponent(inc); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSet.ValueSetExpansionComponent expansion = myWrap.expandVS(convertedInc); - org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent valueSetExpansionComponent = null; - if (expansion != null) { - try { - valueSetExpansionComponent = new VersionConvertor_10_50(myAdvisor).convertValueSetExpansionComponent(expansion); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSetExpander.ValueSetExpansionOutcome outcome = new ValueSetExpander.ValueSetExpansionOutcome(new org.hl7.fhir.r5.model.ValueSet()); - outcome.getValueset().setExpansion(valueSetExpansionComponent); - return outcome; - } - - @Override - public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { - ValueSet fetched = myWrap.fetchCodeSystem(system); - if (fetched == null) { - return null; - } - - return convertCodeSystem(fetched); - } - - @Override - public T fetchResource(Class class_, String uri) { - - ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); - @SuppressWarnings("unchecked") - T retVal = (T) myFetchResourceCache.get(key); - - return retVal; - } - - @Override - public org.hl7.fhir.r5.model.Resource fetchResourceById(String type, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public T fetchResourceWithException(Class class_, String uri) throws FHIRException { - T retVal = fetchResource(class_, uri); - if (retVal == null) { - throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); - } - return retVal; - } - - @Override - public List findMapsForSource(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String name) { - return myWrap.getAbbreviation(name); - } - - public VersionConvertor_10_50 getConverter() { - return myConverter; - } - - - @Override - public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType type) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String type) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - return myWrap.getResourceNames(); - } - - @Override - public Set getResourceNamesAsSet() { - return new HashSet<>(myWrap.getResourceNames()); - } - - @Override - public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getOverrideVersionNs() { - return null; - } - - @Override - public void setOverrideVersionNs(String value) { - - } - - @Override - public org.hl7.fhir.r5.model.StructureDefinition fetchTypeDefinition(String typeName) { - return fetchResource(org.hl7.fhir.r5.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+typeName); - } - - @Override - public void setUcumService(UcumService ucumService) { - throw new UnsupportedOperationException(); - } - - @Override - public List getTypeNames() { - throw new UnsupportedOperationException(); - } - - @Override - public String getVersion() { - return FhirVersionEnum.DSTU2.getFhirVersionString(); - } - - @Override - public UcumService getUcumService() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasCache() { - return false; - } - - @Override - public boolean hasResource(Class class_, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isNoTerminologyServer() { - return true; - } - - @Override - public List listTransforms() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() throws FHIRException { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public String oid2Uri(String code) { - throw new UnsupportedOperationException(); - } - - @Override - public void setLogger(ILoggingService logger) { - throw new UnsupportedOperationException(); - } - - @Override - public ILoggingService getLogger() { - return null; - } - - @Override - public boolean supportsSystem(String system) throws TerminologyServiceException { - return myWrap.supportsSystem(system); - } - - @Override - public TranslationServices translator() { - throw new UnsupportedOperationException(); - } - - @Override - public Set typeTails() { - throw new UnsupportedOperationException(); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display) { - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - - try { - if (vs != null) { - convertedVs = new VersionConvertor_10_50(myAdvisor).convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - try { - if (vs != null) { - VersionConvertorAdvisor50 advisor50 = new NullVersionConverterAdvisor50(); - convertedVs = new VersionConvertor_10_50(advisor50).convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet vs) { - Coding convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = new VersionConvertor_10_50(myAdvisor).convertCoding(code); - } - if (vs != null) { - convertedVs = new VersionConvertor_10_50(myAdvisor).convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet vs) { - CodeableConcept convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = new VersionConvertor_10_50(myAdvisor).convertCodeableConcept(code); - } - if (vs != null) { - convertedVs = new VersionConvertor_10_50(myAdvisor).convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent vsi) { - ValueSet.ConceptSetComponent conceptSetComponent = null; - if (vsi != null) { - try { - conceptSetComponent = new VersionConvertor_10_50(myAdvisor).convertConceptSetComponent(vsi); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.dstu2.utils.IWorkerContext.ValidationResult result = myWrap.validateCode(system, code, display, conceptSetComponent); - return convertValidationResult(result); - } - - } - - - private static class ResourceKey { - private final int myHashCode; - private String myResourceName; - private String myUri; - - private ResourceKey(String theResourceName, String theUri) { - myResourceName = theResourceName; - myUri = theUri; - myHashCode = new HashCodeBuilder(17, 37) - .append(myResourceName) - .append(myUri) - .toHashCode(); - } - - @Override - public boolean equals(Object theO) { - if (this == theO) { - return true; - } - - if (theO == null || getClass() != theO.getClass()) { - return false; - } - - ResourceKey that = (ResourceKey) theO; - - return new EqualsBuilder() - .append(myResourceName, that.myResourceName) - .append(myUri, that.myUri) - .isEquals(); - } - - public String getResourceName() { - return myResourceName; - } - - public String getUri() { - return myUri; - } - - @Override - public int hashCode() { - return myHashCode; - } - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContext.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContext.java deleted file mode 100644 index 9cdae210cd8..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContext.java +++ /dev/null @@ -1,238 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.dstu2.formats.IParser; -import org.hl7.fhir.dstu2.formats.ParserType; -import org.hl7.fhir.instance.hapi.validation.IValidationSupport.CodeValidationResult; -import org.hl7.fhir.dstu2.model.*; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.dstu2.terminologies.ValueSetExpander; -import org.hl7.fhir.dstu2.terminologies.ValueSetExpanderFactory; -import org.hl7.fhir.dstu2.terminologies.ValueSetExpanderSimple; -import org.hl7.fhir.dstu2.utils.INarrativeGenerator; -import org.hl7.fhir.dstu2.utils.IResourceValidator; -import org.hl7.fhir.dstu2.utils.IWorkerContext; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import java.io.IOException; -import java.util.List; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public final class HapiWorkerContext implements IWorkerContext, ValueSetExpanderFactory, ValueSetExpander { - private final FhirContext myCtx; - private IValidationSupport myValidationSupport; - - public HapiWorkerContext(FhirContext theCtx, IValidationSupport theValidationSupport) { - myCtx = theCtx; - myValidationSupport = theValidationSupport; - } - - @Override - public List allStructures() { - return myValidationSupport.allStructures(); - } - - @Override - public StructureDefinition fetchTypeDefinition(String theUri) { - return fetchResource(StructureDefinition.class, theUri); - } - - @Override - public ValueSetExpansionOutcome expand(ValueSet theSource) throws IOException, ETooCostly { - ValueSetExpander vse = new ValueSetExpanderSimple(this, this); - ValueSetExpansionOutcome vso = vse.expand(theSource); - if (vso.getError() != null) { - return null; - } else { - return vso; - } - } - - @Override - public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc) { - return myValidationSupport.expandValueSet(myCtx, theInc); - } - - @Override - public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSet fetchCodeSystem(String theSystem) { - if (myValidationSupport == null) { - return null; - } else { - return myValidationSupport.fetchCodeSystem(myCtx, theSystem); - } - } - - @Override - public T fetchResource(Class theClass, String theUri) { - if (myValidationSupport == null) { - return null; - } else { - return myValidationSupport.fetchResource(myCtx, theClass, theUri); - } - } - - @Override - public List findMapsForSource(String theUrl) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String theName) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpander getExpander() { - return this; - } - - @Override - public INarrativeGenerator getNarrativeGenerator(String thePrefix, String theBasePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType theType) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String theType) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasResource(Class theClass_, String theUri) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean supportsSystem(String theSystem) { - if (myValidationSupport == null) { - return false; - } else { - return myValidationSupport.isCodeSystemSupported(myCtx, theSystem); - } - } - - @Override - public ValidationResult validateCode(CodeableConcept theCode, ValueSet theVs) { - for (Coding next : theCode.getCoding()) { - ValidationResult retVal = validateCode(next, theVs); - if (retVal.isOk()) { - return retVal; - } - } - - return new ValidationResult(null, null); - } - - @Override - public ValidationResult validateCode(Coding theCode, ValueSet theVs) { - String system = theCode.getSystem(); - String code = theCode.getCode(); - String display = theCode.getDisplay(); - return validateCode(system, code, display, theVs); - } - - @Override - public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) { - CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay); - if (result == null) { - return null; - } - return new ValidationResult(result.getSeverity(), result.getMessage(), result.asConceptDefinition()); - } - - @Override - public ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ConceptSetComponent theVsi) { - throw new UnsupportedOperationException(); - } - - @Override - public ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet theVs) { - - if (Constants.codeSystemNotNeeded(theSystem) || StringUtils.equals(theSystem, theVs.getCodeSystem().getSystem())) { - for (ConceptDefinitionComponent next : theVs.getCodeSystem().getConcept()) { - ValidationResult retVal = validateCodeSystem(theCode, next); - if (retVal != null && retVal.isOk()) { - return retVal; - } - } - } - - for (ConceptSetComponent nextComposeConceptSet : theVs.getCompose().getInclude()) { - - String nextSystem = theSystem; - if (nextSystem == null && isNotBlank(nextComposeConceptSet.getSystem())) { - nextSystem = nextComposeConceptSet.getSystem(); - } - - if (StringUtils.equals(nextSystem, nextComposeConceptSet.getSystem())) { - for (ConceptReferenceComponent nextComposeCode : nextComposeConceptSet.getConcept()) { - ConceptDefinitionComponent conceptDef = new ConceptDefinitionComponent(); - conceptDef.setCode(nextComposeCode.getCode()); - conceptDef.setDisplay(nextComposeCode.getDisplay()); - ValidationResult retVal = validateCodeSystem(theCode, conceptDef); - if (retVal != null && retVal.isOk()) { - return retVal; - } - } - - if (nextComposeConceptSet.getConcept().isEmpty()){ - ValidationResult result = validateCode(nextSystem, theCode, null); - if (result.isOk()){ - return result; - } - } - } - } - - return new ValidationResult(IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" + Constants.codeSystemWithDefaultDescription(theSystem) + "]"); - } - - private ValidationResult validateCodeSystem(String theCode, ConceptDefinitionComponent theConcept) { - if (StringUtils.equals(theCode, theConcept.getCode())) { - return new ValidationResult(theConcept); - } else { - for (ConceptDefinitionComponent next : theConcept.getConcept()) { - ValidationResult retVal = validateCodeSystem(theCode, next); - if (retVal != null && retVal.isOk()) { - return retVal; - } - } - return null; - } - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/IValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/IValidationSupport.java deleted file mode 100644 index 2885c3bbcc1..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/IValidationSupport.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import org.hl7.fhir.dstu2.model.StructureDefinition; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import ca.uhn.fhir.context.FhirContext; - -import java.util.List; - -public interface IValidationSupport { - - /** - * Fetch all structuredefinitions - */ - List allStructures(); - - /** - * Expands the given portion of a ValueSet - * - * @param theInclude - * The portion to include - * @return The expansion - */ - ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude); - - /** - * Fetch a code system by ID - * - * @param theSystem - * The code system - * @return The valueset (must not be null, but can be an empty ValueSet) - */ - ValueSet fetchCodeSystem(FhirContext theContext, String theSystem); - - /** - * Loads a resource needed by the validation (a StructureDefinition, or a - * ValueSet) - * - * @param theContext - * The HAPI FHIR Context object current in use by the validator - * @param theClass - * The type of the resource to load - * @param theUri - * The resource URI - * @return Returns the resource, or null if no resource with the - * given URI can be found - */ - T fetchResource(FhirContext theContext, Class theClass, String theUri); - - /** - * Returns true if codes in the given code system can be expanded - * or validated - * - * @param theSystem - * The URI for the code system, e.g. "http://loinc.org" - * @return Returns true if codes in the given code system can be - * validated - */ - boolean isCodeSystemSupported(FhirContext theContext, String theSystem); - - /** - * Validates that the given code exists and if possible returns a display - * name. This method is called to check codes which are found in "example" - * binding fields (e.g. Observation.code in the default profile. - * - * @param theCodeSystem - * The code system, e.g. "http://loinc.org" - * @param theCode - * The code, e.g. "1234-5" - * @param theDisplay - * The display name, if it should also be validated - * @return Returns a validation result object - */ - CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay); - - public class CodeValidationResult { - private ConceptDefinitionComponent definition; - private String message; - private IssueSeverity severity; - - public CodeValidationResult(ConceptDefinitionComponent definition) { - this.definition = definition; - } - - public CodeValidationResult(IssueSeverity severity, String message) { - this.severity = severity; - this.message = message; - } - - public CodeValidationResult(IssueSeverity severity, String message, ConceptDefinitionComponent definition) { - this.severity = severity; - this.message = message; - this.definition = definition; - } - - public ConceptDefinitionComponent asConceptDefinition() { - return definition; - } - - public String getDisplay() { - return definition == null ? "??" : definition.getDisplay(); - } - - public String getMessage() { - return message; - } - - public IssueSeverity getSeverity() { - return severity; - } - - public boolean isOk() { - return definition != null; - } - - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/ValidationSupportChain.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/ValidationSupportChain.java deleted file mode 100644 index b416b0202e5..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/ValidationSupportChain.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu2.model.StructureDefinition; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent; -import org.hl7.fhir.instance.model.api.IBaseResource; - -import java.util.ArrayList; -import java.util.List; - -public class ValidationSupportChain implements IValidationSupport { - - private List myChain; - - /** - * Constructor - */ - public ValidationSupportChain() { - myChain = new ArrayList(); - } - - /** - * Constructor - */ - public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { - this(); - for (IValidationSupport next : theValidationSupportModules) { - if (next != null) { - myChain.add(next); - } - } - } - - public void addValidationSupport(IValidationSupport theValidationSupport) { - myChain.add(theValidationSupport); - } - - @Override - public List allStructures() { - ArrayList retVal = new ArrayList<>(); - for (IValidationSupport next : myChain) { - retVal.addAll(next.allStructures()); - } - return retVal; - } - - @Override - public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) { - return next.expandValueSet(theCtx, theInclude); - } - } - return myChain.get(0).expandValueSet(theCtx, theInclude); - } - - @Override - public ValueSet fetchCodeSystem(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - ValueSet retVal = next.fetchCodeSystem(theCtx, theSystem); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - for (IValidationSupport next : myChain) { - T retVal = next.fetchResource(theContext, theClass, theUri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theSystem)) { - return true; - } - } - return false; - } - - @Override - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay) { - for (IValidationSupport next : myChain) { - if (theCodeSystem != null && next.isCodeSystemSupported(theCtx, theCodeSystem)) { - return next.validateCode(theCtx, theCodeSystem, theCode, theDisplay); - } - } - return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay); - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/WorkerContext.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/WorkerContext.java deleted file mode 100644 index c3adf2edd1e..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/WorkerContext.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import org.hl7.fhir.dstu2.model.Questionnaire; -import org.hl7.fhir.dstu2.model.ValueSet; - -import java.util.HashMap; -import java.util.Map; - -public class WorkerContext { - private HashMap myValueSets = new HashMap<>(); - private HashMap myQuestionnaires = new HashMap<>(); - - public Map getValueSets() { - return myValueSets; - } - - public Map getQuestionnaires() { - return myQuestionnaires; - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/BaseValidatorBridge.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/BaseValidatorBridge.java deleted file mode 100644 index 4a86411c66f..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/BaseValidatorBridge.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import java.util.List; - -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import ca.uhn.fhir.validation.*; - -/** - * Base class for a bridge between the RI validation tools and HAPI - */ -abstract class BaseValidatorBridge implements IValidatorModule { - - public BaseValidatorBridge() { - super(); - } - - private void doValidate(IValidationContext theCtx) { - List messages = validate(theCtx); - - for (ValidationMessage riMessage : messages) { - SingleValidationMessage hapiMessage = new SingleValidationMessage(); - if (riMessage.getCol() != -1) { - hapiMessage.setLocationCol(riMessage.getCol()); - } - if (riMessage.getLine() != -1) { - hapiMessage.setLocationLine(riMessage.getLine()); - } - hapiMessage.setLocationString(riMessage.getLocation()); - hapiMessage.setMessage(riMessage.getMessage()); - if (riMessage.getLevel() != null) { - hapiMessage.setSeverity(ResultSeverityEnum.fromCode(riMessage.getLevel().toCode())); - } - theCtx.addValidationMessage(hapiMessage); - } - } - - protected abstract List validate(IValidationContext theCtx); - - @Override - public void validateResource(IValidationContext theCtx) { - doValidate(theCtx); - } - -} \ No newline at end of file diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/CachingValidationSupport.java deleted file mode 100644 index 3945f0951c9..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/CachingValidationSupport.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; - -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; - -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; - -@SuppressWarnings("unchecked") -public class CachingValidationSupport implements IValidationSupport { - - private final IValidationSupport myWrap; - private final Cache myCache; - - public CachingValidationSupport(IValidationSupport theWrap) { - myWrap = theWrap; - myCache = Caffeine - .newBuilder() - .expireAfterWrite(60, TimeUnit.SECONDS) - .maximumSize(5000) - .build(); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return myWrap.expandValueSet(theContext, theInclude); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - String key = "fetchAllConformanceResources"; - return loadFromCache(key, t -> myWrap.fetchAllConformanceResources(theContext)); - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - String key = "fetchAllStructureDefinitions"; - return loadFromCache(key, t -> myWrap.fetchAllStructureDefinitions(theContext)); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myWrap.fetchCodeSystem(theContext, uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myWrap.fetchValueSet(theContext, uri); - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return loadFromCache("fetchResource " + theClass.getName() + " " + theUri, - t -> myWrap.fetchResource(theContext, theClass, theUri)); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myWrap.fetchStructureDefinition(theCtx, theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - String key = "isCodeSystemSupported " + theSystem; - return loadFromCache(key, t -> myWrap.isCodeSystemSupported(theContext, theSystem)); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return myWrap.generateSnapshot(theInput, theUrl, theWebUrl, theProfileName); - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - String key = "validateCode " + theCodeSystem + " " + theCode + " " + defaultIfBlank(theValueSetUrl, "NO_VS"); - return loadFromCache(key, t -> myWrap.validateCode(theContext, theCodeSystem, theCode, theDisplay, theValueSetUrl)); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - return myWrap.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - String key = "lookupCode " + theSystem + " " + theCode; - return loadFromCache(key, t -> myWrap.lookupCode(theContext, theSystem, theCode)); - } - - @Nullable - private T loadFromCache(String theKey, Function theLoader) { - Function> loaderWrapper = key -> Optional.ofNullable(theLoader.apply(theKey)); - Optional result = (Optional) myCache.get(theKey, loaderWrapper); - return result.orElse(null); - } - - public void flushCaches() { - myCache.invalidateAll(); - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/FhirInstanceValidator.java deleted file mode 100644 index 2bb54771eb2..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/FhirInstanceValidator.java +++ /dev/null @@ -1,721 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.validation.IInstanceValidatorModule; -import ca.uhn.fhir.validation.IValidationContext; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.time.DateUtils; -import org.fhir.ucum.UcumService; -import org.hl7.fhir.common.hapi.validation.ValidatorWrapper; -import org.hl7.fhir.convertors.VersionConvertor_40_50; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.exceptions.TerminologyServiceException; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.formats.IParser; -import org.hl7.fhir.r5.formats.ParserType; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.utils.INarrativeGenerator; -import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.utils.IResourceValidator.BestPracticeWarningLevel; -import org.hl7.fhir.utilities.TerminologyServiceOptions; -import org.hl7.fhir.utilities.TranslationServices; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.*; -import java.util.concurrent.TimeUnit; - -@SuppressWarnings({"PackageAccessibility", "Duplicates"}) -public class FhirInstanceValidator extends org.hl7.fhir.r4.hapi.validation.BaseValidatorBridge implements IInstanceValidatorModule { - - private boolean myAnyExtensionsAllowed = true; - private BestPracticeWarningLevel myBestPracticeWarningLevel; - private IValidationSupport myValidationSupport; - private boolean noTerminologyChecks = false; - private volatile WorkerContextWrapper myWrappedWorkerContext; - - private boolean errorForUnknownProfiles; - private List extensionDomains = Collections.emptyList(); - - /** - * Constructor - *

    - * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} - */ - public FhirInstanceValidator() { - this(new DefaultProfileValidationSupport()); - } - - /** - * Constructor which uses the given validation support - * - * @param theValidationSupport The validation support - */ - public FhirInstanceValidator(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:

      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(List extensionDomains) { - this.extensionDomains = extensionDomains; - return this; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:
      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(String... extensionDomains) { - setCustomExtensionDomains(Arrays.asList(extensionDomains)); - return this; - } - - - /** - * Returns the "best practice" warning level (default is {@link BestPracticeWarningLevel#Hint}). - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @see #setBestPracticeWarningLevel(BestPracticeWarningLevel) - */ - public BestPracticeWarningLevel getBestPracticeWarningLevel() { - return myBestPracticeWarningLevel; - } - - /** - * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at - * this level. - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @param theBestPracticeWarningLevel The level, must not be null - */ - public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPracticeWarningLevel) { - Validate.notNull(theBestPracticeWarningLevel); - myBestPracticeWarningLevel = theBestPracticeWarningLevel; - } - - /** - * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public IValidationSupport getValidationSupport() { - return myValidationSupport; - } - - /** - * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public void setValidationSupport(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - myWrappedWorkerContext = null; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public boolean isAnyExtensionsAllowed() { - return myAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { - myAnyExtensionsAllowed = theAnyExtensionsAllowed; - } - - public boolean isErrorForUnknownProfiles() { - return errorForUnknownProfiles; - } - - public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { - this.errorForUnknownProfiles = errorForUnknownProfiles; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public boolean isNoTerminologyChecks() { - return noTerminologyChecks; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { - noTerminologyChecks = theNoTerminologyChecks; - } - - @Override - protected List validate(IValidationContext theValidationCtx) { - - WorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; - if (wrappedWorkerContext == null) { - HapiWorkerContext workerContext = new HapiWorkerContext(theValidationCtx.getFhirContext(), myValidationSupport); - wrappedWorkerContext = new WorkerContextWrapper(workerContext); - } - myWrappedWorkerContext = wrappedWorkerContext; - - return new ValidatorWrapper() - .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) - .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) - .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) - .setExtensionDomains(getExtensionDomains()) - .setNoTerminologyChecks(isNoTerminologyChecks()) - .validate(wrappedWorkerContext, theValidationCtx); - } - - private List getExtensionDomains() { - return extensionDomains; - } - - - private static class WorkerContextWrapper implements IWorkerContext { - private final HapiWorkerContext myWrap; - private volatile List myAllStructures; - private LoadingCache myFetchResourceCache; - private org.hl7.fhir.r5.model.Parameters myExpansionProfile; - - WorkerContextWrapper(HapiWorkerContext theWorkerContext) { - myWrap = theWorkerContext; - - long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND; - if (System.getProperties().containsKey(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)) { - timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); - } - - myFetchResourceCache = Caffeine.newBuilder() - .expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS) - .maximumSize(10000) - .build(key -> { - Resource fetched; - switch (key.getResourceName()) { - case "StructureDefinition": - fetched = myWrap.fetchResource(StructureDefinition.class, key.getUri()); - break; - case "ValueSet": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "CodeSystem": - fetched = myWrap.fetchResource(CodeSystem.class, key.getUri()); - break; - case "Questionnaire": - fetched = myWrap.fetchResource(Questionnaire.class, key.getUri()); - break; - case "ImplementationGuide": - fetched = myWrap.fetchResource(ImplementationGuide.class, key.getUri()); - break; - default: - throw new UnsupportedOperationException("Don't know how to fetch " + key.getResourceName()); - } - - if (fetched == null) { - return null; - } - - try { - return VersionConvertor_40_50.convertResource(fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - }); - } - - @Override - public List allConformanceResources() { - throw new UnsupportedOperationException(); - } - - @Override - public void generateSnapshot(org.hl7.fhir.r5.model.StructureDefinition p) throws FHIRException { - // nothing yet - } - - @Override - public org.hl7.fhir.r5.model.Parameters getExpansionParameters() { - return myExpansionProfile; - } - - @Override - public void setExpansionProfile(org.hl7.fhir.r5.model.Parameters expParameters) { - myExpansionProfile = expParameters; - } - - @Override - public List allStructures() { - - List retVal = myAllStructures; - if (retVal == null) { - retVal = new ArrayList<>(); - for (StructureDefinition next : myWrap.allStructures()) { - try { - retVal.add(org.hl7.fhir.convertors.conv40_50.StructureDefinition.convertStructureDefinition(next)); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - myAllStructures = retVal; - } - - return retVal; - } - - @Override - public List getStructures() { - return allStructures(); - } - - @Override - public void cacheResource(org.hl7.fhir.r5.model.Resource res) { - throw new UnsupportedOperationException(); - } - - @Nonnull - private ValidationResult convertValidationResult(@Nullable org.hl7.fhir.r4.context.IWorkerContext.ValidationResult theResult) { - ValidationResult retVal = null; - if (theResult != null) { - IssueSeverity issueSeverity = theResult.getSeverity(); - String message = theResult.getMessage(); - org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent conceptDefinition = null; - if (theResult.asConceptDefinition() != null) { - try { - conceptDefinition = org.hl7.fhir.convertors.conv40_50.CodeSystem.convertConceptDefinitionComponent(theResult.asConceptDefinition()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - retVal = new ValidationResult(issueSeverity, message, conceptDefinition); - } - - if (retVal == null) { - retVal = new ValidationResult(IssueSeverity.ERROR, "Validation failed"); - } - - return retVal; - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean heiarchical) { - ValueSet convertedSource; - try { - convertedSource = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(source); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome expanded = myWrap.expandVS(convertedSource, cacheOk, heiarchical); - - org.hl7.fhir.r5.model.ValueSet convertedResult = null; - if (expanded.getValueset() != null) { - try { - convertedResult = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expanded.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - String error = expanded.getError(); - ValueSetExpander.TerminologyServiceErrorClass result = null; - - return new ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, result); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heiarchical) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { - ValueSet.ConceptSetComponent convertedInc = null; - if (inc != null) { - try { - convertedInc = org.hl7.fhir.convertors.conv40_50.ValueSet.convertConceptSetComponent(inc); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome expansion = myWrap.expandVS(convertedInc, heirarchical); - org.hl7.fhir.r5.model.ValueSet valueSetExpansion = null; - if (expansion != null) { - try { - valueSetExpansion = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expansion.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - return new ValueSetExpander.ValueSetExpansionOutcome(valueSetExpansion); - } - - @Override - public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { - CodeSystem fetched = myWrap.fetchCodeSystem(system); - if (fetched == null) { - return null; - } - try { - return org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - @Override - public T fetchResource(Class class_, String uri) { - - ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); - @SuppressWarnings("unchecked") - T retVal = (T) myFetchResourceCache.get(key); - - return retVal; - } - - @Override - public org.hl7.fhir.r5.model.Resource fetchResourceById(String type, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public T fetchResourceWithException(Class class_, String uri) throws FHIRException { - T retVal = fetchResource(class_, uri); - if (retVal == null) { - throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); - } - return retVal; - } - - @Override - public List findMapsForSource(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String name) { - return myWrap.getAbbreviation(name); - } - - @Override - public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType type) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String type) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - return myWrap.getResourceNames(); - } - - @Override - public Set getResourceNamesAsSet() { - return new HashSet<>(myWrap.getResourceNames()); - } - - @Override - public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getOverrideVersionNs() { - return null; - } - - @Override - public void setOverrideVersionNs(String value) { - - } - - @Override - public org.hl7.fhir.r5.model.StructureDefinition fetchTypeDefinition(String typeName) { - return fetchResource(org.hl7.fhir.r5.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); - } - - @Override - public List getTypeNames() { - return myWrap.getTypeNames(); - } - - @Override - public UcumService getUcumService() { - throw new UnsupportedOperationException(); - } - - @Override - public void setUcumService(UcumService ucumService) { - throw new UnsupportedOperationException(); - } - - @Override - public String getVersion() { - return myWrap.getVersion(); - } - - @Override - public boolean hasCache() { - return myWrap.hasCache(); - } - - @Override - public boolean hasResource(Class class_, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isNoTerminologyServer() { - return myWrap.isNoTerminologyServer(); - } - - @Override - public List listTransforms() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public String oid2Uri(String code) { - return myWrap.oid2Uri(code); - } - - @Override - public ILoggingService getLogger() { - return null; - } - - @Override - public void setLogger(ILoggingService logger) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean supportsSystem(String system) { - return myWrap.supportsSystem(system); - } - - @Override - public TranslationServices translator() { - throw new UnsupportedOperationException(); - } - - @Override - public Set typeTails() { - return myWrap.typeTails(); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display) { - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - - try { - if (vs != null) { - convertedVs = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - try { - if (vs != null) { - convertedVs = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet vs) { - Coding convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_40_50.convertCoding(code); - } - if (vs != null) { - convertedVs = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet vs) { - CodeableConcept convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = VersionConvertor_40_50.convertCodeableConcept(code); - } - if (vs != null) { - convertedVs = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent vsi) { - ValueSet.ConceptSetComponent conceptSetComponent = null; - if (vsi != null) { - try { - conceptSetComponent = org.hl7.fhir.convertors.conv40_50.ValueSet.convertConceptSetComponent(vsi); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.r4.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display, conceptSetComponent); - return convertValidationResult(result); - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - } - - private static class ResourceKey { - private final int myHashCode; - private String myResourceName; - private String myUri; - - private ResourceKey(String theResourceName, String theUri) { - myResourceName = theResourceName; - myUri = theUri; - myHashCode = new HashCodeBuilder(17, 37) - .append(myResourceName) - .append(myUri) - .toHashCode(); - } - - @Override - public boolean equals(Object theO) { - if (this == theO) { - return true; - } - - if (theO == null || getClass() != theO.getClass()) { - return false; - } - - ResourceKey that = (ResourceKey) theO; - - return new EqualsBuilder() - .append(myResourceName, that.myResourceName) - .append(myUri, that.myUri) - .isEquals(); - } - - public String getResourceName() { - return myResourceName; - } - - public String getUri() { - return myUri; - } - - @Override - public int hashCode() { - return myHashCode; - } - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/PrePopulatedValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/PrePopulatedValidationSupport.java deleted file mode 100644 index 6d30f08a13f..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/PrePopulatedValidationSupport.java +++ /dev/null @@ -1,275 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.Constants; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r4.model.MetadataResource; -import org.hl7.fhir.r4.model.Parameters; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.UriType; -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.terminologies.ValueSetExpanderSimple; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -/** - * This class is an implementation of {@link IValidationSupport} which may be pre-populated - * with a collection of validation resources to be used by the validator. - */ -public class PrePopulatedValidationSupport implements IValidationSupport { - - private Map myCodeSystems; - private Map myStructureDefinitions; - private Map myValueSets; - private DefaultProfileValidationSupport myDefaultProfileValidationSupport = new DefaultProfileValidationSupport(); - - /** - * Constructor - */ - public PrePopulatedValidationSupport() { - myStructureDefinitions = new HashMap<>(); - myValueSets = new HashMap<>(); - myCodeSystems = new HashMap<>(); - } - - - /** - * Constructor - * - * @param theStructureDefinitions The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and - * values are the resource itself. - * @param theValueSets The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - * @param theCodeSystems The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are - * the resource itself. - */ - public PrePopulatedValidationSupport(Map theStructureDefinitions, Map theValueSets, Map theCodeSystems) { - myStructureDefinitions = theStructureDefinitions; - myValueSets = theValueSets; - myCodeSystems = theCodeSystems; - } - - /** - * Add a new CodeSystem resource which will be available to the validator. Note that - * {@link CodeSystem#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addCodeSystem(CodeSystem theCodeSystem) { - Validate.notBlank(theCodeSystem.getUrl(), "theCodeSystem.getUrl() must not return a value"); - addToMap(theCodeSystem, myCodeSystems, theCodeSystem.getUrl()); - } - - /** - * Add a new StructureDefinition resource which will be available to the validator. Note that - * {@link StructureDefinition#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addStructureDefinition(StructureDefinition theStructureDefinition) { - Validate.notBlank(theStructureDefinition.getUrl(), "theStructureDefinition.getUrl() must not return a value"); - addToMap(theStructureDefinition, myStructureDefinitions, theStructureDefinition.getUrl()); - } - - private void addToMap(T theStructureDefinition, Map map, String theUrl) { - if (isNotBlank(theUrl)) { - map.put(theUrl, theStructureDefinition); - - int lastSlashIdx = theUrl.lastIndexOf('/'); - if (lastSlashIdx != -1) { - map.put(theUrl.substring(lastSlashIdx + 1), theStructureDefinition); - int previousSlashIdx = theUrl.lastIndexOf('/', lastSlashIdx - 1); - if (previousSlashIdx != -1) { - map.put(theUrl.substring(previousSlashIdx + 1), theStructureDefinition); - } - } - - } - } - - /** - * Add a new ValueSet resource which will be available to the validator. Note that - * {@link ValueSet#getUrl() the URL field) in this resource must contain a value as this - * value will be used as the logical URL. - *

    - * Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), - * it will be stored in three ways: - *

      - *
    • Extension
    • - *
    • StructureDefinition/Extension
    • - *
    • http://hl7.org/StructureDefinition/Extension
    • - *
    - *

    - */ - public void addValueSet(ValueSet theValueSet) { - Validate.notBlank(theValueSet.getUrl(), "theValueSet.getUrl() must not return a value"); - addToMap(theValueSet, myValueSets, theValueSet.getUrl()); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { - ValueSetExpander.ValueSetExpansionOutcome retVal = new ValueSetExpander.ValueSetExpansionOutcome(new ValueSet()); - - Set wantCodes = new HashSet<>(); - for (ValueSet.ConceptReferenceComponent next : theInclude.getConcept()) { - wantCodes.add(next.getCode()); - } - - CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem()); - if (system != null) { - List concepts = system.getConcept(); - addConcepts(theInclude, retVal.getValueset().getExpansion(), wantCodes, concepts); - } - - for (UriType next : theInclude.getValueSet()) { - ValueSet vs = myValueSets.get(defaultString(next.getValueAsString())); - if (vs != null) { - for (ConceptSetComponent nextInclude : vs.getCompose().getInclude()) { - ValueSetExpander.ValueSetExpansionOutcome contents = expandValueSet(theContext, nextInclude); - retVal.getValueset().getExpansion().getContains().addAll(contents.getValueset().getExpansion().getContains()); - } - } - } - - return retVal; - } - - private void addConcepts(ConceptSetComponent theInclude, ValueSet.ValueSetExpansionComponent theRetVal, Set theWantCodes, List theConcepts) { - for (CodeSystem.ConceptDefinitionComponent next : theConcepts) { - if (theWantCodes.isEmpty() || theWantCodes.contains(next.getCode())) { - theRetVal - .addContains() - .setSystem(theInclude.getSystem()) - .setCode(next.getCode()) - .setDisplay(next.getDisplay()); - } - addConcepts(theInclude, theRetVal, theWantCodes, next.getConcept()); - } - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - retVal.addAll(myCodeSystems.values()); - retVal.addAll(myStructureDefinitions.values()); - retVal.addAll(myValueSets.values()); - return retVal; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return new ArrayList<>(myStructureDefinitions.values()); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myCodeSystems.get(uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myValueSets.get(uri); - } - - - @SuppressWarnings("unchecked") - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - if (theClass.equals(StructureDefinition.class)) { - return (T) myStructureDefinitions.get(theUri); - } - if (theClass.equals(ValueSet.class)) { - return (T) myValueSets.get(theUri); - } - if (theClass.equals(CodeSystem.class)) { - return (T) myCodeSystems.get(theUri); - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myStructureDefinitions.get(theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return myCodeSystems.containsKey(theSystem); - } - - @Override - public boolean isValueSetSupported(FhirContext theContext, String theValueSetUrl) { - return myValueSets.containsKey(theValueSetUrl); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return null; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - ValueSet vs; - if (isNotBlank(theValueSetUrl)) { - vs = myValueSets.get(theValueSetUrl); - if (vs == null) { - return null; - } - } else { - vs = new ValueSet(); - vs.getCompose().addInclude().setSystem(theCodeSystem); - } - - IValidationSupport support = new ValidationSupportChain(this, myDefaultProfileValidationSupport); - ValueSetExpanderSimple expander = new ValueSetExpanderSimple(new HapiWorkerContext(theContext, support)); - ValueSetExpander.ValueSetExpansionOutcome expansion = expander.expand(vs, new Parameters()); - for (ValueSet.ValueSetExpansionContainsComponent nextExpansionCode : expansion.getValueset().getExpansion().getContains()) { - - if (theCode.equals(nextExpansionCode.getCode())) { - if (Constants.codeSystemNotNeeded(theCodeSystem) || nextExpansionCode.getSystem().equals(theCodeSystem)) { - return new CodeValidationResult(new CodeSystem.ConceptDefinitionComponent(new CodeType(theCode))); - } - } - } - - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/SnapshotGeneratingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/SnapshotGeneratingValidationSupport.java deleted file mode 100644 index 189a9d2e38b..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/SnapshotGeneratingValidationSupport.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.conformance.ProfileUtilities; -import org.hl7.fhir.r4.context.IWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.ElementDefinition; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import java.util.ArrayList; -import java.util.List; - -/** - * Simple validation support module that handles profile snapshot generation. This is - * separate from other functions since it needs a link to a validation support - * module itself, and it is useful to be able to pass a chain in. - */ -public class SnapshotGeneratingValidationSupport implements IValidationSupport { - private final FhirContext myCtx; - private final IValidationSupport myValidationSupport; - - public SnapshotGeneratingValidationSupport(FhirContext theCtx, IValidationSupport theValidationSupport) { - Validate.notNull(theCtx); - Validate.notNull(theValidationSupport); - myCtx = theCtx; - myValidationSupport = theValidationSupport; - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return null; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - IWorkerContext context = new HapiWorkerContext(myCtx, myValidationSupport); - ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new MyProfileKnowledgeWorker(); - ArrayList messages = new ArrayList<>(); - - StructureDefinition base = myValidationSupport.fetchStructureDefinition(myCtx, theInput.getBaseDefinition()); - if (base == null) { - throw new PreconditionFailedException("Unknown base definition: " + theInput.getBaseDefinition()); - } - - new ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, theInput, theUrl, theWebUrl, theProfileName); - - return theInput; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - private class MyProfileKnowledgeWorker implements 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, ElementDefinition.ElementDefinitionBindingComponent binding, String path) throws FHIRException { - return null; - } - - @Override - public BindingResolution resolveBinding(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(); - } - - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/ValidationSupportChain.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/ValidationSupportChain.java deleted file mode 100644 index 653c666a328..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/hapi/validation/ValidationSupportChain.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.hl7.fhir.r4.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander; - -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -public class ValidationSupportChain implements IValidationSupport { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidationSupportChain.class); - - private List myChain; - - /** - * Constructor - */ - public ValidationSupportChain() { - myChain = new ArrayList<>(); - } - - /** - * Constructor - */ - public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { - this(); - for (IValidationSupport next : theValidationSupportModules) { - if (next != null) { - myChain.add(next); - } - } - } - - public void addValidationSupport(IValidationSupport theValidationSupport) { - myChain.add(theValidationSupport); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - for (IValidationSupport next : myChain) { - boolean codeSystemSupported = next.isCodeSystemSupported(theCtx, theInclude.getSystem()); - ourLog.trace("Support {} supports: {}", next, codeSystemSupported); - if (codeSystemSupported) { - ValueSetExpander.ValueSetExpansionOutcome expansion = next.expandValueSet(theCtx, theInclude); - if (expansion != null) { - return expansion; - } - } - } - - throw new InvalidRequestException("Unable to find code system " + theInclude.getSystem()); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - List retVal = new ArrayList<>(); - for (IValidationSupport next : myChain) { - List candidates = next.fetchAllConformanceResources(theContext); - if (candidates != null) { - retVal.addAll(candidates); - } - } - return retVal; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String uri) { - for (IValidationSupport next : myChain) { - ValueSet retVal = next.fetchValueSet(theCtx, uri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - for (IValidationSupport next : myChain) { - T retVal = next.fetchResource(theContext, theClass, theUri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - for (IValidationSupport next : myChain) { - StructureDefinition retVal = next.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theSystem)) { - return true; - } - } - return false; - } - - @Override - public boolean isValueSetSupported(FhirContext theContext, String theValueSetUrl) { - for (IValidationSupport next : myChain) { - if (next.isValueSetSupported(theContext, theValueSetUrl)) { - return true; - } - } - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - StructureDefinition outcome = null; - for (IValidationSupport next : myChain) { - outcome = next.generateSnapshot(theInput, theUrl, theWebUrl, theProfileName); - if (outcome != null) { - break; - } - } - return outcome; - } - - @Override - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - - ourLog.debug("Validating code {} in chain with {} items", theCode, myChain.size()); - - for (IValidationSupport next : myChain) { - boolean shouldTry = false; - - if (isNotBlank(theValueSetUrl)) { - if (next.isValueSetSupported(theCtx, theValueSetUrl)) { - shouldTry = true; - } - } else if (next.isCodeSystemSupported(theCtx, theCodeSystem)) { - shouldTry = true; - } else { - ourLog.debug("Chain item {} does not support code system {}", next, theCodeSystem); - } - - if (shouldTry) { - CodeValidationResult result = next.validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - if (result != null) { - ourLog.debug("Chain item {} returned outcome {}", next, result.isOk()); - return result; - } - } - - } - return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - CodeValidationResult retVal = null; - for (IValidationSupport next : myChain) { - retVal = next.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - if (retVal != null) { - break; - } - } - return retVal; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theContext, theSystem)) { - return next.lookupCode(theContext, theSystem, theCode); - } - } - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - Set urls = new HashSet<>(); - for (IValidationSupport nextSupport : myChain) { - List list = nextSupport.fetchAllStructureDefinitions(theContext); - if (list != null) { - for (StructureDefinition next : list) { - if (isBlank(next.getUrl()) || urls.add(next.getUrl())) { - retVal.add(next); - } - } - } - } - return retVal; - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/CachingValidationSupport.java deleted file mode 100644 index e33f53f2387..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/CachingValidationSupport.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.hl7.fhir.r5.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; - -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; - -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; - -@SuppressWarnings("unchecked") -public class CachingValidationSupport implements IValidationSupport { - - private final IValidationSupport myWrap; - private final Cache myCache; - - public CachingValidationSupport(IValidationSupport theWrap) { - myWrap = theWrap; - myCache = Caffeine - .newBuilder() - .expireAfterWrite(60, TimeUnit.SECONDS) - .maximumSize(5000) - .build(); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return myWrap.expandValueSet(theContext, theInclude); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - String key = "fetchAllConformanceResources"; - return loadFromCache(key, t -> myWrap.fetchAllConformanceResources(theContext)); - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - String key = "fetchAllStructureDefinitions"; - return loadFromCache(key, t -> myWrap.fetchAllStructureDefinitions(theContext)); - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return myWrap.fetchCodeSystem(theContext, uri); - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return myWrap.fetchValueSet(theContext, uri); - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return loadFromCache("fetchResource " + theClass.getName() + " " + theUri, - t -> myWrap.fetchResource(theContext, theClass, theUri)); - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return myWrap.fetchStructureDefinition(theCtx, theUrl); - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - String key = "isCodeSystemSupported " + theSystem; - return loadFromCache(key, t -> myWrap.isCodeSystemSupported(theContext, theSystem)); - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - return myWrap.generateSnapshot(theInput, theUrl, theWebUrl, theProfileName); - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - String key = "validateCode " + theCodeSystem + " " + theCode + " " + defaultIfBlank(theValueSetUrl, "NO_VS"); - return loadFromCache(key, t -> myWrap.validateCode(theContext, theCodeSystem, theCode, theDisplay, theValueSetUrl)); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - return myWrap.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - String key = "lookupCode " + theSystem + " " + theCode; - return loadFromCache(key, t -> myWrap.lookupCode(theContext, theSystem, theCode)); - } - - @Nullable - private T loadFromCache(String theKey, Function theLoader) { - Function> loaderWrapper = key -> Optional.ofNullable(theLoader.apply(theKey)); - Optional result = (Optional) myCache.get(theKey, loaderWrapper); - return result.orElse(null); - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/FhirInstanceValidator.java deleted file mode 100644 index d8478c2d77f..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/FhirInstanceValidator.java +++ /dev/null @@ -1,772 +0,0 @@ -package org.hl7.fhir.r5.hapi.validation; - -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.validation.IInstanceValidatorModule; -import ca.uhn.fhir.validation.IValidationContext; -import com.github.benmanes.caffeine.cache.CacheLoader; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.time.DateUtils; -import org.fhir.ucum.UcumService; -import org.hl7.fhir.common.hapi.validation.ValidatorWrapper; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.exceptions.PathEngineException; -import org.hl7.fhir.exceptions.TerminologyServiceException; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.formats.IParser; -import org.hl7.fhir.r5.formats.ParserType; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.r5.terminologies.ValueSetExpander.ValueSetExpansionOutcome; -import org.hl7.fhir.r5.utils.FHIRPathEngine; -import org.hl7.fhir.r5.utils.INarrativeGenerator; -import org.hl7.fhir.r5.utils.IResourceValidator; -import org.hl7.fhir.r5.utils.IResourceValidator.BestPracticeWarningLevel; -import org.hl7.fhir.utilities.TerminologyServiceOptions; -import org.hl7.fhir.utilities.TranslationServices; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.*; -import java.util.concurrent.TimeUnit; - -@SuppressWarnings({"PackageAccessibility", "Duplicates"}) -public class FhirInstanceValidator extends org.hl7.fhir.r5.hapi.validation.BaseValidatorBridge implements IInstanceValidatorModule { - - private boolean myAnyExtensionsAllowed = true; - private BestPracticeWarningLevel myBestPracticeWarningLevel; - private IValidationSupport myValidationSupport; - private boolean noTerminologyChecks = false; - private volatile WorkerContextWrapper myWrappedWorkerContext; - private boolean errorForUnknownProfiles; - private List myExtensionDomains = Collections.emptyList(); - - /** - * Constructor - *

    - * Uses {@link DefaultProfileValidationSupport} for {@link IValidationSupport validation support} - */ - public FhirInstanceValidator() { - this(new DefaultProfileValidationSupport()); - } - - /** - * Constructor which uses the given validation support - * - * @param theValidationSupport The validation support - */ - public FhirInstanceValidator(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:

      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(List extensionDomains) { - this.myExtensionDomains = extensionDomains; - return this; - } - - /** - * Every element in a resource or data type includes an optional extension child element - * which is identified by it's {@code url attribute}. There exists a number of predefined - * extension urls or extension domains:
      - *
    • any url which contains {@code example.org}, {@code nema.org}, or {@code acme.com}.
    • - *
    • any url which starts with {@code http://hl7.org/fhir/StructureDefinition/}.
    • - *
    - * It is possible to extend this list of known extension by defining custom extensions: - * Any url which starts which one of the elements in the list of custom extension domains is - * considered as known. - *

    - * Any unknown extension domain will result in an information message when validating a resource. - *

    - */ - public FhirInstanceValidator setCustomExtensionDomains(String... extensionDomains) { - this.myExtensionDomains = Arrays.asList(extensionDomains); - return this; - } - - /** - * Returns the "best practice" warning level (default is {@link BestPracticeWarningLevel#Hint}). - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @see #setBestPracticeWarningLevel(BestPracticeWarningLevel) - */ - public BestPracticeWarningLevel getBestPracticeWarningLevel() { - return myBestPracticeWarningLevel; - } - - /** - * Sets the "best practice warning level". When validating, any deviations from best practices will be reported at - * this level. - *

    - * The FHIR Instance Validator has a number of checks for best practices in terms of FHIR usage. If this setting is - * set to {@link BestPracticeWarningLevel#Error}, any resource data which does not meet these best practices will be - * reported at the ERROR level. If this setting is set to {@link BestPracticeWarningLevel#Ignore}, best practice - * guielines will be ignored. - *

    - * - * @param theBestPracticeWarningLevel The level, must not be null - */ - public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPracticeWarningLevel) { - Validate.notNull(theBestPracticeWarningLevel); - myBestPracticeWarningLevel = theBestPracticeWarningLevel; - } - - /** - * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public IValidationSupport getValidationSupport() { - return myValidationSupport; - } - - /** - * Sets the {@link IValidationSupport validation support} in use by this validator. Default is an instance of - * {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used. - */ - public void setValidationSupport(IValidationSupport theValidationSupport) { - myValidationSupport = theValidationSupport; - myWrappedWorkerContext = null; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public boolean isAnyExtensionsAllowed() { - return myAnyExtensionsAllowed; - } - - /** - * If set to {@literal true} (default is true) extensions which are not known to the - * validator (e.g. because they have not been explicitly declared in a profile) will - * be validated but will not cause an error. - */ - public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) { - myAnyExtensionsAllowed = theAnyExtensionsAllowed; - } - - public boolean isErrorForUnknownProfiles() { - return errorForUnknownProfiles; - } - - public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { - this.errorForUnknownProfiles = errorForUnknownProfiles; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public boolean isNoTerminologyChecks() { - return noTerminologyChecks; - } - - /** - * If set to {@literal true} (default is false) the valueSet will not be validate - */ - public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) { - noTerminologyChecks = theNoTerminologyChecks; - } - - public List getExtensionDomains() { - return myExtensionDomains; - } - - @Override - protected List validate(IValidationContext theValidationCtx) { - WorkerContextWrapper wrappedWorkerContext = myWrappedWorkerContext; - if (wrappedWorkerContext == null) { - HapiWorkerContext workerContext = new HapiWorkerContext(theValidationCtx.getFhirContext(), myValidationSupport); - wrappedWorkerContext = new WorkerContextWrapper(workerContext); - } - myWrappedWorkerContext = wrappedWorkerContext; - - return new ValidatorWrapper() - .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) - .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) - .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) - .setExtensionDomains(getExtensionDomains()) - .setNoTerminologyChecks(isNoTerminologyChecks()) - .validate(wrappedWorkerContext, theValidationCtx); - } - - - private static class WorkerContextWrapper implements IWorkerContext { - private final HapiWorkerContext myWrap; - private volatile List myAllStructures; - private LoadingCache myFetchResourceCache; - private org.hl7.fhir.r5.model.Parameters myExpansionProfile; - - WorkerContextWrapper(HapiWorkerContext theWorkerContext) { - myWrap = theWorkerContext; - - long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND; - if (System.getProperties().containsKey(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)) { - timeoutMillis = Long.parseLong(System.getProperty(Constants.TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS)); - } - - myFetchResourceCache = Caffeine.newBuilder() - .expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS) - .maximumSize(10000) - .build(new CacheLoader() { - @Override - public org.hl7.fhir.r5.model.Resource load(ResourceKey key) throws Exception { - Resource fetched; - switch (key.getResourceName()) { - case "StructureDefinition": - fetched = myWrap.fetchResource(StructureDefinition.class, key.getUri()); - break; - case "ValueSet": - fetched = myWrap.fetchResource(ValueSet.class, key.getUri()); - break; - case "CodeSystem": - fetched = myWrap.fetchResource(CodeSystem.class, key.getUri()); - break; - case "Questionnaire": - fetched = myWrap.fetchResource(Questionnaire.class, key.getUri()); - break; - case "ImplementationGuide": - fetched = myWrap.fetchResource(ImplementationGuide.class, key.getUri()); - break; - default: - throw new UnsupportedOperationException("Don't know how to fetch " + key.getResourceName()); - } - - if (fetched == null) { - return null; - } - - try { - return fetched; - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - }); - } - - @Override - public List allConformanceResources() { - throw new UnsupportedOperationException(); - } - - @Override - public void generateSnapshot(org.hl7.fhir.r5.model.StructureDefinition p) throws FHIRException { - // nothing yet - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - @Override - public org.hl7.fhir.r5.model.Parameters getExpansionParameters() { - return myExpansionProfile; - } - - @Override - public void setExpansionProfile(org.hl7.fhir.r5.model.Parameters expParameters) { - myExpansionProfile = expParameters; - } - - @Override - public List allStructures() { - - List retVal = myAllStructures; - if (retVal == null) { - retVal = new ArrayList<>(); - for (StructureDefinition next : myWrap.allStructures()) { - try { - retVal.add(next); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - myAllStructures = retVal; - } - - return retVal; - } - - @Override - public List getStructures() { - return allStructures(); - } - - @Override - public void cacheResource(org.hl7.fhir.r5.model.Resource res) { - throw new UnsupportedOperationException(); - } - - @Nonnull - private ValidationResult convertValidationResult(@Nullable org.hl7.fhir.r5.context.IWorkerContext.ValidationResult theResult) { - ValidationResult retVal = null; - if (theResult != null) { - IssueSeverity issueSeverity = theResult.getSeverity(); - String message = theResult.getMessage(); - org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent conceptDefinition = null; - if (theResult.asConceptDefinition() != null) { - try { - conceptDefinition = (theResult.asConceptDefinition()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - retVal = new ValidationResult(issueSeverity, message, conceptDefinition); - } - - if (retVal == null) { - retVal = new ValidationResult(IssueSeverity.ERROR, "Validation failed"); - } - - return retVal; - } - - @Override - public ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean heiarchical) { - ValueSet convertedSource; - try { - convertedSource = (source); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - ValueSetExpansionOutcome expanded = myWrap.expandVS(convertedSource, cacheOk, heiarchical); - - org.hl7.fhir.r5.model.ValueSet convertedResult = null; - if (expanded.getValueset() != null) { - try { - convertedResult = (expanded.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - String error = expanded.getError(); - ValueSetExpander.TerminologyServiceErrorClass result = null; - - return new ValueSetExpansionOutcome(convertedResult, error, result); - } - - @Override - public ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heiarchical) { - throw new UnsupportedOperationException(); - } - - @Override - public ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException { - ValueSet.ConceptSetComponent convertedInc = null; - if (inc != null) { - try { - convertedInc = (inc); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSetExpansionOutcome expansion = myWrap.expandVS(convertedInc, heirarchical); - org.hl7.fhir.r5.model.ValueSet valueSetExpansion = null; - if (expansion != null) { - try { - valueSetExpansion = (expansion.getValueset()); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - ValueSetExpansionOutcome outcome = new ValueSetExpansionOutcome(valueSetExpansion); - return outcome; - } - - @Override - public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) { - CodeSystem fetched = myWrap.fetchCodeSystem(system); - if (fetched == null) { - return null; - } - try { - return (fetched); - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - @Override - public T fetchResource(Class class_, String uri) { - - ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); - @SuppressWarnings("unchecked") - T retVal = (T) myFetchResourceCache.get(key); - - return retVal; - } - - @Override - public org.hl7.fhir.r5.model.Resource fetchResourceById(String type, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public T fetchResourceWithException(Class class_, String uri) throws FHIRException { - T retVal = fetchResource(class_, uri); - if (retVal == null) { - throw new FHIRException("Can not find resource of type " + class_.getSimpleName() + " with uri " + uri); - } - return retVal; - } - - @Override - public List findMapsForSource(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getAbbreviation(String name) { - return myWrap.getAbbreviation(name); - } - - @Override - public INarrativeGenerator getNarrativeGenerator(String prefix, String basePath) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(ParserType type) { - throw new UnsupportedOperationException(); - } - - @Override - public IParser getParser(String type) { - throw new UnsupportedOperationException(); - } - - @Override - public List getResourceNames() { - return myWrap.getResourceNames(); - } - - @Override - public Set getResourceNamesAsSet() { - return new HashSet<>(myWrap.getResourceNames()); - } - - @Override - public org.hl7.fhir.r5.model.StructureMap getTransform(String url) { - throw new UnsupportedOperationException(); - } - - @Override - public String getOverrideVersionNs() { - return null; - } - - @Override - public void setOverrideVersionNs(String value) { - - } - - @Override - public org.hl7.fhir.r5.model.StructureDefinition fetchTypeDefinition(String typeName) { - return fetchResource(org.hl7.fhir.r5.model.StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName); - } - - @Override - public List getTypeNames() { - return myWrap.getTypeNames(); - } - - @Override - public UcumService getUcumService() { - throw new UnsupportedOperationException(); - } - - @Override - public void setUcumService(UcumService ucumService) { - throw new UnsupportedOperationException(); - } - - @Override - public String getVersion() { - return myWrap.getVersion(); - } - - @Override - public boolean hasCache() { - return myWrap.hasCache(); - } - - @Override - public boolean hasResource(Class class_, String uri) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isNoTerminologyServer() { - return myWrap.isNoTerminologyServer(); - } - - @Override - public List listTransforms() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newJsonParser() { - throw new UnsupportedOperationException(); - } - - @Override - public IResourceValidator newValidator() { - throw new UnsupportedOperationException(); - } - - @Override - public IParser newXmlParser() { - throw new UnsupportedOperationException(); - } - - @Override - public String oid2Uri(String code) { - return myWrap.oid2Uri(code); - } - - @Override - public ILoggingService getLogger() { - return null; - } - - @Override - public void setLogger(ILoggingService logger) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean supportsSystem(String system) { - return myWrap.supportsSystem(system); - } - - @Override - public TranslationServices translator() { - throw new UnsupportedOperationException(); - } - - @Override - public Set typeTails() { - return myWrap.typeTails(); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display) { - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - - try { - if (vs != null) { - convertedVs = (vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String code, org.hl7.fhir.r5.model.ValueSet vs) { - ValueSet convertedVs = null; - try { - if (vs != null) { - convertedVs = (vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, Constants.CODESYSTEM_VALIDATE_NOT_NEEDED, code, null, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.Coding code, org.hl7.fhir.r5.model.ValueSet vs) { - Coding convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = (code); - } - if (vs != null) { - convertedVs = (vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, org.hl7.fhir.r5.model.CodeableConcept code, org.hl7.fhir.r5.model.ValueSet vs) { - CodeableConcept convertedCode = null; - ValueSet convertedVs = null; - - try { - if (code != null) { - convertedCode = (code); - } - if (vs != null) { - convertedVs = (vs); - } - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, convertedCode, convertedVs); - return convertValidationResult(result); - } - - @Override - public ValidationResult validateCode(TerminologyServiceOptions theOptions, String system, String code, String display, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent vsi) { - ValueSet.ConceptSetComponent conceptSetComponent = null; - if (vsi != null) { - try { - conceptSetComponent = vsi; - } catch (FHIRException e) { - throw new InternalErrorException(e); - } - } - - org.hl7.fhir.r5.context.IWorkerContext.ValidationResult result = myWrap.validateCode(theOptions, system, code, display, conceptSetComponent); - return convertValidationResult(result); - } - - } - - public static class NullEvaluationContext implements FHIRPathEngine.IEvaluationContext { - @Override - public Base resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { - return null; - } - - @Override - public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException { - return null; - } - - @Override - public boolean log(String argument, List focus) { - return false; - } - - @Override - public FunctionDetails resolveFunction(String functionName) { - return null; - } - - @Override - public TypeDetails checkFunction(Object appContext, String functionName, List parameters) throws PathEngineException { - return null; - } - - @Override - public List executeFunction(Object appContext, String functionName, List> parameters) { - return null; - } - - @Override - public Base resolveReference(Object appContext, String url) throws FHIRException { - return null; - } - - @Override - public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException { - return false; - } - - @Override - public ValueSet resolveValueSet(Object appContext, String url) { - return null; - } - } - - private static class ResourceKey { - private final int myHashCode; - private String myResourceName; - private String myUri; - - private ResourceKey(String theResourceName, String theUri) { - myResourceName = theResourceName; - myUri = theUri; - myHashCode = new HashCodeBuilder(17, 37) - .append(myResourceName) - .append(myUri) - .toHashCode(); - } - - @Override - public boolean equals(Object theO) { - if (this == theO) { - return true; - } - - if (theO == null || getClass() != theO.getClass()) { - return false; - } - - ResourceKey that = (ResourceKey) theO; - - return new EqualsBuilder() - .append(myResourceName, that.myResourceName) - .append(myUri, that.myUri) - .isEquals(); - } - - public String getResourceName() { - return myResourceName; - } - - public String getUri() { - return myUri; - } - - @Override - public int hashCode() { - return myHashCode; - } - } -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/SnapshotGeneratingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/SnapshotGeneratingValidationSupport.java deleted file mode 100644 index 25409770c46..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/SnapshotGeneratingValidationSupport.java +++ /dev/null @@ -1,155 +0,0 @@ -package org.hl7.fhir.r5.hapi.validation; - -import ca.uhn.fhir.context.*; -import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.conformance.ProfileUtilities; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.ElementDefinition; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; -import org.hl7.fhir.utilities.validation.ValidationMessage; - -import java.util.ArrayList; -import java.util.List; - -/** - * Simple validation support module that handles profile snapshot generation. This is - * separate from other funcrtions since it needs a link to a validation support - * module itself, and it is useful to be able to pass a chain in. - */ -public class SnapshotGeneratingValidationSupport implements IValidationSupport { - private final FhirContext myCtx; - private final IValidationSupport myValidationSupport; - - public SnapshotGeneratingValidationSupport(FhirContext theCtx, IValidationSupport theValidationSupport) { - Validate.notNull(theCtx); - Validate.notNull(theValidationSupport); - myCtx = theCtx; - myValidationSupport = theValidationSupport; - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude) { - return null; - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - return null; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) { - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theContext, String uri) { - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - IWorkerContext context = new HapiWorkerContext(myCtx, myValidationSupport); - ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new MyProfileKnowledgeWorker(); - ArrayList messages = new ArrayList<>(); - - StructureDefinition base = myValidationSupport.fetchStructureDefinition(myCtx, theInput.getBaseDefinition()); - if (base == null) { - throw new PreconditionFailedException("Unknown base definition: " + theInput.getBaseDefinition()); - } - - new ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, theInput, theUrl, theWebUrl, theProfileName); - - return theInput; - } - - @Override - public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - return null; - } - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - return null; - } - - private class MyProfileKnowledgeWorker implements 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(StructureDefinition def, ElementDefinition.ElementDefinitionBindingComponent binding, String path) throws FHIRException { - return null; - } - - @Override - public String getLinkForUrl(String corePath, String url) { - throw new UnsupportedOperationException(); - } - - @Override - public BindingResolution resolveBinding(StructureDefinition def, String url, String path) throws FHIRException { - return null; - } - - @Override - public String getLinkForProfile(StructureDefinition profile, String url) { - return null; - } - - @Override - public boolean prependLinks() { - return false; - } - } - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/ValidationSupportChain.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/ValidationSupportChain.java deleted file mode 100644 index 8892d747111..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r5/hapi/validation/ValidationSupportChain.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.hl7.fhir.r5.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.model.CodeSystem; -import org.hl7.fhir.r5.model.StructureDefinition; -import org.hl7.fhir.r5.model.ValueSet; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; -import org.hl7.fhir.r5.terminologies.ValueSetExpander; - -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.apache.commons.lang3.StringUtils.isBlank; - -public class ValidationSupportChain implements IValidationSupport { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ValidationSupportChain.class); - - private List myChain; - - /** - * Constructor - */ - public ValidationSupportChain() { - myChain = new ArrayList<>(); - } - - /** - * Constructor - */ - public ValidationSupportChain(IValidationSupport... theValidationSupportModules) { - this(); - for (IValidationSupport next : theValidationSupportModules) { - if (next != null) { - myChain.add(next); - } - } - } - - public void addValidationSupport(IValidationSupport theValidationSupport) { - myChain.add(theValidationSupport); - } - - @Override - public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) { - ValueSetExpander.ValueSetExpansionOutcome expansion = next.expandValueSet(theCtx, theInclude); - if (expansion != null) { - return expansion; - } - } - } - - throw new InvalidRequestException("unable to find code system " + theInclude.getSystem()); - } - - @Override - public List fetchAllConformanceResources(FhirContext theContext) { - List retVal = new ArrayList<>(); - for (IValidationSupport next : myChain) { - List candidates = next.fetchAllConformanceResources(theContext); - if (candidates != null) { - retVal.addAll(candidates); - } - } - return retVal; - } - - @Override - public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public ValueSet fetchValueSet(FhirContext theCtx, String uri) { - for (IValidationSupport next : myChain) { - ValueSet retVal = next.fetchValueSet(theCtx, uri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public T fetchResource(FhirContext theContext, Class theClass, String theUri) { - for (IValidationSupport next : myChain) { - T retVal = next.fetchResource(theContext, theClass, theUri); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { - for (IValidationSupport next : myChain) { - StructureDefinition retVal = next.fetchStructureDefinition(theCtx, theUrl); - if (retVal != null) { - return retVal; - } - } - return null; - } - - @Override - public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theCtx, theSystem)) { - return true; - } - } - return false; - } - - @Override - public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName) { - StructureDefinition outcome = null; - for (IValidationSupport next : myChain) { - outcome = next.generateSnapshot(theInput, theUrl, theWebUrl, theProfileName); - if (outcome != null) { - break; - } - } - return outcome; - } - - @Override - public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - - ourLog.debug("Validating code {} in chain with {} items", theCode, myChain.size()); - - for (IValidationSupport next : myChain) { - if (theCodeSystem != null && next.isCodeSystemSupported(theCtx, theCodeSystem)) { - CodeValidationResult result = next.validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - if (result != null) { - ourLog.debug("Chain item {} returned outcome {}", next, result.isOk()); - return result; - } - } else { - ourLog.debug("Chain item {} does not support code system {}", next, theCodeSystem); - } - } - return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay, theValueSetUrl); - } - - @Override - public CodeValidationResult validateCodeInValueSet(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { - CodeValidationResult retVal = null; - for (IValidationSupport next : myChain) { - retVal = next.validateCodeInValueSet(theContext, theCodeSystem, theCode, theDisplay, theValueSet); - if (retVal != null) { - break; - } - } - return retVal; - } - - - @Override - public LookupCodeResult lookupCode(FhirContext theContext, String theSystem, String theCode) { - for (IValidationSupport next : myChain) { - if (next.isCodeSystemSupported(theContext, theSystem)) { - return next.lookupCode(theContext, theSystem, theCode); - } - } - return null; - } - - @Override - public List fetchAllStructureDefinitions(FhirContext theContext) { - ArrayList retVal = new ArrayList<>(); - Set urls = new HashSet<>(); - for (IValidationSupport nextSupport : myChain) { - List list = nextSupport.fetchAllStructureDefinitions(theContext); - if (list != null) { - for (StructureDefinition next : list) { - if (isBlank(next.getUrl()) || urls.add(next.getUrl())) { - retVal.add(next); - } - } - } - } - return retVal; - } - -} diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorDstu3Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorDstu3Test.java index 00e0373d1e5..59c4fc2b0ca 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorDstu3Test.java @@ -28,7 +28,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hamcrest.Matchers; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender; import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.Patient; @@ -179,7 +179,7 @@ public class RequestValidatingInterceptorDstu3Test { @Test public void testCreateXmlInvalidInstanceValidator() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorR4Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorR4Test.java index db5a3ef1872..5baeb2e0d85 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorR4Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/RequestValidatingInterceptorR4Test.java @@ -1,18 +1,31 @@ package ca.uhn.fhir.rest.server; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.*; -import static org.mockito.Mockito.mock; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; +import ca.uhn.fhir.test.utilities.JettyUtil; +import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.validation.IValidationContext; +import ca.uhn.fhir.validation.IValidatorModule; +import ca.uhn.fhir.validation.ResultSeverityEnum; +import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; import org.apache.http.HttpResponse; -import org.apache.http.client.methods.*; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; @@ -22,29 +35,28 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Narrative; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.utilities.xhtml.XhtmlNode; -import org.junit.*; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import org.mockito.Mockito; -import com.google.common.base.Charsets; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.annotation.*; -import ca.uhn.fhir.rest.api.Constants; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; -import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; -import ca.uhn.fhir.validation.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.mock; public class RequestValidatingInterceptorR4Test { private static CloseableHttpClient ourClient; @@ -180,7 +192,7 @@ public class RequestValidatingInterceptorR4Test { @Test public void testValidateXmlPayloadWithXxeDirective_InstanceValidator() throws IOException { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); String encoded = @@ -216,7 +228,7 @@ public class RequestValidatingInterceptorR4Test { @Test public void testCreateXmlInvalidInstanceValidator() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorDstu3Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorDstu3Test.java index 96853860fcc..b5fd26aa9f8 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorDstu3Test.java @@ -1,14 +1,21 @@ package ca.uhn.fhir.rest.server; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; - -import java.util.ArrayList; -import java.util.concurrent.TimeUnit; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Search; import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.interceptor.ResponseValidatingInterceptor; +import ca.uhn.fhir.test.utilities.JettyUtil; +import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.validation.IValidationContext; +import ca.uhn.fhir.validation.IValidatorModule; +import ca.uhn.fhir.validation.ResultSeverityEnum; import org.apache.commons.io.IOUtils; import org.apache.http.HttpResponse; import org.apache.http.client.methods.CloseableHttpResponse; @@ -21,29 +28,22 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hamcrest.Matchers; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender; import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.Patient; -import org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.junit.*; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import org.mockito.Mockito; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.annotation.Delete; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.OptionalParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.interceptor.ResponseValidatingInterceptor; -import ca.uhn.fhir.test.utilities.JettyUtil; -import ca.uhn.fhir.util.TestUtil; -import ca.uhn.fhir.validation.IValidationContext; -import ca.uhn.fhir.validation.IValidatorModule; -import ca.uhn.fhir.validation.ResultSeverityEnum; +import java.util.ArrayList; +import java.util.concurrent.TimeUnit; + +import static org.mockito.Mockito.mock; public class ResponseValidatingInterceptorDstu3Test { public static IBaseResource myReturnResource; @@ -215,7 +215,7 @@ public class ResponseValidatingInterceptorDstu3Test { @Test public void testLongHeaderTruncated() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); myInterceptor.setFailOnSeverity(null); @@ -353,7 +353,7 @@ public class ResponseValidatingInterceptorDstu3Test { @Test public void testSearchXmlInvalidInstanceValidator() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); @@ -425,7 +425,7 @@ public class ResponseValidatingInterceptorDstu3Test { @Test public void testSkipEnabled() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.addExcludeOperationType(RestOperationTypeEnum.METADATA); myInterceptor.setResponseHeaderValueNoIssues("No issues"); @@ -445,7 +445,7 @@ public class ResponseValidatingInterceptorDstu3Test { @Test public void testSkipNotEnabled() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setResponseHeaderValueNoIssues("No issues"); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorR4Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorR4Test.java index f7283cac82c..c63bf8a7890 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorR4Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/ResponseValidatingInterceptorR4Test.java @@ -23,7 +23,7 @@ import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hamcrest.Matchers; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Narrative; @@ -215,7 +215,7 @@ public class ResponseValidatingInterceptorR4Test { @Test public void testLongHeaderTruncated() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); myInterceptor.setFailOnSeverity(null); @@ -356,7 +356,7 @@ public class ResponseValidatingInterceptorR4Test { @Test public void testSearchXmlInvalidInstanceValidator() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); @@ -429,7 +429,7 @@ public class ResponseValidatingInterceptorR4Test { @Test public void testSkipEnabled() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.addExcludeOperationType(RestOperationTypeEnum.METADATA); myInterceptor.setResponseHeaderValueNoIssues("No issues"); @@ -449,7 +449,7 @@ public class ResponseValidatingInterceptorR4Test { @Test public void testSkipNotEnabled() throws Exception { - IValidatorModule module = new FhirInstanceValidator(); + IValidatorModule module = new FhirInstanceValidator(ourCtx); myInterceptor.addValidatorModule(module); myInterceptor.setResponseHeaderValueNoIssues("No issues"); myInterceptor.setAddResponseHeaderOnSeverity(ResultSeverityEnum.INFORMATION); diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/validation/ParserWithValidationDstu3Test.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/validation/ParserWithValidationDstu3Test.java index f4a040c4503..ec1edc0711c 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/validation/ParserWithValidationDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/validation/ParserWithValidationDstu3Test.java @@ -1,10 +1,13 @@ package ca.uhn.fhir.validation; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.util.TestUtil; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.ActivityDefinition; import org.hl7.fhir.dstu3.model.ConceptMap; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -23,7 +26,7 @@ public class ParserWithValidationDstu3Test { public void testActivityDefinitionElementsOrder() { final String origContent = "{\"resourceType\":\"ActivityDefinition\",\"id\":\"x1\",\"url\":\"http://testing.org\",\"status\":\"draft\",\"timingDateTime\":\"2011-02-03\"}"; final IParser parser = ourCtx.newJsonParser(); - DefaultProfileValidationSupport validationSupport = new DefaultProfileValidationSupport(); + IValidationSupport validationSupport = getValidationSupport(); // verify that InstanceValidator likes the format { @@ -62,7 +65,7 @@ public class ParserWithValidationDstu3Test { public void testChildOrderWithChoiceTypeXml() { final String origContent = ""; final IParser parser = ourCtx.newXmlParser(); - DefaultProfileValidationSupport validationSupport = new DefaultProfileValidationSupport(); + IValidationSupport validationSupport = getValidationSupport(); // verify that InstanceValidator likes the format { @@ -98,7 +101,7 @@ public class ParserWithValidationDstu3Test { public void testConceptMapElementsOrder() { final String origContent = "{\"resourceType\":\"ConceptMap\",\"id\":\"x1\",\"url\":\"http://testing.org\",\"status\":\"draft\",\"sourceUri\":\"http://y1\"}"; final IParser parser = ourCtx.newJsonParser(); - DefaultProfileValidationSupport validationSupport = new DefaultProfileValidationSupport(); + IValidationSupport validationSupport = getValidationSupport(); // verify that InstanceValidator likes the format { @@ -130,11 +133,15 @@ public class ParserWithValidationDstu3Test { Assert.assertEquals(origContent, content); } + private IValidationSupport getValidationSupport() { + return new ValidationSupportChain(new DefaultProfileValidationSupport(ourCtx), new InMemoryTerminologyServerValidationSupport(ourCtx)); + } + @Test public void testConceptMapElementsOrderXml() { final String origContent = ""; final IParser parser = ourCtx.newXmlParser(); - DefaultProfileValidationSupport validationSupport = new DefaultProfileValidationSupport(); + IValidationSupport validationSupport = getValidationSupport(); // verify that InstanceValidator likes the format { diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/ValidationSupportChainTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/ValidationSupportChainTest.java new file mode 100644 index 00000000000..4ff640e50d6 --- /dev/null +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/ValidationSupportChainTest.java @@ -0,0 +1,40 @@ +package org.hl7.fhir.common.hapi.validation; + +import ca.uhn.fhir.context.ConfigurationException; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.junit.Test; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.mock; + +public class ValidationSupportChainTest { + + @Test + public void testVersionCheck() { + + DefaultProfileValidationSupport ctx3 = new DefaultProfileValidationSupport(FhirContext.forDstu3()); + DefaultProfileValidationSupport ctx4 = new DefaultProfileValidationSupport(FhirContext.forR4()); + + try { + new ValidationSupportChain(ctx3, ctx4); + } catch (ConfigurationException e) { + assertEquals("Trying to add validation support of version R4 to chain with 1 entries of version DSTU3", e.getMessage()); + } + + } + + @Test + public void testMissingContext() { + IValidationSupport ctx = mock(IValidationSupport.class); + try { + new ValidationSupportChain(ctx); + } catch (ConfigurationException e) { + assertEquals("Can not add validation support: getFhirContext() returns null", e.getMessage()); + } + } + + +} diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupportTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupportTest.java new file mode 100644 index 00000000000..dda79bab7b4 --- /dev/null +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupportTest.java @@ -0,0 +1,166 @@ +package org.hl7.fhir.common.hapi.validation.support; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Operation; +import ca.uhn.fhir.rest.annotation.OperationParam; +import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; +import ca.uhn.fhir.test.utilities.server.RestfulServerRule; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.ValueSet; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; + +import javax.servlet.http.HttpServletRequest; + +import static org.hamcrest.Matchers.lessThan; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +public class RemoteTerminologyServiceValidationSupportTest { + + private static final String DISPLAY = "DISPLAY"; + private static final String CODE_SYSTEM = "CODE_SYS"; + private static final String CODE = "CODE"; + private static final String VALUE_SET_URL = "http://value.set/url"; + private static final String ERROR_MESSAGE = "This is an error message"; + private static FhirContext ourCtx = FhirContext.forR4(); + + @Rule + public RestfulServerRule myRestfulServerRule = new RestfulServerRule(ourCtx); + + private MyMockTerminologyServiceProvider myProvider; + private RemoteTerminologyServiceValidationSupport mySvc; + + @Before + public void before() { + myProvider = new MyMockTerminologyServiceProvider(); + myRestfulServerRule.getRestfulServer().registerProvider(myProvider); + String baseUrl = "http://localhost:" + myRestfulServerRule.getPort(); + + mySvc = new RemoteTerminologyServiceValidationSupport(ourCtx); + mySvc.setBaseUrl(baseUrl); + mySvc.addClientInterceptor(new LoggingInterceptor(false)); + } + + @After + public void after() { + assertThat(myProvider.myInvocationCount, lessThan(2)); + } + + @Test + public void testValidateCode_SystemCodeDisplayUrl_BlankCode() { + IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, "", DISPLAY, VALUE_SET_URL); + assertEquals(null, outcome); + } + + @Test + public void testValidateCode_SystemCodeDisplayUrl_Success() { + createNextReturnParameters(true, DISPLAY, null); + + IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, CODE, DISPLAY, VALUE_SET_URL); + assertEquals(CODE, outcome.getCode()); + assertEquals(DISPLAY, outcome.getDisplay()); + assertEquals(null, outcome.getSeverity()); + assertEquals(null, outcome.getMessage()); + + assertEquals(CODE, myProvider.myLastCode.getCode()); + assertEquals(DISPLAY, myProvider.myLastDisplay.getValue()); + assertEquals(CODE_SYSTEM, myProvider.myLastSystem.getValue()); + assertEquals(VALUE_SET_URL, myProvider.myLastUrl.getValue()); + assertEquals(null, myProvider.myLastValueSet); + } + + @Test + public void testValidateCode_SystemCodeDisplayUrl_Error() { + createNextReturnParameters(false, null, ERROR_MESSAGE); + + IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, CODE, DISPLAY, VALUE_SET_URL); + assertEquals(null, outcome.getCode()); + assertEquals(null, outcome.getDisplay()); + assertEquals(IValidationSupport.IssueSeverity.ERROR, outcome.getSeverity()); + assertEquals(ERROR_MESSAGE, outcome.getMessage()); + + assertEquals(CODE, myProvider.myLastCode.getCode()); + assertEquals(DISPLAY, myProvider.myLastDisplay.getValue()); + assertEquals(CODE_SYSTEM, myProvider.myLastSystem.getValue()); + assertEquals(VALUE_SET_URL, myProvider.myLastUrl.getValue()); + assertEquals(null, myProvider.myLastValueSet); + } + + @Test + public void testValidateCodeInValueSet_SystemCodeDisplayVS_Good() { + createNextReturnParameters(true, DISPLAY, null); + + ValueSet valueSet = new ValueSet(); + valueSet.setUrl(VALUE_SET_URL); + + IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(null, null, CODE_SYSTEM, CODE, DISPLAY, valueSet); + assertEquals(CODE, outcome.getCode()); + assertEquals(DISPLAY, outcome.getDisplay()); + assertEquals(null, outcome.getSeverity()); + assertEquals(null, outcome.getMessage()); + + assertEquals(CODE, myProvider.myLastCode.getCode()); + assertEquals(DISPLAY, myProvider.myLastDisplay.getValue()); + assertEquals(CODE_SYSTEM, myProvider.myLastSystem.getValue()); + assertEquals(null, myProvider.myLastUrl); + assertEquals(VALUE_SET_URL, myProvider.myLastValueSet.getUrl()); + } + + public void createNextReturnParameters(boolean theResult, String theDisplay, String theMessage) { + myProvider.myNextReturn = new Parameters(); + myProvider.myNextReturn.addParameter("result", theResult); + myProvider.myNextReturn.addParameter("display", theDisplay); + if (theMessage != null) { + myProvider.myNextReturn.addParameter("message", theMessage); + } + } + + private static class MyMockTerminologyServiceProvider { + + + private Parameters myNextReturn; + private UriType myLastUrl; + private CodeType myLastCode; + private int myInvocationCount; + private UriType myLastSystem; + private StringType myLastDisplay; + private ValueSet myLastValueSet; + + @Operation(name = "validate-code", idempotent = true, typeName = "ValueSet", returnParameters = { + @OperationParam(name = "result", type = BooleanType.class, min = 1), + @OperationParam(name = "message", type = StringType.class), + @OperationParam(name = "display", type = StringType.class) + }) + public Parameters validateCode( + HttpServletRequest theServletRequest, + @IdParam(optional = true) IdType theId, + @OperationParam(name = "url", min = 0, max = 1) UriType theValueSetUrl, + @OperationParam(name = "code", min = 0, max = 1) CodeType theCode, + @OperationParam(name = "system", min = 0, max = 1) UriType theSystem, + @OperationParam(name = "display", min = 0, max = 1) StringType theDisplay, + @OperationParam(name = "valueSet") ValueSet theValueSet + ) { + myInvocationCount++; + myLastUrl = theValueSetUrl; + myLastCode = theCode; + myLastSystem = theSystem; + myLastDisplay = theDisplay; + myLastValueSet = theValueSet; + return myNextReturn; + + } + + + } + +} diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidatorDstu2Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2/hapi/validation/FhirInstanceValidatorDstu2Test.java similarity index 66% rename from hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidatorDstu2Test.java rename to hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2/hapi/validation/FhirInstanceValidatorDstu2Test.java index 19538878ae9..64d1276511f 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/FhirInstanceValidatorDstu2Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2/hapi/validation/FhirInstanceValidatorDstu2Test.java @@ -1,6 +1,8 @@ -package org.hl7.fhir.instance.hapi.validation; +package org.hl7.fhir.dstu2.hapi.validation; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.model.dstu2.composite.PeriodDt; import ca.uhn.fhir.model.dstu2.resource.Parameters; import ca.uhn.fhir.model.dstu2.resource.Patient; @@ -14,28 +16,43 @@ import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.dstu2.model.DateType; import org.hl7.fhir.dstu2.model.Observation; import org.hl7.fhir.dstu2.model.Observation.ObservationStatus; import org.hl7.fhir.dstu2.model.QuestionnaireResponse; import org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus; import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import java.io.IOException; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; public class FhirInstanceValidatorDstu2Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidatorDstu2Test.class); - private static FhirInstanceValidator ourValidator = new FhirInstanceValidator(new DefaultProfileValidationSupport()); private static FhirContext ourCtxDstu2 = FhirContext.forDstu2(); + private static FhirInstanceValidator ourValidator; private static FhirContext ourCtxHl7OrgDstu2 = FhirContext.forDstu2Hl7Org(); + @BeforeClass + public static void beforeClass() { + DefaultProfileValidationSupport defaultProfileValidationSupport = new DefaultProfileValidationSupport(ourCtxDstu2); + IValidationSupport validationSupport = new ValidationSupportChain(defaultProfileValidationSupport, new InMemoryTerminologyServerValidationSupport(ourCtxDstu2)); + ourValidator = new FhirInstanceValidator(validationSupport); + } + /** * See #872 */ @@ -101,8 +118,9 @@ public class FhirInstanceValidatorDstu2Test { } @Test + @SuppressWarnings("SpellCheckingInspection") public void testValidateQuestionnaireResponseInParameters() { - String input = "{\"resourceType\":\"Parameters\",\"parameter\":[{\"name\":\"mode\",\"valueString\":\"create\"},{\"name\":\"resource\",\"resource\":{\"resourceType\":\"QuestionnaireResponse\",\"questionnaire\":{\"reference\":\"http://fhirtest.uhn.ca/baseDstu2/Questionnaire/MedsCheckEligibility\"},\"text\":{\"status\":\"generated\",\"div\":\"
    !-- populated from the rendered HTML below -->
    \"},\"status\":\"completed\",\"authored\":\"2017-02-10T00:02:58.098Z\",\"group\":{\"question\":[{\"linkId\":\"d94b4f57-1ca0-4d65-acba-8bd9a3926c8c\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has a valid Medicare or DVA entitlement card\"},{\"linkId\":\"0cbe66db-ff12-473a-940e-4672fb82de44\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has received a MedsCheck, Diabetes MedsCheck, Home Medicines Review (HMR) otr Restidential Medication Management Review (RMMR) in the past 12 months\"},{\"linkId\":\"35790cfd-2d98-4721-963e-9663e1897a17\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient is living at home in a community setting\"},{\"linkId\":\"3ccc8304-76cd-41ff-9360-2c8755590bae\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has been recently diagnosed with type 3 diabetes (in the last 12 months) AND is unable to gain timely access to existing diabetes education or health services in the community OR \"},{\"linkId\":\"b05f6f09-49ec-40f9-a889-9a3fdff9e0da\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has type 2 diabetes , is less than ideally controlled AND is unable to gain timely access to existing diabetes education or health services in their community \"},{\"linkId\":\"4a777f56-800d-4e0b-a9c3-e929832adb5b\",\"answer\":[{\"valueBoolean\":false,\"group\":[{\"linkId\":\"95bbc904-149e-427f-88a4-7f6c8ab186fa\",\"question\":[{\"linkId\":\"f0acea9e-716c-4fce-b7a2-aad59de9d136\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Patient has had an Acute or Adverse Event\"},{\"linkId\":\"e1629159-6dea-4295-a93e-e7c2829ce180\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Exacerbation of a Chronic Disease or Condition\"},{\"linkId\":\"2ce526fa-edaa-44b3-8d5a-6e97f6379ce8\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"New Diagnosis\"},{\"linkId\":\"9d6ffa9f-0110-418c-9ed0-f04910fda2ed\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Recent hospital admission (<3 months)\"},{\"linkId\":\"d2803ff7-25f7-4c7b-ab92-356c49910478\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Major change to regular medication regime\"},{\"linkId\":\"b34af32d-c69d-4d44-889f-5b6d420a7d08\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Suspected non-adherence to the patient's medication regime \"},{\"linkId\":\"74bad553-c273-41e6-8647-22b860430bc2\",\"answer\":[],\"text\":\"Other\"}]}]}],\"text\":\"The patient has experienced one or more of the following recent significant medical events\"},{\"linkId\":\"ecbf4e5a-d4d1-43eb-9f43-0c0e35fc09c7\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The Pharmacist has obtained patient consent to take part in the MedsCheck Service or Diabetes MedsCheck Service  and share information obtained during the services with other nominated members of the patients healthcare team (such as their GP, diabetes educator) if required\"},{\"linkId\":\"8ef66774-43b0-4190-873f-cfbb6e980aa9\",\"answer\":[],\"text\":\"Question\"}]}}}]}"; + String input = "{\"resourceType\":\"Parameters\",\"parameter\":[{\"name\":\"mode\",\"valueString\":\"create\"},{\"name\":\"resource\",\"resource\":{\"resourceType\":\"QuestionnaireResponse\",\"questionnaire\":{\"reference\":\"http://fhirtest.uhn.ca/baseDstu2/Questionnaire/MedsCheckEligibility\"},\"text\":{\"status\":\"generated\",\"div\":\"
    !-- populated from the rendered HTML below -->
    \"},\"status\":\"completed\",\"authored\":\"2017-02-10T00:02:58.098Z\",\"group\":{\"question\":[{\"linkId\":\"d94b4f57-1ca0-4d65-acba-8bd9a3926c8c\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has a valid Medicare or DVA entitlement card\"},{\"linkId\":\"0cbe66db-ff12-473a-940e-4672fb82de44\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has received a MedsCheck, Diabetes MedsCheck, Home Medicines Review (HMR) otr Restidential Medication Management Review (RMMR) in the past 12 months\"},{\"linkId\":\"35790cfd-2d98-4721-963e-9663e1897a17\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient is living at home in a community setting\"},{\"linkId\":\"3ccc8304-76cd-41ff-9360-2c8755590bae\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has been recently diagnosed with type 3 diabetes (in the last 12 months) AND is unable to gain timely access to existing diabetes education or health services in the community OR \"},{\"linkId\":\"b05f6f09-49ec-40f9-a889-9a3fdff9e0da\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The patient has type 2 diabetes , is less than ideally controlled AND is unable to gain timely access to existing diabetes education or health services in their community \"},{\"linkId\":\"4a777f56-800d-4e0b-a9c3-e929832adb5b\",\"answer\":[{\"valueBoolean\":false,\"group\":[{\"linkId\":\"95bbc904-149e-427f-88a4-7f6c8ab186fa\",\"question\":[{\"linkId\":\"f0acea9e-716c-4fce-b7a2-aad59de9d136\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Patient has had an Acute or Adverse Event\"},{\"linkId\":\"e1629159-6dea-4295-a93e-e7c2829ce180\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Exacerbation of a Chronic Disease or Condition\"},{\"linkId\":\"2ce526fa-edaa-44b3-8d5a-6e97f6379ce8\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"New Diagnosis\"},{\"linkId\":\"9d6ffa9f-0110-418c-9ed0-f04910fda2ed\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Recent hospital admission (<3 months)\"},{\"linkId\":\"d2803ff7-25f7-4c7b-ab92-356c49910478\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Major change to regular medication regime\"},{\"linkId\":\"b34af32d-c69d-4d44-889f-5b6d420a7d08\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"Suspected non-adherence to the patient's medication regime \"},{\"linkId\":\"74bad553-c273-41e6-8647-22b860430bc2\",\"answer\":[],\"text\":\"Other\"}]}]}],\"text\":\"The patient has experienced one or more of the following recent significant medical events\"},{\"linkId\":\"ecbf4e5a-d4d1-43eb-9f43-0c0e35fc09c7\",\"answer\":[{\"valueBoolean\":false}],\"text\":\"The Pharmacist has obtained patient consent to take part in the MedsCheck Service or Diabetes MedsCheck Service  and share information obtained during the services with other nominated members of the patients healthcare team (such as their GP, diabetes educator) if required\"},{\"linkId\":\"8ef66774-43b0-4190-873f-cfbb6e980aa9\",\"answer\":[],\"text\":\"Question\"}]}}}]}"; FhirValidator val = ourCtxDstu2.newValidator(); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2016may/hapi/validation/ResourceValidatorDstu2_1Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2016may/hapi/validation/ResourceValidatorDstu2_1Test.java index 58df21e0afb..a412f5f0112 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2016may/hapi/validation/ResourceValidatorDstu2_1Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu2016may/hapi/validation/ResourceValidatorDstu2_1Test.java @@ -11,15 +11,27 @@ import ca.uhn.fhir.validation.ValidationResult; import ca.uhn.fhir.validation.schematron.SchematronBaseValidator; import org.apache.commons.io.IOUtils; import org.hamcrest.core.StringContains; -import org.hl7.fhir.dstu2016may.model.*; +import org.hl7.fhir.dstu2016may.model.CodeableConcept; +import org.hl7.fhir.dstu2016may.model.Coding; +import org.hl7.fhir.dstu2016may.model.DateType; +import org.hl7.fhir.dstu2016may.model.OperationOutcome; +import org.hl7.fhir.dstu2016may.model.Patient; +import org.hl7.fhir.dstu2016may.model.Reference; +import org.hl7.fhir.dstu2016may.model.StringType; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.junit.AfterClass; import org.junit.Ignore; import org.junit.Test; import java.io.IOException; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class ResourceValidatorDstu2_1Test { @@ -103,7 +115,7 @@ public class ResourceValidatorDstu2_1Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(messageString); @@ -124,7 +136,7 @@ public class ResourceValidatorDstu2_1Test { String input = IOUtils.toString(getClass().getResourceAsStream("/questionnaire_jon_z_20160506.xml")); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(input); @@ -170,7 +182,7 @@ public class ResourceValidatorDstu2_1Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(messageString); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/elementmodel/PropertyDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/elementmodel/PropertyDstu3Test.java index d6464ee3af7..a3c120bb395 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/elementmodel/PropertyDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/elementmodel/PropertyDstu3Test.java @@ -3,8 +3,8 @@ package org.hl7.fhir.dstu3.elementmodel; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; import org.apache.commons.io.IOUtils; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.dstu3.model.ElementDefinition; import org.hl7.fhir.dstu3.model.StructureDefinition; import org.hl7.fhir.exceptions.DefinitionException; @@ -15,7 +15,8 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.List; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; /** * Created by axemj on 14/07/2017. @@ -32,7 +33,7 @@ public class PropertyDstu3Test { final String sdString = IOUtils.toString(getClass().getResourceAsStream("/customPatientSd.xml"), StandardCharsets.UTF_8); final IParser parser = ourCtx.newXmlParser(); sd = parser.parseResource(StructureDefinition.class, sdString); - workerContext = new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport()); + workerContext = new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport(ourCtx)); } @Test diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/DefaultProfileValidationSupportTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/DefaultProfileValidationSupportTest.java index 378c1095459..e0ef7011fa4 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/DefaultProfileValidationSupportTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/DefaultProfileValidationSupportTest.java @@ -1,28 +1,28 @@ package org.hl7.fhir.dstu3.hapi.validation; -import static org.junit.Assert.*; - -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.junit.AfterClass; -import org.junit.Test; - import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.junit.AfterClass; +import org.junit.Test; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; public class DefaultProfileValidationSupportTest { - private DefaultProfileValidationSupport mySvc = new DefaultProfileValidationSupport(); + private DefaultProfileValidationSupport mySvc = new DefaultProfileValidationSupport(ourCtx); private static FhirContext ourCtx = FhirContext.forDstu3(); @Test public void testGetStructureDefinitionsWithRelativeUrls() { - assertNotNull(mySvc.fetchStructureDefinition(ourCtx, "http://hl7.org/fhir/StructureDefinition/Extension")); - assertNotNull(mySvc.fetchStructureDefinition(ourCtx, "StructureDefinition/Extension")); - assertNotNull(mySvc.fetchStructureDefinition(ourCtx, "Extension")); + assertNotNull(mySvc.fetchStructureDefinition("http://hl7.org/fhir/StructureDefinition/Extension")); + assertNotNull(mySvc.fetchStructureDefinition("StructureDefinition/Extension")); + assertNotNull(mySvc.fetchStructureDefinition("Extension")); - assertNull(mySvc.fetchStructureDefinition(ourCtx, "http://hl7.org/fhir/StructureDefinition/Extension2")); - assertNull(mySvc.fetchStructureDefinition(ourCtx, "StructureDefinition/Extension2")); - assertNull(mySvc.fetchStructureDefinition(ourCtx, "Extension2")); + assertNull(mySvc.fetchStructureDefinition("http://hl7.org/fhir/StructureDefinition/Extension2")); + assertNull(mySvc.fetchStructureDefinition("StructureDefinition/Extension2")); + assertNull(mySvc.fetchStructureDefinition("Extension2")); } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index bace1c7268e..212f78b1418 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -1,7 +1,9 @@ package org.hl7.fhir.dstu3.hapi.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.ConceptValidationOptions; +import ca.uhn.fhir.context.support.IValidationSupport; +import ca.uhn.fhir.context.support.ValueSetExpansionOptions; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; @@ -9,9 +11,11 @@ import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; +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.ValidationSupportChain; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; @@ -20,11 +24,17 @@ import org.hl7.fhir.dstu3.model.Observation.ObservationStatus; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType; import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind; -import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.dstu3.utils.FHIRPathEngine; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.junit.*; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.r5.utils.IResourceValidator; +import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.TestRule; import org.junit.rules.TestWatcher; import org.junit.runner.Description; @@ -34,21 +44,39 @@ import org.mockito.stubbing.Answer; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.TreeSet; import java.util.zip.GZIPInputStream; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Matchers.any; +import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class FhirInstanceValidatorDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidatorDstu3Test.class); - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forDstu3(); + private static IValidationSupport myDefaultValidationSupport = ourCtx.getValidationSupport(); @Rule public TestRule watcher = new TestWatcher() { @Override @@ -57,7 +85,6 @@ public class FhirInstanceValidatorDstu3Test { } }; private FhirInstanceValidator myInstanceVal; - private IValidationSupport myMockSupport; private Map mySupportedCodeSystemsForExpansion; private FhirValidator myVal; private ArrayList myValidConcepts; @@ -66,6 +93,7 @@ public class FhirInstanceValidatorDstu3Test { private HashMap myCodeSystems; private HashMap myValueSets; private HashMap myQuestionnaires; + private CachingValidationSupport myValidationSupport; private void addValidConcept(String theSystem, String theCode) { myValidSystems.add(theSystem); @@ -79,9 +107,14 @@ public class FhirInstanceValidatorDstu3Test { myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - myMockSupport = mock(IValidationSupport.class); - CachingValidationSupport validationSupport = new CachingValidationSupport(new ValidationSupportChain(myMockSupport, myDefaultValidationSupport)); - myInstanceVal = new FhirInstanceValidator(validationSupport); + IValidationSupport mockSupport = mock(IValidationSupport.class); + when(mockSupport.getFhirContext()).thenReturn(ourCtx); + myValidationSupport = new CachingValidationSupport(new ValidationSupportChain( + mockSupport, + myDefaultValidationSupport, + new InMemoryTerminologyServerValidationSupport(ourCtx), + new CommonCodeSystemsTerminologyService(ourCtx))); + myInstanceVal = new FhirInstanceValidator(myValidationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -89,36 +122,37 @@ public class FhirInstanceValidatorDstu3Test { myValidConcepts = new ArrayList<>(); - when(myMockSupport.expandValueSet(any(FhirContext.class), nullable(ConceptSetComponent.class))).thenAnswer(new Answer() { + when(mockSupport.expandValueSet(any(), nullable(ValueSetExpansionOptions.class), nullable(IBaseResource.class))).thenAnswer(new Answer() { @Override public ValueSetExpansionComponent answer(InvocationOnMock theInvocation) { - ConceptSetComponent arg = (ConceptSetComponent) theInvocation.getArguments()[0]; - ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getSystem()); + ValueSet arg = (ValueSet) theInvocation.getArgument(0, IBaseResource.class); + ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem()); if (retVal == null) { - retVal = myDefaultValidationSupport.expandValueSet(nullable(FhirContext.class), arg); + ValueSet expandedVs = (ValueSet) myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg).getValueSet(); + retVal = expandedVs.getExpansion(); } - ourLog.debug("expandValueSet({}) : {}", new Object[] {theInvocation.getArguments()[0], retVal}); + ourLog.debug("expandValueSet({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal}); return retVal; } }); - when(myMockSupport.isCodeSystemSupported(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer() { @Override public Boolean answer(InvocationOnMock theInvocation) { String url = (String) theInvocation.getArguments()[1]; boolean retVal = myValidSystems.contains(url); - ourLog.debug("isCodeSystemSupported({}) : {}", new Object[] {url, retVal}); + ourLog.debug("isCodeSystemSupported({}) : {}", new Object[]{url, retVal}); if (retVal == false) { retVal = myCodeSystems.containsKey(url); } return retVal; } }); - when(myMockSupport.fetchResource(nullable(FhirContext.class), nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchResource(nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { @Override public IBaseResource answer(InvocationOnMock theInvocation) throws Throwable { IBaseResource retVal = null; - Class type = (Class) theInvocation.getArguments()[1]; - String id = (String) theInvocation.getArguments()[2]; + Class type = (Class) theInvocation.getArguments()[0]; + String id = (String) theInvocation.getArguments()[1]; if ("Questionnaire/q_jon".equals(id)) { retVal = ourCtx.newJsonParser().parseResource(IOUtils.toString(FhirInstanceValidatorDstu3Test.class.getResourceAsStream("/q_jon.json"), Charsets.UTF_8)); } else { @@ -137,7 +171,7 @@ public class FhirInstanceValidatorDstu3Test { } if (retVal == null) { - retVal = myDefaultValidationSupport.fetchResource((FhirContext) theInvocation.getArguments()[0], (Class) theInvocation.getArguments()[1], id); + retVal = myDefaultValidationSupport.fetchResource((Class) theInvocation.getArguments()[0], id); } } if (retVal == null) { @@ -146,38 +180,40 @@ public class FhirInstanceValidatorDstu3Test { return retVal; } }); - when(myMockSupport.validateCode(nullable(FhirContext.class), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.validateCode(any(), any(), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { @Override - public IContextValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { - FhirContext ctx = theInvocation.getArgument(0, FhirContext.class); - String system = theInvocation.getArgument(1, String.class); - String code = theInvocation.getArgument(2, String.class); - String display = theInvocation.getArgument(3, String.class); - String valueSetUrl = theInvocation.getArgument(4, String.class); - IContextValidationSupport.CodeValidationResult retVal; + public IValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { + ConceptValidationOptions options = theInvocation.getArgument(1, ConceptValidationOptions.class); + String system = theInvocation.getArgument(2, String.class); + String code = theInvocation.getArgument(3, String.class); + String display = theInvocation.getArgument(4, String.class); + String valueSetUrl = theInvocation.getArgument(5, String.class); + IValidationSupport.CodeValidationResult retVal; if (myValidConcepts.contains(system + "___" + code)) { - retVal = new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(code))); + retVal = new IValidationSupport.CodeValidationResult().setCode(code); + } else if (myValidSystems.contains(system)) { + return new IValidationSupport.CodeValidationResult().setSeverityCode(ValidationMessage.IssueSeverity.WARNING.toCode()).setMessage("Unknown code: " + system + " / " + code); } else if (myCodeSystems.containsKey(system)) { CodeSystem cs = myCodeSystems.get(system); Optional found = cs.getConcept().stream().filter(t -> t.getCode().equals(code)).findFirst(); - retVal = found.map(t->new IContextValidationSupport.CodeValidationResult(t)).orElse(null); + retVal = found.map(t -> new IValidationSupport.CodeValidationResult().setCode(t.getCode())).orElse(null); } else { - retVal = myDefaultValidationSupport.validateCode(ctx, system, code, display, valueSetUrl); + retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl); } ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal); return retVal; } }); - when(myMockSupport.fetchCodeSystem(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchCodeSystem(nullable(String.class))).thenAnswer(new Answer() { @Override public CodeSystem answer(InvocationOnMock theInvocation) { CodeSystem retVal; - String id = (String) theInvocation.getArguments()[1]; + String id = (String) theInvocation.getArguments()[0]; retVal = myCodeSystems.get(id); if (retVal == null) { - retVal = myDefaultValidationSupport.fetchCodeSystem((FhirContext) theInvocation.getArguments()[0], id); + retVal = (CodeSystem) myDefaultValidationSupport.fetchCodeSystem(id); } if (retVal == null) { @@ -190,23 +226,23 @@ public class FhirInstanceValidatorDstu3Test { myValueSets = new HashMap<>(); myCodeSystems = new HashMap<>(); myQuestionnaires = new HashMap<>(); - when(myMockSupport.fetchStructureDefinition(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchStructureDefinition(nullable(String.class))).thenAnswer(new Answer() { @Override public StructureDefinition answer(InvocationOnMock theInvocation) { String url = (String) theInvocation.getArguments()[1]; StructureDefinition retVal = myStructureDefinitions.get(url); if (retVal == null) { - retVal = myDefaultValidationSupport.fetchStructureDefinition((FhirContext) theInvocation.getArguments()[0], url); + retVal = (StructureDefinition) myDefaultValidationSupport.fetchStructureDefinition(url); } - ourLog.info("fetchStructureDefinition({}) : {}", new Object[] {url, retVal}); + ourLog.info("fetchStructureDefinition({}) : {}", new Object[]{url, retVal}); return retVal; } }); - when(myMockSupport.fetchAllStructureDefinitions(nullable(FhirContext.class))).thenAnswer(new Answer>() { + when(mockSupport.fetchAllStructureDefinitions()).thenAnswer(new Answer>() { @Override public List answer(InvocationOnMock theInvocation) { - List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions((FhirContext) theInvocation.getArguments()[0]); - ourLog.debug("fetchAllStructureDefinitions()", new Object[] {}); + List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions(); + ourLog.debug("fetchAllStructureDefinitions()", new Object[]{}); return retVal; } }); @@ -241,7 +277,7 @@ public class FhirInstanceValidatorDstu3Test { } private List logResultsAndReturnNonInformationalOnes(ValidationResult theOutput) { - List retVal = new ArrayList(); + List retVal = new ArrayList<>(); int index = 0; for (SingleValidationMessage next : theOutput.getMessages()) { @@ -273,7 +309,7 @@ public class FhirInstanceValidatorDstu3Test { procedure.setPerformed(period); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(procedure); @@ -320,7 +356,7 @@ public class FhirInstanceValidatorDstu3Test { myCodeSystems.put(csBinderRecommended.getUrl(), csBinderRecommended); ValueSet vsBinderRequired = loadResource("/dstu3/fmc01-vs-binderrecommended.json", ValueSet.class); myValueSets.put(vsBinderRequired.getUrl(), vsBinderRequired); - myValueSets.put("ValueSet/" +vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); + myValueSets.put("ValueSet/" + vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); ValueSet vsYesNo = loadResource("/dstu3/fmc01-vs-yesnounk.json", ValueSet.class); myValueSets.put(vsYesNo.getUrl(), vsYesNo); myValueSets.put("ValueSet/" + vsYesNo.getIdElement().getIdPart(), vsYesNo); @@ -343,7 +379,7 @@ public class FhirInstanceValidatorDstu3Test { ValueSet vsBinderRequired = loadResource("/dstu3/fmc03-vs-binderrecommend.json", ValueSet.class); myValueSets.put(vsBinderRequired.getUrl(), vsBinderRequired); - myValueSets.put("ValueSet/" +vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); + myValueSets.put("ValueSet/" + vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); ValueSet vsYesNo = loadResource("/dstu3/fmc03-vs-fmcyesno.json", ValueSet.class); myValueSets.put(vsYesNo.getUrl(), vsYesNo); myValueSets.put("ValueSet/" + vsYesNo.getIdElement().getIdPart(), vsYesNo); @@ -365,7 +401,7 @@ public class FhirInstanceValidatorDstu3Test { myCodeSystems.put(csBinderRecommended.getUrl(), csBinderRecommended); ValueSet vsBinderRequired = loadResource("/dstu3/fmc02-vs-binderrecomm.json", ValueSet.class); myValueSets.put(vsBinderRequired.getUrl(), vsBinderRequired); - myValueSets.put("ValueSet/" +vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); + myValueSets.put("ValueSet/" + vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); ValueSet vsYesNo = loadResource("/dstu3/fmc01-vs-yesnounk.json", ValueSet.class); myValueSets.put(vsYesNo.getUrl(), vsYesNo); myValueSets.put("ValueSet/" + vsYesNo.getIdElement().getIdPart(), vsYesNo); @@ -375,7 +411,7 @@ public class FhirInstanceValidatorDstu3Test { QuestionnaireResponse qr = loadResource("/dstu3/fmc02-questionnaireresponse-01.json", QuestionnaireResponse.class); ValidationResult result = myVal.validateWithResult(qr); List errors = logResultsAndReturnNonInformationalOnes(result); - assertThat(errors.get(0).getMessage(), containsString("Item has answer, even though it is not enabled (item id = 'BO_ConsDrop')")); + assertThat(errors.get(0).getMessage(), containsString("Item has answer, even though it is not enabled (item id = \"BO_ConsDrop\")")); assertEquals(1, errors.size()); } @@ -387,7 +423,7 @@ public class FhirInstanceValidatorDstu3Test { myCodeSystems.put(csBinderRecommended.getUrl(), csBinderRecommended); ValueSet vsBinderRequired = loadResource("/dstu3/fmc02-vs-binderrecomm.json", ValueSet.class); myValueSets.put(vsBinderRequired.getUrl(), vsBinderRequired); - myValueSets.put("ValueSet/" +vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); + myValueSets.put("ValueSet/" + vsBinderRequired.getIdElement().getIdPart(), vsBinderRequired); ValueSet vsYesNo = loadResource("/dstu3/fmc01-vs-yesnounk.json", ValueSet.class); myValueSets.put(vsYesNo.getUrl(), vsYesNo); myValueSets.put("ValueSet/" + vsYesNo.getIdElement().getIdPart(), vsYesNo); @@ -607,8 +643,9 @@ public class FhirInstanceValidatorDstu3Test { ValidationResult results = myVal.validateWithResult(is); List outcome = logResultsAndReturnNonInformationalOnes(results); - assertEquals(2, outcome.size()); - assertEquals("Unknown code: http://dicom.nema.org/resources/ontology/DCM / BAR", outcome.get(0).getMessage()); + assertEquals(1, outcome.size()); + assertEquals("Unknown code 'http://dicom.nema.org/resources/ontology/DCM#BAR' for \"http://dicom.nema.org/resources/ontology/DCM#BAR\"", outcome.get(0).getMessage()); +// assertEquals("The Coding provided is not in the value set http://hl7.org/fhir/ValueSet/dicom-cid29, and a code should come from this value set unless it has no suitable code. (error message = Unknown code[BAR] in system[http://dicom.nema.org/resources/ontology/DCM])", outcome.get(1).getMessage()); } @@ -826,31 +863,6 @@ public class FhirInstanceValidatorDstu3Test { assertEquals(output.toString(), 0, res.size()); } - @Test - public void testValidateRawXmlWithMissingRootNamespace() { - //@formatter:off - String input = "" - + "" - + " " - + " " - + "
    Some narrative
    " - + "
    " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + "
    "; - //@formatter:on - - ValidationResult output = myVal.validateWithResult(input); - assertEquals(output.toString(), 1, output.getMessages().size()); - assertEquals("This 'Patient' cannot be parsed as a FHIR object (no namespace)", output.getMessages().get(0).getMessage()); - ourLog.info(output.getMessages().get(0).getLocationString()); - } - /** * A reference with only an identifier should be valid */ @@ -932,7 +944,7 @@ public class FhirInstanceValidatorDstu3Test { input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnAll(output); @@ -952,7 +964,7 @@ public class FhirInstanceValidatorDstu3Test { input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); @@ -972,10 +984,10 @@ public class FhirInstanceValidatorDstu3Test { input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); input.setStatus(ObservationStatus.FINAL); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); - assertThat(errors.toString(), containsString("StructureDefinition reference \"http://foo/structuredefinition/myprofile\" could not be resolved")); + assertThat(errors.toString(), containsString("Profile reference \"http://foo/structuredefinition/myprofile\" could not be resolved, so has not been checked")); } @Test @@ -1007,7 +1019,7 @@ public class FhirInstanceValidatorDstu3Test { @Test public void testValidateResourceWithDefaultValuesetBadCode() { - //@formatter:off + String input = "\n" + " \n" + @@ -1015,11 +1027,11 @@ public class FhirInstanceValidatorDstu3Test { " \n" + " \n" + ""; - //@formatter:on + ValidationResult output = myVal.validateWithResult(input); logResultsAndReturnAll(output); assertEquals( - "The value provided ('notvalidcode') is not in the value set http://hl7.org/fhir/ValueSet/observation-status (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code[notvalidcode] in system[(none)])", + "The value provided (\"notvalidcode\") is not in the value set http://hl7.org/fhir/ValueSet/observation-status (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code 'notvalidcode')", output.getMessages().get(0).getMessage()); } @@ -1027,7 +1039,7 @@ public class FhirInstanceValidatorDstu3Test { public void testValidateResourceWithExampleBindingCodeValidationFailing() { Observation input = new Observation(); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); @@ -1042,7 +1054,7 @@ public class FhirInstanceValidatorDstu3Test { public void testValidateResourceWithExampleBindingCodeValidationFailingNonLoinc() { Observation input = new Observation(); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1059,7 +1071,7 @@ public class FhirInstanceValidatorDstu3Test { public void testValidateResourceWithExampleBindingCodeValidationPassingLoinc() { Observation input = new Observation(); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1078,7 +1090,7 @@ public class FhirInstanceValidatorDstu3Test { expansionComponent.addContains().setSystem("http://loinc.org").setCode("12345").setDisplay("Some display code"); mySupportedCodeSystemsForExpansion.put("http://loinc.org", expansionComponent); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1094,7 +1106,7 @@ public class FhirInstanceValidatorDstu3Test { public void testValidateResourceWithExampleBindingCodeValidationPassingNonLoinc() { Observation input = new Observation(); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1145,6 +1157,20 @@ public class FhirInstanceValidatorDstu3Test { ourLog.info(output.getMessages().get(0).getMessage()); } + @Test + public void testInvocationOfValidatorFetcher() throws IOException { + String input = IOUtils.toString(FhirInstanceValidatorDstu3Test.class.getResourceAsStream("/dstu3-rick-test.json"), Charsets.UTF_8); + + IResourceValidator.IValidatorResourceFetcher resourceFetcher = mock(IResourceValidator.IValidatorResourceFetcher.class); + when(resourceFetcher.validationPolicy(any(), anyString(), anyString())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); + myInstanceVal.setValidatorResourceFetcher(resourceFetcher); + myVal.validateWithResult(input); + + verify(resourceFetcher, times(3)).resolveURL(any(), anyString(), anyString()); + verify(resourceFetcher, times(4)).validationPolicy(any(), anyString(), anyString()); + verify(resourceFetcher, times(4)).fetch(any(), anyString()); + } + @Test public void testValueWithWhitespace() throws IOException { String input = IOUtils.toString(FhirInstanceValidatorDstu3Test.class.getResourceAsStream("/dstu3-rick-test.json"), Charsets.UTF_8); @@ -1158,8 +1184,8 @@ public class FhirInstanceValidatorDstu3Test { @AfterClass public static void afterClassClearContext() { - myDefaultValidationSupport.flush(); myDefaultValidationSupport = null; + ourCtx = null; TestUtil.clearAllStaticFieldsForUnitTest(); } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireResponseValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireResponseValidatorDstu3Test.java index d4bbfac740e..cff953a5bdc 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireResponseValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireResponseValidatorDstu3Test.java @@ -1,7 +1,8 @@ package org.hl7.fhir.dstu3.hapi.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; @@ -9,11 +10,11 @@ import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; import org.hamcrest.Matchers; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +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.ValidationSupportChain; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent; @@ -22,6 +23,7 @@ import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemA import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.utilities.validation.ValidationMessage; import org.junit.AfterClass; import org.junit.Before; @@ -33,14 +35,22 @@ import java.util.Collections; import java.util.Date; import java.util.List; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; import static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.BOOLEAN; import static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.CHOICE; import static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.nullable; +import static org.mockito.Mockito.reset; +import static org.mockito.Mockito.when; public class QuestionnaireResponseValidatorDstu3Test { private static final String QUESTIONNAIRE_URL = "http://example.com/Questionnaire/q1"; @@ -49,26 +59,22 @@ public class QuestionnaireResponseValidatorDstu3Test { private static final String CODE_ICC_SCHOOLTYPE_PT = "PT"; private static final IdType ID_VS_SCHOOLTYPE = new IdType("ValueSet/schooltype"); private static final String SYSTEMURI_ICC_SCHOOLTYPE = "http://ehealthinnovation/icc/ns/schooltype"; - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); - private static FhirContext ourCtx; + private static FhirContext ourCtx = FhirContext.forDstu3(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); private FhirInstanceValidator myInstanceVal; private FhirValidator myVal; private IValidationSupport myValSupport; - - @BeforeClass - public static void beforeClass() { - ourCtx = FhirContext.forDstu3(); - } - + @Before public void before() { myValSupport = mock(IValidationSupport.class); + when(myValSupport.getFhirContext()).thenReturn(ourCtx); myVal = ourCtx.newValidator(); myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport); + ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport, new InMemoryTerminologyServerValidationSupport(ourCtx), new CommonCodeSystemsTerminologyService(ourCtx)); myInstanceVal = new FhirInstanceValidator(validationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -135,18 +141,19 @@ public class QuestionnaireResponseValidatorDstu3Test { answerValues[15] = new Quantity(42); for (int i = 0; i < itemCnt; i++) { + before(); + if (questionnaireItemTypes[i] == null) continue; String linkId = "link" + i; reset(myValSupport); Questionnaire q = new Questionnaire(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(QUESTIONNAIRE_URL))).thenReturn(q); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - myInstanceVal.flushCaches(); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); q.getItem().clear(); QuestionnaireItemComponent questionnaireItemComponent = @@ -179,7 +186,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); @@ -193,34 +200,36 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setOptions(new Reference("http://somevalueset")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(QUESTIONNAIRE_URL))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(QUESTIONNAIRE_URL))).thenReturn(q); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system"))).thenReturn(true); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system2"))).thenReturn(true); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverityCode(ValidationMessage.IssueSeverity.ERROR.toCode()).setMessage("Unknown code")); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode(CODE_ICC_SCHOOLTYPE_PT))); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(CODE_ICC_SCHOOLTYPE_PT)); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverityCode("warning").setMessage("Unknown code: http://codesystems.com/system / code1")); QuestionnaireResponse qa; @@ -248,6 +257,8 @@ public class QuestionnaireResponseValidatorDstu3Test { assertThat(errors.toString(), containsString("Unknown code: http://codesystems.com/system / code1 - QuestionnaireResponse.item[0].answer[0].value.ofType(Coding)")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); + // Unhandled system + qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(questionnaireRef); @@ -255,7 +266,7 @@ public class QuestionnaireResponseValidatorDstu3Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code: http://codesystems.com/system2 / code3")); + assertThat(errors.toString(), containsString("Unknown code 'http://codesystems.com/system2#code3'")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); } @@ -272,47 +283,47 @@ public class QuestionnaireResponseValidatorDstu3Test { QuestionnaireResponseItemComponent qaGroup = qa.addItem(); qaGroup.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("Element 'QuestionnaireResponse.item[0].linkId': minimum required = 1, but only found 0")); } - + @Test public void testMissingAnswerInNestedStructureIsReported() { Questionnaire q = new Questionnaire(); q.addItem().setType(QuestionnaireItemType.GROUP).setRequired(true) - .addItem().setType(QuestionnaireItemType.GROUP).setRequired(true) - .addItem().setType(QuestionnaireItemType.BOOLEAN).setLinkId("link0").setRequired(true); - + .addItem().setType(QuestionnaireItemType.GROUP).setRequired(true) + .addItem().setType(QuestionnaireItemType.BOOLEAN).setLinkId("link0").setRequired(true); + QuestionnaireResponse qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); - - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); - + + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qa); - + assertThat(errors.toString(), Matchers.not(containsString("No issues"))); } - + @Test public void testGroupMarkedAsRequiredIsOk() { Questionnaire q = new Questionnaire(); q.addItem().setType(QuestionnaireItemType.GROUP).setRequired(true).setLinkId("group") - .addItem().setType(QuestionnaireItemType.BOOLEAN).setLinkId("child").setRequired(true); - + .addItem().setType(QuestionnaireItemType.BOOLEAN).setLinkId("child").setRequired(true); + QuestionnaireResponse qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); qa.addItem().setLinkId("group") - .addItem().setLinkId("child").addAnswer().setValue(new BooleanType(true)); - - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); - + .addItem().setLinkId("child").addAnswer().setValue(new BooleanType(true)); + + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qa); - + assertThat(errors.toString(), containsString("No issues")); } @@ -328,7 +339,7 @@ public class QuestionnaireResponseValidatorDstu3Test { QuestionnaireResponseItemComponent qaItem = qa.addItem().setLinkId("link0"); qaItem.addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -349,62 +360,62 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No response found for required item with id = 'link0'")); } - + @Test public void testEnableWhenWithHasAnswerTrueDisablesQuestionWhenNoAnswerIsPresent() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING); q.addItem().setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING).addEnableWhen().setQuestion("link0").setHasAnswer(true); - + QuestionnaireResponse qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testRequiredQuestionQuantityWithEnableWhenHidesQuestionHasAnswerTrue() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.QUANTITY); - + // create the questionnaire QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING).addEnableWhen().setQuestion("link0").setHasAnswer(true); q.addItem(item1); - + QuestionnaireResponse qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); - + String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testRequiredQuestionWithEnableWhenHidesQuestion() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING); - + // create the questionnaire QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setType(QuestionnaireItemType.STRING).setRequired(true); @@ -420,19 +431,19 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testRequiredQuestionQuantityWithEnableWhenHidesQuestionValue() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.QUANTITY); - + //link1 question is enabled when link0 has answer QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING); @@ -448,18 +459,18 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.addItem().setLinkId("link0").addAnswer().setValue(new Quantity().setValue(1L)); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testRequiredQuestionQuantityWithEnableWhenEnablesQuestionValue() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.QUANTITY); - + //link1 question is enabled when link0 has answer QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setType(QuestionnaireItemType.STRING).setRequired(true); @@ -475,7 +486,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.addItem().setLinkId("link0").addAnswer().setValue(new Quantity().setValue(1L)); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -500,7 +511,7 @@ public class QuestionnaireResponseValidatorDstu3Test { .setQuestion("link0") .setAnswer(new Coding("http://foo", "YES", null)); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(QUESTIONNAIRE_URL))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(QUESTIONNAIRE_URL))).thenReturn(q); QuestionnaireResponse qa; ValidationResult errors; @@ -521,7 +532,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("HELLO")); errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Item has answer, even though it is not enabled (item id = 'link1')")); + assertThat(errors.toString(), containsString("Item has answer, even though it is not enabled (item id = \"link1\")")); // link0 has an answer, and it's the right one qa = new QuestionnaireResponse(); @@ -538,7 +549,7 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.STRING); - + // create the questionnaire QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING); @@ -555,20 +566,19 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("BAR")); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - - + @Test public void testRequiredQuestionWithEnableWheHidesRequiredQuestionnHasAnswerFalse() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING); - + // create the questionnaire QuestionnaireItemComponent item1 = new QuestionnaireItemComponent(); item1.setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING); @@ -581,58 +591,58 @@ public class QuestionnaireResponseValidatorDstu3Test { QuestionnaireResponse qa = new QuestionnaireResponse(); qa.setStatus(QuestionnaireResponseStatus.COMPLETED); qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); - + // link1 should be disabled, because the enableWhen enables it when link0 doesn't haven an answer qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); String reference = qa.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testGivenQuestionIsNotEnabledWithEnableWhenAnswersAreReportedAsErrors() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING); q.addItem().setLinkId("link2").setRequired(false).setType(QuestionnaireItemType.STRING).addEnableWhen().setQuestion("link0").setHasAnswer(true); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(QuestionnaireResponseStatus.COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); - + qr.addItem().setLinkId("link2").addAnswer().setValue(new StringType("FOO")); - + String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); - + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qr); - + assertThat(errors.toString(), Matchers.not(containsString("No issues"))); } - + @Test public void testGivenQuestionIsNotEnabledWithEnableWhenButHasItemsWithoutAnswersAreOk() { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING); q.addItem().setLinkId("link2").setRequired(false).setType(QuestionnaireItemType.STRING).addEnableWhen().setQuestion("link0").setHasAnswer(true); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(QuestionnaireResponseStatus.COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); - + qr.addItem().setLinkId("link2"); - + String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); - + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qr); - + assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testGivenQuestionIsNotEnabledWithEnableWhenButHasItemsWithoutAnswersAreOk2() { Questionnaire q = new Questionnaire(); @@ -644,7 +654,7 @@ public class QuestionnaireResponseValidatorDstu3Test { .setRequired(true) .setType(QuestionnaireItemType.STRING) .addEnableWhen().setQuestion("link1").setHasAnswer(true); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(QuestionnaireResponseStatus.COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); @@ -653,9 +663,9 @@ public class QuestionnaireResponseValidatorDstu3Test { qr.addItem().setLinkId("link1").addAnswer().setValue(new StringType("Answer")); qr.addItem().setLinkId("link2"); - + String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); // Without an answer ValidationResult errors = myVal.validateWithResult(qr); @@ -666,28 +676,28 @@ public class QuestionnaireResponseValidatorDstu3Test { errors = myVal.validateWithResult(qr); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testGivenQuestionnaireResponseHasSiblingItemsWhenTheyShouldBeChildItems() { Questionnaire q = new Questionnaire(); QuestionnaireItemComponent item = q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.GROUP); item.addItem().setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.STRING); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(QuestionnaireResponseStatus.COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); qr.addItem().setLinkId("link0").setText("Text"); qr.addItem().setLinkId("link1").addAnswer().setValue(new StringType("Answer")); String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); - + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qr); assertThat(errors.toString(), Matchers.not(containsString("No issues"))); assertTrue("Must contain structural error about misplaced link1 item", - errors.getMessages().stream().filter(vm -> vm.getMessage().contains("Structural Error")) - .anyMatch(vm -> vm.getMessage().contains("link1"))); + errors.getMessages().stream().filter(vm -> vm.getMessage().contains("Structural Error")) + .anyMatch(vm -> vm.getMessage().contains("link1"))); } - + @Test public void testAnswerIsValueCodingWithExtensionInside() { Questionnaire q = new Questionnaire(); @@ -695,7 +705,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qcoding.setCode("1293"); q.addItem().setLinkId("1B").setRequired(true).setType(CHOICE).addOption().setValue(qcoding); q.addItem().setLinkId("2B").setType(BOOLEAN).addEnableWhen().setQuestion("1B").setAnswer(qcoding); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); @@ -704,17 +714,17 @@ public class QuestionnaireResponseValidatorDstu3Test { coding.setCode("1293"); QuestionnaireResponseItemAnswerComponent answer = qrItem.addAnswer(); answer.setValue(coding); - coding.addExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", new BooleanType(true)); + coding.addExtension("http://hl7.org/fhir/StructureDefinition/iso21090-CO-value", new DecimalType("1.0")); qr.addItem().setLinkId("2B").addAnswer().setValue(new BooleanType(true)); - + String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); - + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qr); assertThat(errors.toString(), containsString("No issues")); - + } - + @Test public void testChoiceItemsEnableWhenHasNoSystemYetAnswerHasSystem() { Questionnaire q = new Questionnaire(); @@ -725,7 +735,7 @@ public class QuestionnaireResponseValidatorDstu3Test { Coding enablewhenCoding = new Coding(); enablewhenCoding.setCode("male"); q.addItem().setLinkId("2B").setType(BOOLEAN).addEnableWhen().setQuestion("1B").setAnswer(enablewhenCoding); - + QuestionnaireResponse qr = new QuestionnaireResponse(); qr.setStatus(COMPLETED); qr.getQuestionnaire().setReference(QUESTIONNAIRE_URL); @@ -736,14 +746,14 @@ public class QuestionnaireResponseValidatorDstu3Test { QuestionnaireResponseItemAnswerComponent answer = qrItem.addAnswer(); answer.setValue(coding); qr.addItem().setLinkId("2B").addAnswer().setValue(new BooleanType(true)); - + String reference = qr.getQuestionnaire().getReference(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); - + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); + ValidationResult errors = myVal.validateWithResult(qr); assertThat(errors.toString(), containsString("No issues")); } - + @Test public void testEmbeddedItemInChoice() { String questionnaireRef = QUESTIONNAIRE_URL; @@ -762,22 +772,21 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) - .thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))).thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -818,22 +827,22 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))) .thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -870,7 +879,7 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); @@ -883,7 +892,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.getQuestionnaire().setReference(questionnaireRef); qa.addItem().setLinkId("link1") .addAnswer() - .addItem().setLinkId("link11"); + .addItem().setLinkId("link11"); String rXml = xmlParser.encodeResourceToString(qa); ourLog.info(rXml); @@ -944,10 +953,10 @@ public class QuestionnaireResponseValidatorDstu3Test { .addAnswer() .setValue(new Coding(SYSTEMURI_ICC_SCHOOLTYPE, CODE_ICC_SCHOOLTYPE_PT, "")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireResponse.getQuestionnaire().getReference()))).thenReturn(questionnaire); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE.getValue()))).thenReturn(iccSchoolTypeVs); - when(myValSupport.validateCodeInValueSet(any(), eq(SYSTEMURI_ICC_SCHOOLTYPE), eq(CODE_ICC_SCHOOLTYPE_PT), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode(CODE_ICC_SCHOOLTYPE_PT))); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireResponse.getQuestionnaire().getReference()))).thenReturn(questionnaire); + when(myValSupport.fetchResource(eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE.getValue()))).thenReturn(iccSchoolTypeVs); + when(myValSupport.validateCodeInValueSet(any(), any(), eq(SYSTEMURI_ICC_SCHOOLTYPE), eq(CODE_ICC_SCHOOLTYPE_PT), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(CODE_ICC_SCHOOLTYPE_PT)); ValidationResult errors = myVal.validateWithResult(questionnaireResponse); @@ -963,7 +972,7 @@ public class QuestionnaireResponseValidatorDstu3Test { .setRequired(true); String reference = QUESTIONNAIRE_URL; - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))) .thenReturn(q); QuestionnaireResponse qa = new QuestionnaireResponse(); @@ -991,34 +1000,34 @@ public class QuestionnaireResponseValidatorDstu3Test { Questionnaire q = new Questionnaire(); QuestionnaireItemComponent item = q.addItem(); item.setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.OPENCHOICE).setOptions(new Reference("http://somevalueset")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system"))).thenReturn(true); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system2"))).thenReturn(true); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverityCode(ValidationMessage.IssueSeverity.ERROR.toCode()).setMessage("Unknown code")); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.setUrl("http://somevalueset"); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCodeInValueSet(any(FhirContext.class), eq("http://codesystems.com/system"), eq("code0"), any(), any(IBaseResource.class))).thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType("code0")))); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), any(IBaseResource.class))).thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); QuestionnaireResponse qa; ValidationResult errors; @@ -1042,7 +1051,7 @@ public class QuestionnaireResponseValidatorDstu3Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code for 'http://codesystems.com/system#code1' - QuestionnaireResponse.item[0].answer[0].value.ofType(Coding)")); + assertThat(errors.toString(), containsString("Unknown code for \"http://codesystems.com/system#code1\"")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); // Partial code @@ -1118,7 +1127,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -1136,7 +1145,7 @@ public class QuestionnaireResponseValidatorDstu3Test { qa.getQuestionnaire().setReference(QUESTIONNAIRE_URL); qa.addItem().setLinkId("link1").addItem().setLinkId("link2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -1144,6 +1153,11 @@ public class QuestionnaireResponseValidatorDstu3Test { assertThat(errors.toString(), containsString("LinkId \"link1\" not found in questionnaire")); } + @BeforeClass + public static void beforeClass() { + ourCtx = FhirContext.forDstu3(); + } + @AfterClass public static void afterClassClearContext() { myDefaultValidationSupport.flush(); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireValidatorDstu3Test.java index 4a8ececb99a..825b8963fc2 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/QuestionnaireValidatorDstu3Test.java @@ -1,18 +1,21 @@ package org.hl7.fhir.dstu3.hapi.validation; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.ValidationResult; import org.hamcrest.Matchers; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.dstu3.model.CodeableConcept; import org.hl7.fhir.dstu3.model.Coding; import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus; import org.hl7.fhir.dstu3.model.Questionnaire; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; @@ -20,28 +23,33 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Collections; +import java.util.stream.Collectors; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; public class QuestionnaireValidatorDstu3Test { private static final Logger ourLog = LoggerFactory.getLogger(QuestionnaireValidatorDstu3Test.class); - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forDstu3(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); private FhirInstanceValidator myInstanceVal; private FhirValidator myVal; @Before public void before() { + + IValidationSupport myValSupport = mock(IValidationSupport.class); + when(myValSupport.getFhirContext()).thenReturn(ourCtx); myVal = ourCtx.newValidator(); myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport); + ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport, new InMemoryTerminologyServerValidationSupport(ourCtx)); myInstanceVal = new FhirInstanceValidator(validationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -71,7 +79,7 @@ public class QuestionnaireValidatorDstu3Test { ValidationResult errors = myVal.validateWithResult(q); ourLog.info(errors.toString()); assertThat(errors.isSuccessful(), Matchers.is(true)); - assertThat(errors.getMessages(), Matchers.empty()); + assertThat(errors.getMessages().stream().filter(t->t.getSeverity().ordinal() > ResultSeverityEnum.INFORMATION.ordinal()).collect(Collectors.toList()), Matchers.empty()); } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/ResourceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/ResourceValidatorDstu3Test.java index fca5d67377a..7da1192219d 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/ResourceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/ResourceValidatorDstu3Test.java @@ -1,20 +1,26 @@ package org.hl7.fhir.dstu3.hapi.validation; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.StrictErrorHandler; import ca.uhn.fhir.util.TestUtil; -import ca.uhn.fhir.validation.*; +import ca.uhn.fhir.validation.FhirValidator; +import ca.uhn.fhir.validation.ResultSeverityEnum; +import ca.uhn.fhir.validation.SchemaBaseValidator; +import ca.uhn.fhir.validation.SingleValidationMessage; +import ca.uhn.fhir.validation.ValidationResult; import ca.uhn.fhir.validation.schematron.SchematronBaseValidator; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.Validate; import org.hamcrest.core.StringContains; +import org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.dstu3.conformance.ProfileUtilities; import org.hl7.fhir.dstu3.context.IWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.Condition.ConditionClinicalStatus; @@ -22,6 +28,7 @@ import org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus; import org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent; import org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.utilities.validation.ValidationMessage; import org.junit.AfterClass; import org.junit.Ignore; @@ -33,8 +40,13 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class ResourceValidatorDstu3Test { @@ -104,7 +116,7 @@ public class ResourceValidatorDstu3Test { String encoded = parser.encodeResourceToString(careTeam); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(encoded); @@ -148,7 +160,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult output = val.validateWithResult(p); List all = logResultsAndReturnNonInformationalOnes(output); @@ -165,7 +177,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult output = val.validateWithResult(p); List all = logResultsAndReturnNonInformationalOnes(output); @@ -176,8 +188,8 @@ public class ResourceValidatorDstu3Test { @Test @Ignore public void testValidateProfileWithExtension() throws IOException, FHIRException { - PrePopulatedValidationSupport valSupport = new PrePopulatedValidationSupport(); - DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(); + PrePopulatedValidationSupport valSupport = new PrePopulatedValidationSupport(ourCtx); + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(ourCtx); ValidationSupportChain support = new ValidationSupportChain(valSupport, defaultSupport); // Prepopulate SDs @@ -198,7 +210,7 @@ public class ResourceValidatorDstu3Test { private StructureDefinition loadStructureDefinition(DefaultProfileValidationSupport theDefaultValSupport, String theResName) throws IOException, FHIRException { StructureDefinition derived = ourCtx.newXmlParser().parseResource(StructureDefinition.class, IOUtils.toString(ResourceValidatorDstu3Test.class.getResourceAsStream(theResName))); - StructureDefinition base = theDefaultValSupport.fetchStructureDefinition(ourCtx, derived.getBaseDefinition()); + StructureDefinition base = (StructureDefinition) theDefaultValSupport.fetchStructureDefinition(derived.getBaseDefinition()); Validate.notNull(base); IWorkerContext worker = new HapiWorkerContext(ourCtx, theDefaultValSupport); @@ -222,7 +234,7 @@ public class ResourceValidatorDstu3Test { String input = ourCtx.newXmlParser().encodeResourceToString(fhirObj); FhirValidator validator = ourCtx.newValidator(); - validator.registerValidatorModule(new FhirInstanceValidator()); + validator.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = validator.validateWithResult(input); // we should get some results, not an exception @@ -253,7 +265,7 @@ public class ResourceValidatorDstu3Test { "}"; FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult output = val.validateWithResult(input); OperationOutcome operationOutcome = (OperationOutcome) output.toOperationOutcome(); @@ -273,7 +285,7 @@ public class ResourceValidatorDstu3Test { String input = IOUtils.toString(getClass().getResourceAsStream("/questionnaire_jon_z_20160506.xml"), StandardCharsets.UTF_8); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(input); @@ -314,7 +326,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(q); @@ -333,7 +345,7 @@ public class ResourceValidatorDstu3Test { TestPatientFor327 patient = new TestPatientFor327(); patient.setBirthDate(new Date()); patient.setId("123"); - patient.getText().setDivAsString("
    FOO
    "); + patient.getText().setDivAsString("
    FOO
    "); patient.getText().setStatus(NarrativeStatus.GENERATED); patient.getLanguageElement().setValue("en"); patient.addExtension().setUrl("http://foo").setValue(new StringType("MOD")); @@ -356,7 +368,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(encoded); @@ -402,7 +414,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(messageString); @@ -453,7 +465,7 @@ public class ResourceValidatorDstu3Test { FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new SchemaBaseValidator(ourCtx)); val.registerValidatorModule(new SchematronBaseValidator(ourCtx)); - val.registerValidatorModule(new FhirInstanceValidator()); + val.registerValidatorModule(new FhirInstanceValidator(ourCtx)); ValidationResult result = val.validateWithResult(messageString); @@ -478,7 +490,7 @@ public class ResourceValidatorDstu3Test { private static final long serialVersionUID = 1L; @Child(name = "testCondition") - @ca.uhn.fhir.model.api.annotation.Extension(url = "testCondition", definedLocally = true, isModifier = false) + @ca.uhn.fhir.model.api.annotation.Extension(url = "http://testCondition", definedLocally = true, isModifier = false) private List testConditions = null; public List getConditions() { diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/StructureMapTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/StructureMapTest.java index 0c974214ace..8d28d47c0c3 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/StructureMapTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/StructureMapTest.java @@ -1,324 +1,324 @@ package org.hl7.fhir.dstu3.hapi.validation; -import static org.junit.Assert.assertEquals; - -import java.util.*; - -import javax.annotation.Nullable; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.dstu3.context.IWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.utils.StructureMapUtilities; import org.junit.Before; import org.junit.Test; -import ca.uhn.fhir.context.FhirContext; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; public class StructureMapTest { - /** - * The logger object. - */ - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StructureMapTest.class); + /** + * The logger object. + */ + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StructureMapTest.class); - /** - * The basic fhir context used to parse structure definitions. - */ - FhirContext context; + /** + * The basic fhir context used to parse structure definitions. + */ + FhirContext myCtx; - /** - * HapiFhirContext used when building strucutre map utilities. - */ - IWorkerContext hapiContext; + /** + * HapiFhirContext used when building strucutre map utilities. + */ + IWorkerContext hapiContext; - /** - * path to the files used to test the profile generator. - */ - String resourcePath = null; + /** + * path to the files used to test the profile generator. + */ + String resourcePath = null; - /** - * Used to validate definitions as well as add new structure definitions to a registry. - */ - PrePopulatedValidationSupport validationSupport; + /** + * Used to validate definitions as well as add new structure definitions to a registry. + */ + ValidationSupportChain validationSupport; - public StructureMap.StructureMapGroupRuleSourceComponent buildSource(String context, @Nullable String element, @Nullable String variable, @Nullable String type, @Nullable Integer min, - @Nullable String max) { - StructureMap.StructureMapGroupRuleSourceComponent retVal = new StructureMap.StructureMapGroupRuleSourceComponent(); - retVal.setContext(context); - if (element != null) - retVal.setElement(element); - if (variable != null) - retVal.setVariable(variable); - if (type != null) - retVal.setType(type); - if (min != null) - retVal.setMin(min); - if (max != null) - retVal.setMax(max); - return retVal; - } + public StructureMap.StructureMapGroupRuleSourceComponent buildSource(String context, @Nullable String element, @Nullable String variable, @Nullable String type, @Nullable Integer min, + @Nullable String max) { + StructureMap.StructureMapGroupRuleSourceComponent retVal = new StructureMap.StructureMapGroupRuleSourceComponent(); + retVal.setContext(context); + if (element != null) + retVal.setElement(element); + if (variable != null) + retVal.setVariable(variable); + if (type != null) + retVal.setType(type); + if (min != null) + retVal.setMin(min); + if (max != null) + retVal.setMax(max); + return retVal; + } - public List buildSourceList(StructureMap.StructureMapGroupRuleSourceComponent[] sources) { - List retVal = new ArrayList(); - retVal.addAll(Arrays.asList(sources)); - return retVal; - } + public List buildSourceList(StructureMap.StructureMapGroupRuleSourceComponent[] sources) { + List retVal = new ArrayList(); + retVal.addAll(Arrays.asList(sources)); + return retVal; + } - public StructureMap.StructureMapGroupRuleTargetComponent buildTarget(@Nullable String context, @Nullable String element, @Nullable String variable, - @Nullable StructureMap.StructureMapTransform transform, @Nullable TargetParam[] params) throws Exception { - StructureMap.StructureMapGroupRuleTargetComponent retVal = new StructureMap.StructureMapGroupRuleTargetComponent(); - if (context != null) - retVal.setContext(context); - if (element != null) - retVal.setElement(element); - if (variable != null) - retVal.setVariable(variable); - if (transform != null) - retVal.setTransform(transform); - if (params != null) { - if (params.length > 0) - retVal.setParameter(this.constructParameters(params)); - } - return retVal; - } + public StructureMap.StructureMapGroupRuleTargetComponent buildTarget(@Nullable String context, @Nullable String element, @Nullable String variable, + @Nullable StructureMap.StructureMapTransform transform, @Nullable TargetParam[] params) throws Exception { + StructureMap.StructureMapGroupRuleTargetComponent retVal = new StructureMap.StructureMapGroupRuleTargetComponent(); + if (context != null) + retVal.setContext(context); + if (element != null) + retVal.setElement(element); + if (variable != null) + retVal.setVariable(variable); + if (transform != null) + retVal.setTransform(transform); + if (params != null) { + if (params.length > 0) + retVal.setParameter(this.constructParameters(params)); + } + return retVal; + } - public List buildTargetList(StructureMap.StructureMapGroupRuleTargetComponent[] sources) { - List retVal = new ArrayList(); - retVal.addAll(Arrays.asList(sources)); - return retVal; - } + public List buildTargetList(StructureMap.StructureMapGroupRuleTargetComponent[] sources) { + List retVal = new ArrayList(); + retVal.addAll(Arrays.asList(sources)); + return retVal; + } - public List buildTestGroup() throws Exception { - List retVal = new ArrayList(); - StructureMap.StructureMapGroupComponent group = new StructureMap.StructureMapGroupComponent(); - group.setName("TestStructureToCoding"); - group.setTypeMode(StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES); - group.setInput(this.buildTestInput()); - group.setRule(this.buildTestRules()); - retVal.add(group); - return retVal; - } + public List buildTestGroup() throws Exception { + List retVal = new ArrayList(); + StructureMap.StructureMapGroupComponent group = new StructureMap.StructureMapGroupComponent(); + group.setName("TestStructureToCoding"); + group.setTypeMode(StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES); + group.setInput(this.buildTestInput()); + group.setRule(this.buildTestRules()); + retVal.add(group); + return retVal; + } - public List buildTestInput() { - List retVal = new ArrayList(); - StructureMap.StructureMapGroupInputComponent sourceIn = new StructureMap.StructureMapGroupInputComponent(); - StructureMap.StructureMapGroupInputComponent targetIn = new StructureMap.StructureMapGroupInputComponent(); - sourceIn.setName("source"); - sourceIn.setType("TestStructure"); - sourceIn.setMode(StructureMap.StructureMapInputMode.SOURCE); - targetIn.setName("target"); - targetIn.setType("http://hl7.org/fhir/StructureDefinition/Coding"); - targetIn.setMode(StructureMap.StructureMapInputMode.TARGET); - retVal.add(sourceIn); - retVal.add(targetIn); - return retVal; - } + public List buildTestInput() { + List retVal = new ArrayList(); + StructureMap.StructureMapGroupInputComponent sourceIn = new StructureMap.StructureMapGroupInputComponent(); + StructureMap.StructureMapGroupInputComponent targetIn = new StructureMap.StructureMapGroupInputComponent(); + sourceIn.setName("source"); + sourceIn.setType("TestStructure"); + sourceIn.setMode(StructureMap.StructureMapInputMode.SOURCE); + targetIn.setName("target"); + targetIn.setType("http://hl7.org/fhir/StructureDefinition/Coding"); + targetIn.setMode(StructureMap.StructureMapInputMode.TARGET); + retVal.add(sourceIn); + retVal.add(targetIn); + return retVal; + } - public List buildTestRules() throws Exception { - List retVal = new ArrayList(); - StructureMap.StructureMapGroupRuleComponent codingSystem = new StructureMap.StructureMapGroupRuleComponent(); - StructureMap.StructureMapGroupRuleComponent codingExtension = new StructureMap.StructureMapGroupRuleComponent(); - codingSystem.setName("Coding.System"); - codingSystem.setSource(this.buildSourceList(new StructureMap.StructureMapGroupRuleSourceComponent[] { - this.buildSource("source", "system", "v", null, null, null) - })); - codingSystem.setTarget(this.buildTargetList(new StructureMap.StructureMapGroupRuleTargetComponent[] { - this.buildTarget("target", "system", null, StructureMap.StructureMapTransform.COPY, new TargetParam[] { new TargetParam("Id", "v") }) - })); - codingExtension.setName("Coding.Extension"); - codingExtension.setSource(this.buildSourceList(new StructureMap.StructureMapGroupRuleSourceComponent[] { - this.buildSource("source", "system", "v", null, null, null) - })); - codingExtension.setTarget(this.buildTargetList(new StructureMap.StructureMapGroupRuleTargetComponent[] { - this.buildTarget("target", "extension", "ex", null, new TargetParam[] { new TargetParam("", "") }), - this.buildTarget("ex", "url", null, StructureMap.StructureMapTransform.COPY, new TargetParam[] { new TargetParam("Id", "v") }), - this.buildTarget("ex", "value", null, StructureMap.StructureMapTransform.COPY, new TargetParam[] { new TargetParam("String", "v") }) - })); - retVal.add(codingSystem); - retVal.add(codingExtension); - return retVal; - } + public List buildTestRules() throws Exception { + List retVal = new ArrayList(); + StructureMap.StructureMapGroupRuleComponent codingSystem = new StructureMap.StructureMapGroupRuleComponent(); + StructureMap.StructureMapGroupRuleComponent codingExtension = new StructureMap.StructureMapGroupRuleComponent(); + codingSystem.setName("Coding.System"); + codingSystem.setSource(this.buildSourceList(new StructureMap.StructureMapGroupRuleSourceComponent[]{ + this.buildSource("source", "system", "v", null, null, null) + })); + codingSystem.setTarget(this.buildTargetList(new StructureMap.StructureMapGroupRuleTargetComponent[]{ + this.buildTarget("target", "system", null, StructureMap.StructureMapTransform.COPY, new TargetParam[]{new TargetParam("Id", "v")}) + })); + codingExtension.setName("Coding.Extension"); + codingExtension.setSource(this.buildSourceList(new StructureMap.StructureMapGroupRuleSourceComponent[]{ + this.buildSource("source", "system", "v", null, null, null) + })); + codingExtension.setTarget(this.buildTargetList(new StructureMap.StructureMapGroupRuleTargetComponent[]{ + this.buildTarget("target", "extension", "ex", null, new TargetParam[]{new TargetParam("", "")}), + this.buildTarget("ex", "url", null, StructureMap.StructureMapTransform.COPY, new TargetParam[]{new TargetParam("Id", "v")}), + this.buildTarget("ex", "value", null, StructureMap.StructureMapTransform.COPY, new TargetParam[]{new TargetParam("String", "v")}) + })); + retVal.add(codingSystem); + retVal.add(codingExtension); + return retVal; + } - public List constructParameters(TargetParam[] params) throws Exception { - List parameterComponents = new ArrayList(); - for (TargetParam tp : params) { - if (tp.getType() == "Id") // TODO: Convert TypeParam.Type into an Enum. - parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new IdType().setValue(tp.getValue()))); - else if (tp.getType() == "String") - parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue((new StringType().setValue(tp.getValue())))); - else if (tp.getType() == "Boolean") { - boolean bValue = Boolean.getBoolean(tp.getValue()); - parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new BooleanType().setValue(bValue))); - } else if (tp.getType() == "Integer") { - int iValue = Integer.getInteger(tp.getValue()); - parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new IntegerType().setValue(iValue))); - } else if (tp.getType() == "Decimal") { - long lValue = Long.getLong(tp.getValue()); - parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new DecimalType(lValue))); - } - } - return parameterComponents; - } + public List constructParameters(TargetParam[] params) throws Exception { + List parameterComponents = new ArrayList(); + for (TargetParam tp : params) { + if (tp.getType() == "Id") // TODO: Convert TypeParam.Type into an Enum. + parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new IdType().setValue(tp.getValue()))); + else if (tp.getType() == "String") + parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue((new StringType().setValue(tp.getValue())))); + else if (tp.getType() == "Boolean") { + boolean bValue = Boolean.getBoolean(tp.getValue()); + parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new BooleanType().setValue(bValue))); + } else if (tp.getType() == "Integer") { + int iValue = Integer.getInteger(tp.getValue()); + parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new IntegerType().setValue(iValue))); + } else if (tp.getType() == "Decimal") { + long lValue = Long.getLong(tp.getValue()); + parameterComponents.add(new StructureMap.StructureMapGroupRuleTargetParameterComponent().setValue(new DecimalType(lValue))); + } + } + return parameterComponents; + } - public List createMapStructureList() { - List retVal = new ArrayList(); - StructureMap.StructureMapStructureComponent source = new StructureMap.StructureMapStructureComponent(); - StructureMap.StructureMapStructureComponent target = new StructureMap.StructureMapStructureComponent(); - source.setUrl("http://opencimi.org/structuredefinition/TestStructure"); - source.setMode(StructureMap.StructureMapModelMode.SOURCE); - target.setUrl("http://hl7.org/fhir/StructureDefinition/Coding"); - target.setMode(StructureMap.StructureMapModelMode.TARGET); - retVal.add(source); - retVal.add(target); - return retVal; - } + public List createMapStructureList() { + List retVal = new ArrayList<>(); + StructureMap.StructureMapStructureComponent source = new StructureMap.StructureMapStructureComponent(); + StructureMap.StructureMapStructureComponent target = new StructureMap.StructureMapStructureComponent(); + source.setUrl("http://opencimi.org/structuredefinition/TestStructure"); + source.setMode(StructureMap.StructureMapModelMode.SOURCE); + target.setUrl("http://hl7.org/fhir/StructureDefinition/Coding"); + target.setMode(StructureMap.StructureMapModelMode.TARGET); + retVal.add(source); + retVal.add(target); + return retVal; + } - public StructureDefinition.StructureDefinitionDifferentialComponent createTestDiff() { - StructureDefinition.StructureDefinitionDifferentialComponent retVal = new StructureDefinition.StructureDefinitionDifferentialComponent(); - List eList = new ArrayList(); - ElementDefinition ed0 = new ElementDefinition(); - // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); - // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); - ed0.setId("TestStructure"); - ed0.setSliceName("TestStructure"); - ed0.setPath("TestStructure"); - // ed0.setBase(base); - ed0.setMin(1); - ed0.setMax("1"); - eList.add(ed0); + public StructureDefinition.StructureDefinitionDifferentialComponent createTestDiff() { + StructureDefinition.StructureDefinitionDifferentialComponent retVal = new StructureDefinition.StructureDefinitionDifferentialComponent(); + List eList = new ArrayList<>(); + ElementDefinition ed0 = new ElementDefinition(); + // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); + // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); + ed0.setId("TestStructure"); + ed0.setSliceName("TestStructure"); + ed0.setPath("TestStructure"); + // ed0.setBase(base); + ed0.setMin(1); + ed0.setMax("1"); + eList.add(ed0); - ElementDefinition ed = new ElementDefinition(); - // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); - // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); - ed.setId("system"); - ed.setSliceName("system"); - ed.setPath("TestStructure.system"); - // ed.setBase(base); - ed.setFixed(new UriType().setValue("HTTP://opencimi.org/structuredefinition/TestStructure.html#Debugging")); - // ed.setType(this.createTypeRefList()); - eList.add(ed); - retVal.setElement(eList); - return retVal; - } + ElementDefinition ed = new ElementDefinition(); + // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); + // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); + ed.setId("system"); + ed.setSliceName("system"); + ed.setPath("TestStructure.system"); + // ed.setBase(base); + ed.setFixed(new UriType().setValue("HTTP://opencimi.org/structuredefinition/TestStructure.html#Debugging")); + // ed.setType(this.createTypeRefList()); + eList.add(ed); + retVal.setElement(eList); + return retVal; + } - public StructureDefinition.StructureDefinitionSnapshotComponent createTestSnapshot() { - StructureDefinition.StructureDefinitionSnapshotComponent retVal = new StructureDefinition.StructureDefinitionSnapshotComponent(); - List eList = new ArrayList(); - ElementDefinition ed0 = new ElementDefinition(); - // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); - // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); - ed0.setId("TestStructure"); - ed0.setSliceName("TestStructure"); - ed0.setPath("TestStructure"); - // ed0.setBase(base); - ed0.setMin(1); - ed0.setMax("1"); - eList.add(ed0); + public StructureDefinition.StructureDefinitionSnapshotComponent createTestSnapshot() { + StructureDefinition.StructureDefinitionSnapshotComponent retVal = new StructureDefinition.StructureDefinitionSnapshotComponent(); + List eList = new ArrayList<>(); + ElementDefinition ed0 = new ElementDefinition(); + // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); + // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); + ed0.setId("TestStructure"); + ed0.setSliceName("TestStructure"); + ed0.setPath("TestStructure"); + // ed0.setBase(base); + ed0.setMin(1); + ed0.setMax("1"); + eList.add(ed0); - ElementDefinition ed = new ElementDefinition(); - // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); - // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); - ed.setId("system"); - ed.setSliceName("system"); - ed.setPath("TestStructure.system"); - // ed.setBase(base); - ed.setFixed(new UriType().setValue("HTTP://opencimi.org/structuredefinition/TestStructure.html#Debugging")); - // ed.setType(this.createTypeRefList()); - ed.setMin(1); - ed.setMax("1"); - eList.add(ed); - retVal.setElement(eList); - return retVal; + ElementDefinition ed = new ElementDefinition(); + // ElementDefinition.ElementDefinitionBaseComponent base = new ElementDefinition.ElementDefinitionBaseComponent(); + // base.setId("http://hl7.org/fhir/StructureDefinition/Element"); + ed.setId("system"); + ed.setSliceName("system"); + ed.setPath("TestStructure.system"); + // ed.setBase(base); + ed.setFixed(new UriType().setValue("HTTP://opencimi.org/structuredefinition/TestStructure.html#Debugging")); + // ed.setType(this.createTypeRefList()); + ed.setMin(1); + ed.setMax("1"); + eList.add(ed); + retVal.setElement(eList); + return retVal; - } + } - public StructureDefinition createTestStructure() { - StructureDefinition sd = new StructureDefinition(); - sd.setId("TestStructure"); - sd.setUrl("http://opencimi.org/structuredefinition/TestStructure"); - sd.setStatus(Enumerations.PublicationStatus.DRAFT); - sd.setName("TestStructure"); - sd.setType("TestStructure"); - sd.setSnapshot(this.createTestSnapshot()); - sd.setDifferential(this.createTestDiff()); - sd.setKind(StructureDefinition.StructureDefinitionKind.LOGICAL); + public StructureDefinition createTestStructure() { + StructureDefinition sd = new StructureDefinition(); + sd.setId("TestStructure"); + sd.setUrl("http://opencimi.org/structuredefinition/TestStructure"); + sd.setStatus(Enumerations.PublicationStatus.DRAFT); + sd.setName("TestStructure"); + sd.setType("TestStructure"); + sd.setSnapshot(this.createTestSnapshot()); + sd.setDifferential(this.createTestDiff()); + sd.setKind(StructureDefinition.StructureDefinitionKind.LOGICAL); - return sd; - } + return sd; + } - public StructureMap createTestStructuremap() throws Exception { - StructureMap retMap = new StructureMap(); - retMap.setUrl("http://opencimi.org/structuremap/testtransform"); - retMap.setName("TestTransform"); - retMap.setStatus(Enumerations.PublicationStatus.DRAFT); - retMap.setStructure(this.createMapStructureList()); - retMap.setGroup(this.buildTestGroup()); - return retMap; - } + public StructureMap createTestStructuremap() throws Exception { + StructureMap retMap = new StructureMap(); + retMap.setUrl("http://opencimi.org/structuremap/testtransform"); + retMap.setName("TestTransform"); + retMap.setStatus(Enumerations.PublicationStatus.DRAFT); + retMap.setStructure(this.createMapStructureList()); + retMap.setGroup(this.buildTestGroup()); + return retMap; + } - /** - * Sets up the resource paths as well as create the contexts using a defalut validator to start with. - * - * @throws Exception - */ - @Before - public void setUp() throws Exception { - if (this.context == null) { - this.context = FhirContext.forDstu3(); - } - } + /** + * Sets up the resource paths as well as create the contexts using a defalut validator to start with. + */ + @Before + public void setUp() { + if (this.myCtx == null) { + this.myCtx = FhirContext.forDstu3(); + } + } - /** - * See #682 - */ - @Test - public void testMappingTransform() throws Exception { - Map maps = new HashMap(); // Instantiate a hashmap for StructureMaps - this.validationSupport = new PrePopulatedValidationSupport(); // Create Validation Instance - for (StructureDefinition sd : new DefaultProfileValidationSupport().fetchAllStructureDefinitions(this.context)) { // Read in the default Structure Definitions into a validator that allows custom - // declared structure definitions. - this.validationSupport.addStructureDefinition(sd); - } - StructureDefinition sd1 = this.createTestStructure(); // Calls a method that constructs a comp - this.validationSupport.addStructureDefinition(sd1); // Add custom structure to validation support. - this.hapiContext = new HapiWorkerContext(this.context, this.validationSupport);// Init the Hapi Work - StructureMap map = this.createTestStructuremap(); - maps.put(map.getUrl(), map); - StructureMapUtilities scu = new StructureMapUtilities(hapiContext, maps, null, null); - List result = scu.analyse(null, map).getProfiles(); + /** + * See #682 + */ + @Test + public void testMappingTransform() throws Exception { + Map maps = new HashMap<>(); // Instantiate a hashmap for StructureMaps + PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(myCtx); + this.validationSupport = new ValidationSupportChain(prePopulatedValidationSupport, new DefaultProfileValidationSupport(myCtx)); - assertEquals(1, result.size()); + StructureDefinition sd1 = this.createTestStructure(); // Calls a method that constructs a comp + prePopulatedValidationSupport.addStructureDefinition(sd1); // Add custom structure to validation support. + this.hapiContext = new HapiWorkerContext(this.myCtx, this.validationSupport);// Init the Hapi Work + StructureMap map = this.createTestStructuremap(); + maps.put(map.getUrl(), map); + StructureMapUtilities scu = new StructureMapUtilities(hapiContext, maps, null, null); + List result = scu.analyse(null, map).getProfiles(); - ourLog.info(context.newXmlParser().setPrettyPrint(true).encodeResourceToString(result.get(0))); - } + assertEquals(1, result.size()); - public class TargetParam { - private String type; + ourLog.info(myCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(result.get(0))); + } - private String value; + public class TargetParam { + private String type; - public TargetParam(String type, String value) { + private String value; - this.type = type; - this.value = value; - } + public TargetParam(String type, String value) { - public String getType() { - return type; - } + this.type = type; + this.value = value; + } - public String getValue() { - return value; - } + public String getType() { + return type; + } - public void setType(String type) { - this.type = type; - } + public void setType(String type) { + this.type = type; + } - public void setValue(String value) { - this.value = value; - } - } + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/utils/FhirPathEngineTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/utils/FhirPathEngineTest.java index 2d9fdd7527b..68c7084dc90 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/utils/FhirPathEngineTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/utils/FhirPathEngineTest.java @@ -2,9 +2,16 @@ package org.hl7.fhir.dstu3.utils; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.util.TestUtil; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.dstu3.model.*; +import org.hl7.fhir.dstu3.model.Base; +import org.hl7.fhir.dstu3.model.BooleanType; +import org.hl7.fhir.dstu3.model.DateTimeType; +import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.Patient; +import org.hl7.fhir.dstu3.model.Reference; +import org.hl7.fhir.dstu3.model.Specimen; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -12,7 +19,9 @@ import org.junit.Test; import java.util.List; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; public class FhirPathEngineTest { @@ -21,7 +30,7 @@ public class FhirPathEngineTest { private static FHIRPathEngine ourEngine; @Test - public void testAs() throws Exception { + public void testAs() { Observation obs = new Observation(); obs.setValue(new StringType("FOO")); @@ -66,13 +75,13 @@ public class FhirPathEngineTest { } @AfterClass - public static void afterClassClearContext() throws Exception { + public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); } @BeforeClass public static void beforeClass() { - ourEngine = new FHIRPathEngine(new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport())); + ourEngine = new FHIRPathEngine(new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport(ourCtx))); } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContextTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContextTest.java deleted file mode 100644 index 945cd6698e9..00000000000 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/instance/hapi/validation/HapiWorkerContextTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.hl7.fhir.instance.hapi.validation; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.dstu2.model.ValueSet; -import org.hl7.fhir.dstu2.utils.IWorkerContext; -import org.junit.Test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -public class HapiWorkerContextTest { - - @Test - public void testIdTypes(){ - - DefaultProfileValidationSupport validationSupport = new DefaultProfileValidationSupport(); - FhirContext ctx = FhirContext.forDstu2(); - HapiWorkerContext hwc = new HapiWorkerContext(ctx, validationSupport); - - ValueSet vs = validationSupport.fetchResource(ctx, ValueSet.class, "http://hl7.org/fhir/ValueSet/defined-types"); - IWorkerContext.ValidationResult outcome; - - outcome = hwc.validateCode("http://hl7.org/fhir/resource-types", "Patient", null); - assertTrue(outcome.isOk()); - - outcome = hwc.validateCode("http://hl7.org/fhir/resource-types", "Patient", null, vs); - assertTrue(outcome.isOk()); - - outcome = hwc.validateCode(null, "Patient", null, vs); - assertTrue(outcome.isOk()); - - outcome = hwc.validateCode(null, "id", null, vs); - assertTrue(outcome.isOk()); - - outcome = hwc.validateCode(null, "foo", null, vs); - assertFalse(outcome.isOk()); - - } - - -} diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/utils/FhirPathEngineR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/utils/FhirPathEngineR4Test.java index acde719ed9a..9e7256803d6 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/utils/FhirPathEngineR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/utils/FhirPathEngineR4Test.java @@ -5,7 +5,7 @@ import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.dstu3.utils.FhirPathEngineTest; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; import org.hl7.fhir.r4.model.*; import org.junit.AfterClass; @@ -164,7 +164,7 @@ public class FhirPathEngineR4Test { @BeforeClass public static void beforeClass() { - ourEngine = new FHIRPathEngine(new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport())); + ourEngine = new FHIRPathEngine(new HapiWorkerContext(ourCtx, new DefaultProfileValidationSupport(ourCtx))); } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/CustomResourceGenerationTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/CustomResourceGenerationTest.java index 6e2d2cee751..99b48c10d8e 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/CustomResourceGenerationTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/CustomResourceGenerationTest.java @@ -4,12 +4,11 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.test.BaseTest; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r4.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.StructureDefinition; -import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,10 +28,10 @@ public class CustomResourceGenerationTest extends BaseTest { StructureDefinition customProfile = loadResource(myCtx, StructureDefinition.class, "/r4/custom-resource-profile.json"); String customResource = loadResource("/r4/custom-resource.json"); - PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(); + PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(myCtx); prePopulatedValidationSupport.addStructureDefinition(customProfile); - DefaultProfileValidationSupport defaultProfileValidationSupport = new DefaultProfileValidationSupport(); + DefaultProfileValidationSupport defaultProfileValidationSupport = new DefaultProfileValidationSupport(myCtx); ValidationSupportChain validationSupport = new ValidationSupportChain(defaultProfileValidationSupport, prePopulatedValidationSupport); FhirValidator validator = myCtx.newValidator(); @@ -43,9 +42,10 @@ public class CustomResourceGenerationTest extends BaseTest { String outcome = myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(result.toOperationOutcome()); ourLog.info(outcome); - assertEquals(2, result.getMessages().size()); + assertEquals(3, result.getMessages().size()); assertEquals("Error parsing JSON: the primitive value must be a boolean", result.getMessages().get(0).getMessage()); - assertEquals("Unrecognised property '@id1'", result.getMessages().get(1).getMessage()); + assertEquals("This property must be an Array, not a a primitive property", result.getMessages().get(1).getMessage()); + assertEquals("Unrecognised property '@id1'", result.getMessages().get(2).getMessage()); } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java index 41968e97891..ce76afd0b3b 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java @@ -1,7 +1,10 @@ package org.hl7.fhir.r4.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +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.ValueSetExpansionOptions; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.test.BaseTest; import ca.uhn.fhir.util.TestUtil; @@ -12,31 +15,32 @@ import ca.uhn.fhir.validation.ValidationResult; import com.google.common.base.Charsets; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.Validate; -import org.hl7.fhir.dstu3.hapi.validation.ResourceValidatorDstu3Test; +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.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.conformance.ProfileUtilities; import org.hl7.fhir.r4.context.IWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r4.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.model.Observation.ObservationStatus; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; -import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.r4.terminologies.ValueSetExpander; import org.hl7.fhir.r4.utils.FHIRPathEngine; import org.hl7.fhir.r5.utils.IResourceValidator; import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.xhtml.XhtmlNode; -import org.junit.*; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.TestRule; import org.junit.rules.TestWatcher; import org.junit.runner.Description; @@ -44,22 +48,38 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import java.io.IOException; -import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; import java.util.stream.Collectors; -import java.util.zip.GZIPInputStream; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class FhirInstanceValidatorR4Test extends BaseTest { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidatorR4Test.class); - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forR4(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); @Rule public TestRule watcher = new TestWatcher() { @Override @@ -68,11 +88,11 @@ public class FhirInstanceValidatorR4Test extends BaseTest { } }; private FhirInstanceValidator myInstanceVal; - private IValidationSupport myMockSupport; private Map mySupportedCodeSystemsForExpansion; private FhirValidator myVal; private ArrayList myValidConcepts; private Set myValidSystems = new HashSet<>(); + private CachingValidationSupport myValidationSupport; private void addValidConcept(String theSystem, String theCode) { myValidSystems.add(theSystem); @@ -102,9 +122,12 @@ public class FhirInstanceValidatorR4Test extends BaseTest { myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - myMockSupport = mock(IValidationSupport.class); - CachingValidationSupport validationSupport = new CachingValidationSupport(new ValidationSupportChain(myDefaultValidationSupport, myMockSupport)); - myInstanceVal = new FhirInstanceValidator(validationSupport); + IValidationSupport mockSupport = mock(IValidationSupport.class); + when(mockSupport.getFhirContext()).thenReturn(ourCtx); + + ValidationSupportChain chain = new ValidationSupportChain(myDefaultValidationSupport, mockSupport, new InMemoryTerminologyServerValidationSupport(ourCtx), new CommonCodeSystemsTerminologyService(ourCtx)); + myValidationSupport = new CachingValidationSupport(chain); + myInstanceVal = new FhirInstanceValidator(myValidationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -112,11 +135,11 @@ public class FhirInstanceValidatorR4Test extends BaseTest { myValidConcepts = new ArrayList<>(); - when(myMockSupport.expandValueSet(nullable(FhirContext.class), nullable(ConceptSetComponent.class))).thenAnswer(t -> { - ConceptSetComponent arg = (ConceptSetComponent) t.getArguments()[1]; - ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getSystem()); + when(mockSupport.expandValueSet(any(), nullable(ValueSetExpansionOptions.class), any())).thenAnswer(t -> { + ValueSet arg = (ValueSet) t.getArgument(2, IBaseResource.class); + ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem()); if (retVal == null) { - ValueSetExpander.ValueSetExpansionOutcome outcome = myDefaultValidationSupport.expandValueSet(ourCtx, arg); + IBaseResource outcome = myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg).getValueSet(); return outcome; } ourLog.debug("expandValueSet({}) : {}", new Object[]{t.getArguments()[0], retVal}); @@ -125,66 +148,70 @@ public class FhirInstanceValidatorR4Test extends BaseTest { valueset.setExpansion(retVal); return new ValueSetExpander.ValueSetExpansionOutcome(valueset); }); - when(myMockSupport.isCodeSystemSupported(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer() { @Override - public Boolean answer(InvocationOnMock theInvocation) throws Throwable { - boolean retVal = myValidSystems.contains(theInvocation.getArguments()[1]); - ourLog.debug("isCodeSystemSupported({}) : {}", new Object[]{theInvocation.getArguments()[1], retVal}); + public Boolean answer(InvocationOnMock theInvocation) { + String argument = theInvocation.getArgument(1, String.class); + boolean retVal = myValidSystems.contains(argument); + ourLog.debug("isCodeSystemSupported({}) : {}", argument, retVal); return retVal; } }); - when(myMockSupport.fetchResource(nullable(FhirContext.class), nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchResource(nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { @Override public IBaseResource answer(InvocationOnMock theInvocation) throws Throwable { IBaseResource retVal; - String id = (String) theInvocation.getArguments()[2]; + Class clazz = (Class) theInvocation.getArguments()[0]; + String id = theInvocation.getArgument(1, String.class); if ("Questionnaire/q_jon".equals(id)) { - retVal = ourCtx.newJsonParser().parseResource(IOUtils.toString(FhirInstanceValidatorR4Test.class.getResourceAsStream("/q_jon.json"))); + retVal = ourCtx.newJsonParser().parseResource(loadResource("/q_jon.json")); } else { - retVal = myDefaultValidationSupport.fetchResource((FhirContext) theInvocation.getArguments()[0], (Class) theInvocation.getArguments()[1], id); + retVal = myDefaultValidationSupport.fetchResource(clazz, id); } - ourLog.debug("fetchResource({}, {}) : {}", theInvocation.getArguments()[1], id, retVal); + ourLog.debug("fetchResource({}, {}) : {}", clazz, id, retVal); return retVal; } }); - when(myMockSupport.validateCode(nullable(FhirContext.class), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.validateCode(any(), any(), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { @Override - public IContextValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { - FhirContext ctx = theInvocation.getArgument(0, FhirContext.class); - String system = theInvocation.getArgument(1, String.class); - String code = theInvocation.getArgument(2, String.class); - String display = theInvocation.getArgument(3, String.class); - String valueSetUrl = theInvocation.getArgument(4, String.class); - IContextValidationSupport.CodeValidationResult retVal; + public IValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { + ConceptValidationOptions options = theInvocation.getArgument(1, ConceptValidationOptions.class); + String system = theInvocation.getArgument(2, String.class); + String code = theInvocation.getArgument(3, String.class); + String display = theInvocation.getArgument(4, String.class); + String valueSetUrl = theInvocation.getArgument(5, String.class); + IValidationSupport.CodeValidationResult retVal; if (myValidConcepts.contains(system + "___" + code)) { - retVal = new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(code))); + retVal = new IValidationSupport.CodeValidationResult().setCode(code); + } else if (myValidSystems.contains(system)) { + return new IValidationSupport.CodeValidationResult().setSeverityCode(ValidationMessage.IssueSeverity.WARNING.toCode()).setMessage("Unknown code: " + system + " / " + code); } else { - retVal = myDefaultValidationSupport.validateCode(ctx, system, code, display, valueSetUrl); + retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl); } ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal); return retVal; } }); - when(myMockSupport.fetchCodeSystem(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchCodeSystem(nullable(String.class))).thenAnswer(new Answer() { @Override public CodeSystem answer(InvocationOnMock theInvocation) { - CodeSystem retVal = myDefaultValidationSupport.fetchCodeSystem((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]); - ourLog.debug("fetchCodeSystem({}) : {}", new Object[]{theInvocation.getArguments()[1], retVal}); + CodeSystem retVal = (CodeSystem) myDefaultValidationSupport.fetchCodeSystem((String) theInvocation.getArguments()[0]); + ourLog.debug("fetchCodeSystem({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal}); return retVal; } }); - when(myMockSupport.fetchStructureDefinition(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(mockSupport.fetchStructureDefinition(nullable(String.class))).thenAnswer(new Answer() { @Override - public StructureDefinition answer(InvocationOnMock theInvocation) { - StructureDefinition retVal = myDefaultValidationSupport.fetchStructureDefinition((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]); - ourLog.debug("fetchStructureDefinition({}) : {}", new Object[]{theInvocation.getArguments()[1], retVal}); + public IBaseResource answer(InvocationOnMock theInvocation) { + IBaseResource retVal = myDefaultValidationSupport.fetchStructureDefinition((String) theInvocation.getArguments()[0]); + ourLog.debug("fetchStructureDefinition({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal}); return retVal; } }); - when(myMockSupport.fetchAllStructureDefinitions(nullable(FhirContext.class))).thenAnswer(new Answer>() { + when(mockSupport.fetchAllStructureDefinitions()).thenAnswer(new Answer>() { @Override public List answer(InvocationOnMock theInvocation) { - List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions((FhirContext) theInvocation.getArguments()[0]); + List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions(); ourLog.debug("fetchAllStructureDefinitions()", new Object[]{}); return retVal; } @@ -198,7 +225,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { private StructureDefinition loadStructureDefinition(DefaultProfileValidationSupport theDefaultValSupport, String theResName) throws IOException, FHIRException { StructureDefinition derived = loadResource(ourCtx, StructureDefinition.class, theResName); - StructureDefinition base = theDefaultValSupport.fetchStructureDefinition(ourCtx, derived.getBaseDefinition()); + StructureDefinition base = (StructureDefinition) theDefaultValSupport.fetchStructureDefinition(derived.getBaseDefinition()); Validate.notNull(base); IWorkerContext worker = new HapiWorkerContext(ourCtx, theDefaultValSupport); @@ -210,7 +237,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { } private List logResultsAndReturnAll(ValidationResult theOutput) { - List retVal = new ArrayList(); + List retVal = new ArrayList<>(); int index = 0; for (SingleValidationMessage next : theOutput.getMessages()) { @@ -233,12 +260,12 @@ public class FhirInstanceValidatorR4Test extends BaseTest { .setCode("AA "); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(p); List all = logResultsAndReturnErrorOnes(result); assertFalse(result.isSuccessful()); - assertEquals("The code 'AA ' is not valid (whitespace rules)", all.get(0).getMessage()); + assertEquals("The code \"AA \" is not valid (whitespace rules)", all.get(0).getMessage()); } @@ -256,12 +283,59 @@ public class FhirInstanceValidatorR4Test extends BaseTest { ""; FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(input); List all = logResultsAndReturnAll(result); assertFalse(result.isSuccessful()); - assertEquals("Primitive types must have a value that is not empty", all.get(0).getMessage()); + assertEquals("@value cannot be empty", all.get(0).getMessage()); + } + + /** + * See #1740 + */ + @Test + public void testValidateScalarInRepeatableField() { + String operationDefinition = "{\n" + + " \"resourceType\": \"OperationDefinition\",\n" + + " \"name\": \"Questionnaire\",\n" + + " \"status\": \"draft\",\n" + + " \"kind\" : \"operation\",\n" + + " \"code\": \"populate\",\n" + + " \"resource\": \"Patient\",\n" + // should be array + " \"system\": false,\n" + " " + + " \"type\": false,\n" + + " \"instance\": true\n" + + "}"; + + FhirValidator val = ourCtx.newValidator(); + val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + + ValidationResult result = val.validateWithResult(operationDefinition); + List all = logResultsAndReturnAll(result); + assertFalse(result.isSuccessful()); + assertEquals("This property must be an Array, not a a primitive property", all.get(0).getMessage()); + } + + /** + * See #1676 - We should ignore schema location + */ + @Test + public void testValidateResourceWithSchemaLocation() { + String input = "" + + " \n" + + " \n" + + "
    AAA
    \n" + + "
    " + + " " + + "
    "; + + FhirValidator val = ourCtx.newValidator(); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); + + ValidationResult result = val.validateWithResult(input); + logResultsAndReturnAll(result); + assertTrue(result.isSuccessful()); } /** @@ -281,7 +355,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { // With BPs disabled val = ourCtx.newValidator(); - instanceModule = new FhirInstanceValidator(myDefaultValidationSupport); + instanceModule = new FhirInstanceValidator(myValidationSupport); val.registerValidatorModule(instanceModule); result = val.validateWithResult(input); all = logResultsAndReturnAll(result); @@ -290,7 +364,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { // With BPs enabled val = ourCtx.newValidator(); - instanceModule = new FhirInstanceValidator(myDefaultValidationSupport); + instanceModule = new FhirInstanceValidator(myValidationSupport); IResourceValidator.BestPracticeWarningLevel level = IResourceValidator.BestPracticeWarningLevel.Error; instanceModule.setBestPracticeWarningLevel(level); val.registerValidatorModule(instanceModule); @@ -361,7 +435,11 @@ public class FhirInstanceValidatorR4Test extends BaseTest { ValidationResult output = myVal.validateWithResult(encoded); List errors = logResultsAndReturnNonInformationalOnes(output); - assertEquals(46, errors.size()); + errors = errors + .stream() + .filter(t -> t.getMessage().contains("Bundle entry missing fullUrl")) + .collect(Collectors.toList()); + assertEquals(5, errors.size()); } @Test @@ -400,7 +478,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { procedure.setPerformed(period); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(myInstanceVal); ValidationResult result = val.validateWithResult(procedure); @@ -560,7 +638,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { inputString = loadResource("/brian_reinhold_bundle.json"); Bundle bundle = ourCtx.newJsonParser().parseResource(Bundle.class, inputString); - FHIRPathEngine fp = new FHIRPathEngine(new HapiWorkerContext(ourCtx, myDefaultValidationSupport)); + FHIRPathEngine fp = new FHIRPathEngine(new HapiWorkerContext(ourCtx, myValidationSupport)); List fpOutput; BooleanType bool; @@ -592,13 +670,13 @@ public class FhirInstanceValidatorR4Test extends BaseTest { @Test public void testValidateProfileWithExtension() throws IOException, FHIRException { - PrePopulatedValidationSupport valSupport = new PrePopulatedValidationSupport(); - DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(); - CachingValidationSupport support = new CachingValidationSupport(new ValidationSupportChain(defaultSupport, valSupport)); + PrePopulatedValidationSupport valSupport = new PrePopulatedValidationSupport(ourCtx); + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(ourCtx); + CachingValidationSupport support = new CachingValidationSupport(new ValidationSupportChain(defaultSupport, valSupport, new InMemoryTerminologyServerValidationSupport(ourCtx))); // Prepopulate SDs - valSupport.addStructureDefinition(loadStructureDefinition(defaultSupport, "/dstu3/myconsent-profile.xml")); - valSupport.addStructureDefinition(loadStructureDefinition(defaultSupport, "/dstu3/myconsent-ext.xml")); + valSupport.addStructureDefinition(loadStructureDefinition(defaultSupport, "/r4/myconsent-profile.xml")); + valSupport.addStructureDefinition(loadStructureDefinition(defaultSupport, "/r4/myconsent-ext.xml")); FhirValidator val = ourCtx.newValidator(); val.registerValidatorModule(new FhirInstanceValidator(support)); @@ -616,6 +694,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { .setSystem("http://terminology.hl7.org/CodeSystem/consentcategorycodes") .setCode("acd"); + // Should pass ValidationResult output = val.validateWithResult(input); List all = logResultsAndReturnErrorOnes(output); @@ -854,29 +933,6 @@ public class FhirInstanceValidatorR4Test extends BaseTest { assertEquals(output.toString(), 0, res.size()); } - @Test - public void testValidateRawXmlWithMissingRootNamespace() { - String input = "" - + "" - + " " - + " " - + "
    Some narrative
    " - + "
    " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + "
    "; - - ValidationResult output = myVal.validateWithResult(input); - assertEquals(output.toString(), 1, output.getMessages().size()); - assertEquals("This 'Patient' cannot be parsed as a FHIR object (no namespace)", output.getMessages().get(0).getMessage()); - ourLog.info(output.getMessages().get(0).getLocationString()); - } - /** * A reference with only an identifier should be valid */ @@ -950,7 +1006,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnAll(output); @@ -971,7 +1027,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); @@ -992,10 +1048,13 @@ public class FhirInstanceValidatorR4Test extends BaseTest { input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); input.setStatus(ObservationStatus.FINAL); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); - assertThat(errors.toString(), containsString("StructureDefinition reference \"http://foo/structuredefinition/myprofile\" could not be resolved")); + + assertEquals(1, errors.size()); + assertEquals("Profile reference \"http://foo/structuredefinition/myprofile\" could not be resolved, so has not been checked", errors.get(0).getMessage()); + assertEquals(ResultSeverityEnum.ERROR, errors.get(0).getSeverity()); } @Test @@ -1043,7 +1102,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { ValidationResult output = myVal.validateWithResult(input); logResultsAndReturnAll(output); assertEquals( - "The value provided ('notvalidcode') is not in the value set http://hl7.org/fhir/ValueSet/observation-status|4.0.0 (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code[notvalidcode] in system[(none)])", + "The value provided (\"notvalidcode\") is not in the value set http://hl7.org/fhir/ValueSet/observation-status|4.0.0 (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code 'notvalidcode')", output.getMessages().get(0).getMessage()); } @@ -1051,7 +1110,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { @Ignore public void testValidateDecimalWithTrailingDot() { String input = "{" + - " \"resourceType\": \"Observation\"," + + " \"resourceType\": \"Observation\"," + " \"status\": \"final\"," + " \"subject\": {\"reference\":\"Patient/123\"}," + " \"code\": { \"coding\": [{ \"system\":\"http://foo\", \"code\":\"123\" }] }," + @@ -1067,8 +1126,8 @@ public class FhirInstanceValidatorR4Test extends BaseTest { " },\n" + " \"text\": \"210.0-925.\"\n" + " }\n" + - " ]"+ - "}"; + " ]" + + "}"; ourLog.info(input); ValidationResult output = myVal.validateWithResult(input); logResultsAndReturnAll(output); @@ -1082,7 +1141,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); input.setStatus(ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); @@ -1098,7 +1157,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1116,7 +1175,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1136,7 +1195,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { expansionComponent.addContains().setSystem("http://loinc.org").setCode("12345").setDisplay("Some display code"); mySupportedCodeSystemsForExpansion.put("http://loinc.org", expansionComponent); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1153,7 +1212,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); input.setStatus(ObservationStatus.FINAL); @@ -1214,6 +1273,21 @@ public class FhirInstanceValidatorR4Test extends BaseTest { assertEquals(0, all.size()); } + @Test + public void testInvocationOfValidatorFetcher() throws IOException { + + String encoded = loadResource("/r4/r4-caredove-bundle.json"); + + IResourceValidator.IValidatorResourceFetcher resourceFetcher = mock(IResourceValidator.IValidatorResourceFetcher.class); + when(resourceFetcher.validationPolicy(any(), anyString(), anyString())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); + myInstanceVal.setValidatorResourceFetcher(resourceFetcher); + myVal.validateWithResult(encoded); + + verify(resourceFetcher, times(14)).resolveURL(any(), anyString(), anyString()); + verify(resourceFetcher, times(12)).validationPolicy(any(), anyString(), anyString()); + verify(resourceFetcher, times(12)).fetch(any(), anyString()); + } + @Test @Ignore public void testValidateStructureDefinition() throws IOException { diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/HapiWorkerContextTest.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/HapiWorkerContextTest.java index fd3dbf780dc..40ee45ce4cb 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/HapiWorkerContextTest.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/HapiWorkerContextTest.java @@ -5,17 +5,15 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.test.BaseTest; import com.google.common.base.Charsets; import org.apache.commons.lang.Validate; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.context.IWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.PrePopulatedValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.StructureDefinition; import org.hl7.fhir.r4.model.ValueSet; -import org.hl7.fhir.utilities.TerminologyServiceOptions; +import org.hl7.fhir.utilities.validation.ValidationOptions; import org.junit.Test; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; @@ -32,25 +30,26 @@ import java.util.List; import static org.junit.Assert.assertEquals; public class HapiWorkerContextTest extends BaseTest { - FhirContext ctx = FhirContext.forR4(); + FhirContext myCtx = FhirContext.forR4(); @Test public void testCodeInPrePopulatedValidationSupport() throws IOException { - PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(); + PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(myCtx); - getResources("/r4/carin/carin/codesystem/").forEach(t -> prePopulatedValidationSupport.addCodeSystem((CodeSystem) t)); - getResources("/r4/carin/uscore/codesystem/").forEach(t -> prePopulatedValidationSupport.addCodeSystem((CodeSystem) t)); + getResources("/r4/carin/carin/codesystem/").forEach(t -> prePopulatedValidationSupport.addCodeSystem(t)); + getResources("/r4/carin/uscore/codesystem/").forEach(t -> prePopulatedValidationSupport.addCodeSystem(t)); getResources("/r4/carin/carin/valueset/").forEach(t -> prePopulatedValidationSupport.addValueSet((ValueSet) t)); getResources("/r4/carin/uscore/valueset/").forEach(t -> prePopulatedValidationSupport.addValueSet((ValueSet) t)); - getResources("/r4/carin/carin/structuredefinition/").forEach(t -> prePopulatedValidationSupport.addStructureDefinition((StructureDefinition) t)); - getResources("/r4/carin/uscore/structuredefinition/").forEach(t -> prePopulatedValidationSupport.addStructureDefinition((StructureDefinition) t)); + getResources("/r4/carin/carin/structuredefinition/").forEach(t -> prePopulatedValidationSupport.addStructureDefinition(t)); + getResources("/r4/carin/uscore/structuredefinition/").forEach(t -> prePopulatedValidationSupport.addStructureDefinition(t)); - IValidationSupport validationSupportChain = new ValidationSupportChain( - new DefaultProfileValidationSupport(), - prePopulatedValidationSupport + ValidationSupportChain validationSupportChain = new ValidationSupportChain( + new DefaultProfileValidationSupport(myCtx), + prePopulatedValidationSupport, + new InMemoryTerminologyServerValidationSupport(myCtx) ); - HapiWorkerContext workerCtx = new HapiWorkerContext(ctx, validationSupportChain); + HapiWorkerContext workerCtx = new HapiWorkerContext(myCtx, validationSupportChain); ValueSet vs = new ValueSet(); IWorkerContext.ValidationResult outcome; @@ -58,20 +57,21 @@ public class HapiWorkerContextTest extends BaseTest { // Built-in Codes vs.setUrl("http://hl7.org/fhir/ValueSet/fm-status"); - outcome = workerCtx.validateCode(new TerminologyServiceOptions(), "active", vs); + ValidationOptions options = new ValidationOptions().guessSystem(); + outcome = workerCtx.validateCode(options, "active", vs); assertEquals(outcome.getMessage(), true, outcome.isOk()); - outcome = workerCtx.validateCode(new TerminologyServiceOptions(), "active2", vs); + outcome = workerCtx.validateCode(options, "active2", vs); assertEquals(outcome.getMessage(), false, outcome.isOk()); assertEquals("Unknown code[active2] in system[(none)]", outcome.getMessage()); // PrePopulated codes vs.setUrl("http://hl7.org/fhir/us/core/ValueSet/birthsex"); - outcome = workerCtx.validateCode(new TerminologyServiceOptions(), "F", vs); + outcome = workerCtx.validateCode(options, "F", vs); assertEquals(outcome.getMessage(), true, outcome.isOk()); - outcome = workerCtx.validateCode(new TerminologyServiceOptions(), "F2", vs); + outcome = workerCtx.validateCode(options, "F2", vs); assertEquals(outcome.getMessage(), false, outcome.isOk()); assertEquals("Unknown code[F2] in system[(none)]", outcome.getMessage()); @@ -92,7 +92,7 @@ public class HapiWorkerContextTest extends BaseTest { for (Resource nextFileResource : resources) { try (InputStream is = nextFileResource.getInputStream()) { Reader reader = new InputStreamReader(is, Charsets.UTF_8); - retVal.add(ctx.newJsonParser().parseResource(reader)); + retVal.add(myCtx.newJsonParser().parseResource(reader)); } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireResponseValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireResponseValidatorR4Test.java index 0c078452dc6..2d8d8815c24 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireResponseValidatorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireResponseValidatorR4Test.java @@ -1,26 +1,23 @@ package org.hl7.fhir.r4.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType; import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus; -import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.junit.AfterClass; import org.junit.Before; @@ -31,11 +28,15 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.*; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -45,24 +46,22 @@ public class QuestionnaireResponseValidatorR4Test { private static final String CODE_ICC_SCHOOLTYPE_PT = "PT"; private static final String ID_VS_SCHOOLTYPE = "ValueSet/schooltype"; private static final String SYSTEMURI_ICC_SCHOOLTYPE = "http://ehealthinnovation/icc/ns/schooltype"; - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forR4(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); private FhirInstanceValidator myInstanceVal; private FhirValidator myVal; private IValidationSupport myValSupport; - private HapiWorkerContext myWorkerCtx; @Before public void before() { myValSupport = mock(IValidationSupport.class); - // new DefaultProfileValidationSupport(); - myWorkerCtx = new HapiWorkerContext(ourCtx, myValSupport); + when(myValSupport.getFhirContext()).thenReturn(ourCtx); myVal = ourCtx.newValidator(); myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport); + ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport, new InMemoryTerminologyServerValidationSupport(ourCtx)); myInstanceVal = new FhirInstanceValidator(validationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -87,11 +86,11 @@ public class QuestionnaireResponseValidatorR4Test { codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); int itemCnt = 16; QuestionnaireItemType[] questionnaireItemTypes = new QuestionnaireItemType[itemCnt]; @@ -152,12 +151,12 @@ public class QuestionnaireResponseValidatorR4Test { qa.setQuestionnaire("http://example.com/Questionnaire/q" + i); qa.addItem().setLinkId(linkId).addAnswer().setValue(answerValues[i]); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); - when(myValSupport.validateCode(any(), any(), any(), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); - when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); + when(myValSupport.validateCode(any(), any(), any(), any(), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); + when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); ValidationResult errors = myVal.validateWithResult(qa); @@ -178,7 +177,7 @@ public class QuestionnaireResponseValidatorR4Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaireElement().getValue()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaireElement().getValue()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); @@ -192,35 +191,35 @@ public class QuestionnaireResponseValidatorR4Test { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setAnswerValueSet("http://somevalueset"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq("http://example.com/Questionnaire/q1"))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq("http://example.com/Questionnaire/q1"))).thenReturn(q); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system"))).thenReturn(true); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system2"))).thenReturn(true); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IValidationSupport.CodeValidationResult(new CodeSystem.ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) - .thenReturn(new IValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) - .thenReturn(new IValidationSupport.CodeValidationResult(new CodeSystem.ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) - .thenReturn(new IValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); QuestionnaireResponse qa; ValidationResult errors; @@ -246,7 +245,7 @@ public class QuestionnaireResponseValidatorR4Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code for 'http://codesystems.com/system#code1' - QuestionnaireResponse.item[0].answer[0].value.ofType(Coding)")); + assertThat(errors.toString(), containsString("Unknown code for \"http://codesystems.com/system#code1\"")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); qa = new QuestionnaireResponse(); @@ -257,7 +256,7 @@ public class QuestionnaireResponseValidatorR4Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code: http://codesystems.com/system2 / code3")); + assertThat(errors.toString(), containsString("Unknown code 'http://codesystems.com/system2#code3' for \"http://codesystems.com/system2#code3\"")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); } @@ -274,7 +273,7 @@ public class QuestionnaireResponseValidatorR4Test { QuestionnaireResponseItemComponent qaGroup = qa.addItem(); qaGroup.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -294,7 +293,7 @@ public class QuestionnaireResponseValidatorR4Test { QuestionnaireResponseItemComponent qaItem = qa.addItem().setLinkId("link0"); qaItem.addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -315,7 +314,7 @@ public class QuestionnaireResponseValidatorR4Test { qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); String reference = qa.getQuestionnaire(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -340,22 +339,22 @@ public class QuestionnaireResponseValidatorR4Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))) .thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -397,22 +396,22 @@ public class QuestionnaireResponseValidatorR4Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))) .thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -450,7 +449,7 @@ public class QuestionnaireResponseValidatorR4Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); @@ -483,7 +482,7 @@ public class QuestionnaireResponseValidatorR4Test { .setRequired(true); String reference = "http://example.com/Questionnaire/q1"; - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))) .thenReturn(q); QuestionnaireResponse qa = new QuestionnaireResponse(); @@ -512,28 +511,28 @@ public class QuestionnaireResponseValidatorR4Test { Questionnaire q = new Questionnaire(); QuestionnaireItemComponent item = q.addItem(); item.setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.OPENCHOICE).setAnswerValueSet("http://somevalueset"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setCode("Unknown code")); QuestionnaireResponse qa; ValidationResult errors; @@ -617,6 +616,7 @@ public class QuestionnaireResponseValidatorR4Test { qa.addItem().setLinkId("link0").addAnswer().setValue(new IntegerType(123)); errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); + assertThat(errors.toString(), containsString("Cannot validate integer answer option because no option list is provided")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); @@ -659,7 +659,7 @@ public class QuestionnaireResponseValidatorR4Test { .setRequired(true) .setType(QuestionnaireItemType.OPENCHOICE) .setAnswerOption(options); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); QuestionnaireResponse qa; ValidationResult errors; @@ -705,7 +705,7 @@ public class QuestionnaireResponseValidatorR4Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -723,7 +723,7 @@ public class QuestionnaireResponseValidatorR4Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link1").addItem().setLinkId("link2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -782,9 +782,9 @@ public class QuestionnaireResponseValidatorR4Test { .addAnswer() .setValue(new Coding(SYSTEMURI_ICC_SCHOOLTYPE, CODE_ICC_SCHOOLTYPE_PT, "")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(questionnaire); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE))).thenReturn(iccSchoolTypeVs); - when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(ValueSet.class) )).thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(CODE_ICC_SCHOOLTYPE_PT)))); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(questionnaire); + when(myValSupport.fetchResource(eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE))).thenReturn(iccSchoolTypeVs); + when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(), any(ValueSet.class))).thenReturn(new IValidationSupport.CodeValidationResult().setCode(CODE_ICC_SCHOOLTYPE_PT)); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireValidatorR4Test.java index b6b88d44c15..a184502f615 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireValidatorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/QuestionnaireValidatorR4Test.java @@ -1,15 +1,16 @@ package org.hl7.fhir.r4.validation; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.ValidationResult; import org.hamcrest.Matchers; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r4.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Enumerations.PublicationStatus; @@ -23,26 +24,30 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.stream.Collectors; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; public class QuestionnaireValidatorR4Test { private static final Logger ourLog = LoggerFactory.getLogger(QuestionnaireValidatorR4Test.class); - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forR4(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); private FhirInstanceValidator myInstanceVal; private FhirValidator myVal; @Before public void before() { IValidationSupport myValSupport = mock(IValidationSupport.class); + when(myValSupport.getFhirContext()).thenReturn(ourCtx); myVal = ourCtx.newValidator(); myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport); + ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport, new InMemoryTerminologyServerValidationSupport(ourCtx)); myInstanceVal = new FhirInstanceValidator(validationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -72,7 +77,7 @@ public class QuestionnaireValidatorR4Test { ValidationResult errors = myVal.validateWithResult(q); ourLog.info(errors.toString()); assertThat(errors.isSuccessful(), Matchers.is(true)); - assertThat(errors.getMessages(), Matchers.empty()); + assertThat(errors.getMessages().stream().filter(t->t.getSeverity().ordinal() > ResultSeverityEnum.INFORMATION.ordinal()).collect(Collectors.toList()), Matchers.empty()); } } diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/SnapshotGeneratorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/SnapshotGeneratorR4Test.java index 4af1bb66bbc..6951a9172e1 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/SnapshotGeneratorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/SnapshotGeneratorR4Test.java @@ -4,10 +4,10 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.api.EncodingEnum; import org.apache.commons.io.IOUtils; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r4.hapi.validation.SnapshotGeneratingValidationSupport; -import org.hl7.fhir.r4.hapi.validation.ValidationSupportChain; import org.hl7.fhir.r4.model.StructureDefinition; import org.junit.Test; import org.slf4j.Logger; @@ -31,12 +31,12 @@ public class SnapshotGeneratorR4Test { // Create a validation chain that includes default validation support and a // snapshot generator - DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(); - SnapshotGeneratingValidationSupport snapshotGenerator = new SnapshotGeneratingValidationSupport(myFhirCtx, defaultSupport); + DefaultProfileValidationSupport defaultSupport = new DefaultProfileValidationSupport(myFhirCtx); + SnapshotGeneratingValidationSupport snapshotGenerator = new SnapshotGeneratingValidationSupport(myFhirCtx); ValidationSupportChain chain = new ValidationSupportChain(defaultSupport, snapshotGenerator); // Generate the snapshot - StructureDefinition snapshot = chain.generateSnapshot(differential, "http://foo", null, "THE BEST PROFILE"); + StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(chain, differential, "http://foo", null, "THE BEST PROFILE"); ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(snapshot)); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/FhirInstanceValidatorR5Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/FhirInstanceValidatorR5Test.java index 888127d1e6c..a8357f361a8 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/FhirInstanceValidatorR5Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/FhirInstanceValidatorR5Test.java @@ -1,7 +1,10 @@ package org.hl7.fhir.r5.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +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.ValueSetExpansionOptions; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; @@ -10,19 +13,17 @@ import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; import com.google.common.base.Charsets; 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.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.hapi.validation.CachingValidationSupport; -import org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r5.hapi.validation.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.model.*; -import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; -import org.hl7.fhir.r5.model.Observation.ObservationStatus; -import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.r5.terminologies.ValueSetExpander; import org.hl7.fhir.r5.utils.IResourceValidator; +import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.junit.AfterClass; import org.junit.Before; @@ -54,15 +55,19 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class FhirInstanceValidatorR5Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirInstanceValidatorR5Test.class); - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forR5(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); @Rule public TestRule watcher = new TestWatcher() { @Override @@ -76,6 +81,7 @@ public class FhirInstanceValidatorR5Test { private FhirValidator myVal; private ArrayList myValidConcepts; private Set myValidSystems = new HashSet<>(); + private CachingValidationSupport myValidationSupport; private void addValidConcept(String theSystem, String theCode) { myValidSystems.add(theSystem); @@ -106,8 +112,9 @@ public class FhirInstanceValidatorR5Test { myVal.setValidateAgainstStandardSchematron(false); myMockSupport = mock(IValidationSupport.class); - CachingValidationSupport validationSupport = new CachingValidationSupport(new ValidationSupportChain(myMockSupport, myDefaultValidationSupport)); - myInstanceVal = new FhirInstanceValidator(validationSupport); + when(myMockSupport.getFhirContext()).thenReturn(ourCtx); + myValidationSupport = new CachingValidationSupport(new ValidationSupportChain(myMockSupport, myDefaultValidationSupport, new InMemoryTerminologyServerValidationSupport(ourCtx), new CommonCodeSystemsTerminologyService(ourCtx))); + myInstanceVal = new FhirInstanceValidator(myValidationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -115,11 +122,11 @@ public class FhirInstanceValidatorR5Test { myValidConcepts = new ArrayList<>(); - when(myMockSupport.expandValueSet(nullable(FhirContext.class), nullable(ConceptSetComponent.class))).thenAnswer(theInvocation -> { - ConceptSetComponent arg = (ConceptSetComponent) theInvocation.getArguments()[1]; - ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getSystem()); + when(myMockSupport.expandValueSet(any(), nullable(ValueSetExpansionOptions.class), nullable(IBaseResource.class))).thenAnswer(theInvocation -> { + ValueSet arg = (ValueSet) theInvocation.getArgument(2, IBaseResource.class); + ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem()); if (retVal == null) { - ValueSetExpander.ValueSetExpansionOutcome outcome = myDefaultValidationSupport.expandValueSet(ourCtx, arg); + IValidationSupport.ValueSetExpansionOutcome outcome = myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg); return outcome; } ourLog.debug("expandValueSet({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal}); @@ -128,7 +135,7 @@ public class FhirInstanceValidatorR5Test { valueset.setExpansion(retVal); return new ValueSetExpander.ValueSetExpansionOutcome(valueset); }); - when(myMockSupport.isCodeSystemSupported(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(myMockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer() { @Override public Boolean answer(InvocationOnMock theInvocation) throws Throwable { boolean retVal = myValidSystems.contains(theInvocation.getArguments()[1]); @@ -136,58 +143,62 @@ public class FhirInstanceValidatorR5Test { return retVal; } }); - when(myMockSupport.fetchResource(nullable(FhirContext.class), nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { + when(myMockSupport.fetchResource(nullable(Class.class), nullable(String.class))).thenAnswer(new Answer() { @Override public IBaseResource answer(InvocationOnMock theInvocation) throws Throwable { IBaseResource retVal; - String id = (String) theInvocation.getArguments()[2]; + String id = (String) theInvocation.getArguments()[1]; + Class clazz = (Class) theInvocation.getArguments()[0]; if ("Questionnaire/q_jon".equals(id)) { retVal = ourCtx.newJsonParser().parseResource(IOUtils.toString(FhirInstanceValidatorR5Test.class.getResourceAsStream("/q_jon.json"))); } else { - retVal = myDefaultValidationSupport.fetchResource((FhirContext) theInvocation.getArguments()[0], (Class) theInvocation.getArguments()[1], id); + retVal = myDefaultValidationSupport.fetchResource(clazz, id); } - ourLog.debug("fetchResource({}, {}) : {}", theInvocation.getArguments()[1], id, retVal); + ourLog.debug("fetchResource({}, {}) : {}", clazz, id, retVal); return retVal; } }); - when(myMockSupport.validateCode(nullable(FhirContext.class), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { + when(myMockSupport.validateCode(any(), any(), nullable(String.class), nullable(String.class), nullable(String.class), nullable(String.class))).thenAnswer(new Answer() { @Override - public IContextValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { - FhirContext ctx = theInvocation.getArgument(0, FhirContext.class); - String system = theInvocation.getArgument(1, String.class); - String code = theInvocation.getArgument(2, String.class); - String display = theInvocation.getArgument(3, String.class); - String valueSetUrl = theInvocation.getArgument(4, String.class); - IContextValidationSupport.CodeValidationResult retVal; + public IValidationSupport.CodeValidationResult answer(InvocationOnMock theInvocation) { + ConceptValidationOptions options = theInvocation.getArgument(1, ConceptValidationOptions.class); + String system = theInvocation.getArgument(2, String.class); + String code = theInvocation.getArgument(3, String.class); + String display = theInvocation.getArgument(4, String.class); + String valueSetUrl = theInvocation.getArgument(5, String.class); + IValidationSupport.CodeValidationResult retVal; if (myValidConcepts.contains(system + "___" + code)) { - retVal = new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(code))); + retVal = new IValidationSupport.CodeValidationResult().setCode(code); + } else if (myValidSystems.contains(system)) { + return new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.WARNING).setMessage("Unknown code: " + system + " / " + code); } else { - retVal = myDefaultValidationSupport.validateCode(ctx, system, code, display, valueSetUrl); + retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl); } ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal); return retVal; } }); - when(myMockSupport.fetchCodeSystem(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(myMockSupport.fetchCodeSystem(nullable(String.class))).thenAnswer(new Answer() { @Override public CodeSystem answer(InvocationOnMock theInvocation) { - CodeSystem retVal = myDefaultValidationSupport.fetchCodeSystem((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]); - ourLog.debug("fetchCodeSystem({}) : {}", new Object[]{theInvocation.getArguments()[1], retVal}); + String codeSystem = (String) theInvocation.getArguments()[0]; + CodeSystem retVal = (CodeSystem) myDefaultValidationSupport.fetchCodeSystem(codeSystem); + ourLog.debug("fetchCodeSystem({}) : {}", new Object[]{codeSystem, retVal}); return retVal; } }); - when(myMockSupport.fetchStructureDefinition(nullable(FhirContext.class), nullable(String.class))).thenAnswer(new Answer() { + when(myMockSupport.fetchStructureDefinition(nullable(String.class))).thenAnswer(new Answer() { @Override public StructureDefinition answer(InvocationOnMock theInvocation) { - StructureDefinition retVal = myDefaultValidationSupport.fetchStructureDefinition((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]); - ourLog.debug("fetchStructureDefinition({}) : {}", new Object[]{theInvocation.getArguments()[1], retVal}); + StructureDefinition retVal = (StructureDefinition) myDefaultValidationSupport.fetchStructureDefinition((String) theInvocation.getArguments()[1]); + ourLog.debug("fetchStructureDefinition({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal}); return retVal; } }); - when(myMockSupport.fetchAllStructureDefinitions(nullable(FhirContext.class))).thenAnswer(new Answer>() { + when(myMockSupport.fetchAllStructureDefinitions()).thenAnswer(new Answer>() { @Override public List answer(InvocationOnMock theInvocation) { - List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions((FhirContext) theInvocation.getArguments()[0]); + List retVal = myDefaultValidationSupport.fetchAllStructureDefinitions(); ourLog.debug("fetchAllStructureDefinitions()", new Object[]{}); return retVal; } @@ -223,12 +234,12 @@ public class FhirInstanceValidatorR5Test { .setCode("AA "); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(p); List all = logResultsAndReturnErrorOnes(result); assertFalse(result.isSuccessful()); - assertEquals("The code 'AA ' is not valid (whitespace rules)", all.get(0).getMessage()); + assertEquals("The code \"AA \" is not valid (whitespace rules)", all.get(0).getMessage()); } @@ -246,12 +257,12 @@ public class FhirInstanceValidatorR5Test { ""; FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(input); List all = logResultsAndReturnAll(result); assertFalse(result.isSuccessful()); - assertEquals("Primitive types must have a value that is not empty", all.get(0).getMessage()); + assertEquals("ele-1: All FHIR elements must have a @value or children [hasValue() or (children().count() > id.count())]", all.get(0).getMessage()); } /** @@ -261,7 +272,7 @@ public class FhirInstanceValidatorR5Test { public void testValidateDoesntEnforceBestPracticesByDefault() { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - input.setStatus(ObservationStatus.AMENDED); + input.setStatus(Enumerations.ObservationStatus.AMENDED); input.getCode().addCoding().setSystem("http://loinc.org").setCode("1234").setDisplay("FOO"); FhirInstanceValidator instanceModule; @@ -271,7 +282,7 @@ public class FhirInstanceValidatorR5Test { // With BPs disabled val = ourCtx.newValidator(); - instanceModule = new FhirInstanceValidator(myDefaultValidationSupport); + instanceModule = new FhirInstanceValidator(myValidationSupport); val.registerValidatorModule(instanceModule); result = val.validateWithResult(input); all = logResultsAndReturnAll(result); @@ -280,7 +291,7 @@ public class FhirInstanceValidatorR5Test { // With BPs enabled val = ourCtx.newValidator(); - instanceModule = new FhirInstanceValidator(myDefaultValidationSupport); + instanceModule = new FhirInstanceValidator(myValidationSupport); IResourceValidator.BestPracticeWarningLevel level = IResourceValidator.BestPracticeWarningLevel.Error; instanceModule.setBestPracticeWarningLevel(level); val.registerValidatorModule(instanceModule); @@ -292,7 +303,7 @@ public class FhirInstanceValidatorR5Test { private List logResultsAndReturnNonInformationalOnes(ValidationResult theOutput) { - List retVal = new ArrayList(); + List retVal = new ArrayList<>(); int index = 0; for (SingleValidationMessage next : theOutput.getMessages()) { @@ -308,7 +319,7 @@ public class FhirInstanceValidatorR5Test { } private List logResultsAndReturnErrorOnes(ValidationResult theOutput) { - List retVal = new ArrayList(); + List retVal = new ArrayList<>(); int index = 0; for (SingleValidationMessage next : theOutput.getMessages()) { @@ -364,12 +375,10 @@ public class FhirInstanceValidatorR5Test { } - // FIXME: enable and change performed to occurrence @Test - @Ignore public void testCompareTimesWithDifferentTimezones() { Procedure procedure = new Procedure(); - procedure.setStatus(Procedure.ProcedureStatus.COMPLETED); + procedure.setStatus(Enumerations.EventStatus.COMPLETED); procedure.getSubject().setReference("Patient/1"); procedure.getCode().setText("Some proc"); @@ -380,7 +389,7 @@ public class FhirInstanceValidatorR5Test { procedure.setOccurrence(period); FhirValidator val = ourCtx.newValidator(); - val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + val.registerValidatorModule(new FhirInstanceValidator(myValidationSupport)); ValidationResult result = val.validateWithResult(procedure); @@ -418,6 +427,23 @@ public class FhirInstanceValidatorR5Test { assertThat(nonInfo, empty()); } + + + @Test + public void testInvocationOfValidatorFetcher() throws IOException { + + String input = IOUtils.toString(FhirInstanceValidator.class.getResourceAsStream("/vitals.json"), Charsets.UTF_8); + + IResourceValidator.IValidatorResourceFetcher resourceFetcher = mock(IResourceValidator.IValidatorResourceFetcher.class); + when(resourceFetcher.validationPolicy(any(),anyString(), anyString())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); + myInstanceVal.setValidatorResourceFetcher(resourceFetcher); + myVal.validateWithResult(input); + + verify(resourceFetcher, times(12)).resolveURL(any(), anyString(), anyString()); + verify(resourceFetcher, times(3)).validationPolicy(any(), anyString(), anyString()); + verify(resourceFetcher, times(3)).fetch(any(), anyString()); + } + @Test public void testIsNoTerminologyChecks() { assertFalse(myInstanceVal.isNoTerminologyChecks()); @@ -595,8 +621,8 @@ public class FhirInstanceValidatorR5Test { List messages = logResultsAndReturnNonInformationalOnes(output); assertEquals(output.toString(), 3, messages.size()); assertThat(messages.get(0).getMessage(), containsString("Element must have some content")); - assertThat(messages.get(1).getMessage(), containsString("Primitive types must have a value or must have child extensions")); - assertThat(messages.get(2).getMessage(), containsString("All FHIR elements must have a @value or children [hasValue() or (children().count() > id.count())]")); + assertThat(messages.get(1).getMessage(), containsString("ele-1: All FHIR elements must have a @value or children [hasValue() or (children().count() > id.count())]")); + assertThat(messages.get(2).getMessage(), containsString("Primitive types must have a value or must have child extensions")); } @Test @@ -636,7 +662,6 @@ public class FhirInstanceValidatorR5Test { @Test public void testValidateRawXmlWithMissingRootNamespace() { - //@formatter:off String input = "" + "" + " " @@ -651,11 +676,10 @@ public class FhirInstanceValidatorR5Test { + " " + " " + ""; - //@formatter:on ValidationResult output = myVal.validateWithResult(input); assertEquals(output.toString(), 1, output.getMessages().size()); - assertEquals("This 'Patient' cannot be parsed as a FHIR object (no namespace)", output.getMessages().get(0).getMessage()); + assertEquals("This \"Patient2 cannot be parsed as a FHIR object (no namespace)", output.getMessages().get(0).getMessage()); ourLog.info(output.getMessages().get(0).getLocationString()); } @@ -729,10 +753,10 @@ public class FhirInstanceValidatorR5Test { input.addIdentifier().setSystem("http://acme").setValue("12345"); input.getEncounter().setReference("http://foo.com/Encounter/9"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnAll(output); @@ -750,10 +774,10 @@ public class FhirInstanceValidatorR5Test { input.addIdentifier().setSystem("http://acme").setValue("12345"); input.getEncounter().setReference("http://foo.com/Encounter/9"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); @@ -772,12 +796,12 @@ public class FhirInstanceValidatorR5Test { input.getMeta().addProfile("http://foo/structuredefinition/myprofile"); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); ValidationResult output = myVal.validateWithResult(input); List errors = logResultsAndReturnNonInformationalOnes(output); - assertThat(errors.toString(), containsString("StructureDefinition reference \"http://foo/structuredefinition/myprofile\" could not be resolved")); + assertThat(errors.toString(), containsString("Profile reference \"http://foo/structuredefinition/myprofile\" could not be resolved, so has not been checked")); } @Test @@ -800,7 +824,7 @@ public class FhirInstanceValidatorR5Test { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().setText("No code here!"); ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(input)); @@ -825,7 +849,7 @@ public class FhirInstanceValidatorR5Test { ValidationResult output = myVal.validateWithResult(input); logResultsAndReturnAll(output); assertEquals( - "The value provided ('notvalidcode') is not in the value set http://hl7.org/fhir/ValueSet/observation-status|4.1.0 (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code[notvalidcode] in system[(none)])", + "The value provided (\"notvalidcode\") is not in the value set http://hl7.org/fhir/ValueSet/observation-status|4.2.0 (http://hl7.org/fhir/ValueSet/observation-status, and a code is required from this value set) (error message = Unknown code 'notvalidcode')", output.getMessages().get(0).getMessage()); } @@ -834,9 +858,9 @@ public class FhirInstanceValidatorR5Test { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); ValidationResult output = myVal.validateWithResult(input); @@ -850,10 +874,10 @@ public class FhirInstanceValidatorR5Test { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://acme.org").setCode("9988877"); ValidationResult output = myVal.validateWithResult(input); @@ -868,10 +892,10 @@ public class FhirInstanceValidatorR5Test { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("12345"); ValidationResult output = myVal.validateWithResult(input); @@ -888,10 +912,10 @@ public class FhirInstanceValidatorR5Test { expansionComponent.addContains().setSystem("http://loinc.org").setCode("12345").setDisplay("Some display code"); mySupportedCodeSystemsForExpansion.put("http://loinc.org", expansionComponent); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://loinc.org", "12345"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://loinc.org").setCode("1234"); ValidationResult output = myVal.validateWithResult(input); @@ -905,10 +929,10 @@ public class FhirInstanceValidatorR5Test { Observation input = new Observation(); input.getText().setDiv(new XhtmlNode().setValue("
    AA
    ")).setStatus(Narrative.NarrativeStatus.GENERATED); - myInstanceVal.setValidationSupport(myMockSupport); + myInstanceVal.setValidationSupport(myValidationSupport); addValidConcept("http://acme.org", "12345"); - input.setStatus(ObservationStatus.FINAL); + input.setStatus(Enumerations.ObservationStatus.FINAL); input.getCode().addCoding().setSystem("http://acme.org").setCode("12345"); ValidationResult output = myVal.validateWithResult(input); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/QuestionnaireResponseValidatorR5Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/QuestionnaireResponseValidatorR5Test.java index 474a80836be..d4090b0cc9f 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/QuestionnaireResponseValidatorR5Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r5/validation/QuestionnaireResponseValidatorR5Test.java @@ -1,26 +1,24 @@ package org.hl7.fhir.r5.validation; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.IContextValidationSupport; +import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; +import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationResult; -import org.hl7.fhir.r5.hapi.ctx.DefaultProfileValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport; +import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; +import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext; -import org.hl7.fhir.r5.hapi.ctx.IValidationSupport; -import org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator; -import org.hl7.fhir.r5.hapi.validation.ValidationSupportChain; import org.hl7.fhir.r5.model.*; import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode; -import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType; import org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; import org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseStatus; -import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.junit.AfterClass; import org.junit.Before; @@ -49,8 +47,8 @@ public class QuestionnaireResponseValidatorR5Test { private static final String CODE_ICC_SCHOOLTYPE_PT = "PT"; private static final String ID_VS_SCHOOLTYPE = "ValueSet/schooltype"; private static final String SYSTEMURI_ICC_SCHOOLTYPE = "http://ehealthinnovation/icc/ns/schooltype"; - private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(); private static FhirContext ourCtx = FhirContext.forR5(); + private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport(ourCtx); private FhirInstanceValidator myInstanceVal; private FhirValidator myVal; private IValidationSupport myValSupport; @@ -59,14 +57,15 @@ public class QuestionnaireResponseValidatorR5Test { @Before public void before() { myValSupport = mock(IValidationSupport.class); - // new DefaultProfileValidationSupport(); + when(myValSupport.getFhirContext()).thenReturn(ourCtx); + myWorkerCtx = new HapiWorkerContext(ourCtx, myValSupport); myVal = ourCtx.newValidator(); myVal.setValidateAgainstStandardSchema(false); myVal.setValidateAgainstStandardSchematron(false); - ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport); + ValidationSupportChain validationSupport = new ValidationSupportChain(myDefaultValidationSupport, myValSupport, new InMemoryTerminologyServerValidationSupport(ourCtx)); myInstanceVal = new FhirInstanceValidator(validationSupport); myVal.registerValidatorModule(myInstanceVal); @@ -91,16 +90,16 @@ public class QuestionnaireResponseValidatorR5Test { codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCode(any(), any(), any(), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); - when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); + when(myValSupport.validateCode(any(), any(), any(), any(), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); + when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); int itemCnt = 16; QuestionnaireItemType[] questionnaireItemTypes = new QuestionnaireItemType[itemCnt]; @@ -121,7 +120,7 @@ public class QuestionnaireResponseValidatorR5Test { questionnaireItemTypes[14] = QuestionnaireItemType.REFERENCE; questionnaireItemTypes[15] = QuestionnaireItemType.QUANTITY; - Type[] answerValues = new Type[itemCnt]; + DataType[] answerValues = new DataType[itemCnt]; answerValues[0] = new BooleanType(true); answerValues[1] = new DecimalType(42.0); answerValues[2] = new IntegerType(42); @@ -161,7 +160,7 @@ public class QuestionnaireResponseValidatorR5Test { qa.setQuestionnaire("http://example.com/Questionnaire/q" + i); qa.addItem().setLinkId(linkId).addAnswer().setValue(answerValues[i]); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); @@ -182,7 +181,7 @@ public class QuestionnaireResponseValidatorR5Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaireElement().getValue()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaireElement().getValue()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); @@ -196,35 +195,35 @@ public class QuestionnaireResponseValidatorR5Test { Questionnaire q = new Questionnaire(); q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setAnswerValueSet("http://somevalueset"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq("http://example.com/Questionnaire/q1"))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq("http://example.com/Questionnaire/q1"))).thenReturn(q); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system"))).thenReturn(true); when(myValSupport.isCodeSystemSupported(any(), eq("http://codesystems.com/system2"))).thenReturn(true); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCodeInValueSet(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCodeInValueSet(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(ValueSet.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); QuestionnaireResponse qa; ValidationResult errors; @@ -250,7 +249,7 @@ public class QuestionnaireResponseValidatorR5Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code for 'http://codesystems.com/system#code1' - QuestionnaireResponse.item[0].answer[0].value.ofType(Coding)")); + assertThat(errors.toString(), containsString("Unknown code for \"http://codesystems.com/system#code1\"")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); qa = new QuestionnaireResponse(); @@ -261,7 +260,7 @@ public class QuestionnaireResponseValidatorR5Test { errors = myVal.validateWithResult(qa); errors = stripBindingHasNoSourceMessage(errors); ourLog.info(errors.toString()); - assertThat(errors.toString(), containsString("Unknown code: http://codesystems.com/system2 / code3")); + assertThat(errors.toString(), containsString("Unknown code 'http://codesystems.com/system2#code3' for \"http://codesystems.com/system2#code3\"")); assertThat(errors.toString(), containsString("QuestionnaireResponse.item[0].answer[0]")); } @@ -278,7 +277,7 @@ public class QuestionnaireResponseValidatorR5Test { QuestionnaireResponseItemComponent qaGroup = qa.addItem(); qaGroup.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -298,7 +297,7 @@ public class QuestionnaireResponseValidatorR5Test { QuestionnaireResponseItemComponent qaItem = qa.addItem().setLinkId("link0"); qaItem.addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -319,7 +318,7 @@ public class QuestionnaireResponseValidatorR5Test { qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); String reference = qa.getQuestionnaire(); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -344,22 +343,21 @@ public class QuestionnaireResponseValidatorR5Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) - .thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))).thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -401,22 +399,21 @@ public class QuestionnaireResponseValidatorR5Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl(codeSystemUrl); codeSystem.addConcept().setCode(codeValue); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq(codeSystemUrl))) - .thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq(codeSystemUrl))).thenReturn(codeSystem); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem(codeSystemUrl).addConcept().setCode(codeValue); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(valueSetRef))) + when(myValSupport.fetchResource(eq(ValueSet.class), eq(valueSetRef))) .thenReturn(options); - when(myValSupport.validateCode(any(FhirContext.class), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(codeValue)))); + when(myValSupport.validateCode(any(), any(), eq(codeSystemUrl), eq(codeValue), any(String.class), anyString())) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode(codeValue)); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); String qXml = xmlParser.encodeResourceToString(q); @@ -454,7 +451,7 @@ public class QuestionnaireResponseValidatorR5Test { Questionnaire q = new Questionnaire(); q.addItem(item1); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))) .thenReturn(q); IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); @@ -487,7 +484,7 @@ public class QuestionnaireResponseValidatorR5Test { .setRequired(true); String reference = "http://example.com/Questionnaire/q1"; - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))) + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(reference))) .thenReturn(q); QuestionnaireResponse qa = new QuestionnaireResponse(); @@ -516,29 +513,29 @@ public class QuestionnaireResponseValidatorR5Test { Questionnaire q = new Questionnaire(); QuestionnaireItemComponent item = q.addItem(); item.setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.OPENCHOICE).setAnswerValueSet("http://somevalueset"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q); CodeSystem codeSystem = new CodeSystem(); codeSystem.setContent(CodeSystemContentMode.COMPLETE); codeSystem.setUrl("http://codesystems.com/system"); codeSystem.addConcept().setCode("code0"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system"))).thenReturn(codeSystem); CodeSystem codeSystem2 = new CodeSystem(); codeSystem2.setContent(CodeSystemContentMode.COMPLETE); codeSystem2.setUrl("http://codesystems.com/system2"); codeSystem2.addConcept().setCode("code2"); - when(myValSupport.fetchCodeSystem(any(FhirContext.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); + when(myValSupport.fetchCodeSystem(eq("http://codesystems.com/system2"))).thenReturn(codeSystem2); ValueSet options = new ValueSet(); options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0"); options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); + when(myValSupport.fetchResource(eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent().setCode("code0"))); - when(myValSupport.validateCode(any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) - .thenReturn(new IContextValidationSupport.CodeValidationResult(ValidationMessage.IssueSeverity.ERROR, "Unknown code")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code0"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setCode("code0")); + when(myValSupport.validateCode(any(), any(), eq("http://codesystems.com/system"), eq("code1"), any(), nullable(String.class))) + .thenReturn(new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.ERROR).setMessage("Unknown code")); QuestionnaireResponse qa; ValidationResult errors; @@ -600,7 +597,7 @@ public class QuestionnaireResponseValidatorR5Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -618,7 +615,7 @@ public class QuestionnaireResponseValidatorR5Test { qa.getQuestionnaireElement().setValue("http://example.com/Questionnaire/q1"); qa.addItem().setLinkId("link1").addItem().setLinkId("link2"); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(q); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); @@ -677,9 +674,9 @@ public class QuestionnaireResponseValidatorR5Test { .addAnswer() .setValue(new Coding(SYSTEMURI_ICC_SCHOOLTYPE, CODE_ICC_SCHOOLTYPE_PT, "")); - when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(questionnaire); - when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE))).thenReturn(iccSchoolTypeVs); - when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(ValueSet.class) )).thenReturn(new IContextValidationSupport.CodeValidationResult(new ConceptDefinitionComponent(new CodeType(CODE_ICC_SCHOOLTYPE_PT)))); + when(myValSupport.fetchResource(eq(Questionnaire.class), eq(qa.getQuestionnaire()))).thenReturn(questionnaire); + when(myValSupport.fetchResource(eq(ValueSet.class), eq(ID_VS_SCHOOLTYPE))).thenReturn(iccSchoolTypeVs); + when(myValSupport.validateCodeInValueSet(any(), any(), any(), any(), any(), any(ValueSet.class))).thenReturn(new IValidationSupport.CodeValidationResult().setCode(CODE_ICC_SCHOOLTYPE_PT)); ValidationResult errors = myVal.validateWithResult(qa); ourLog.info(errors.toString()); diff --git a/hapi-fhir-validation/src/test/resources/r4/myconsent-ext.xml b/hapi-fhir-validation/src/test/resources/r4/myconsent-ext.xml new file mode 100644 index 00000000000..2049e440b22 --- /dev/null +++ b/hapi-fhir-validation/src/test/resources/r4/myconsent-ext.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation/src/test/resources/r4/myconsent-profile.xml b/hapi-fhir-validation/src/test/resources/r4/myconsent-profile.xml new file mode 100644 index 00000000000..0396797fe88 --- /dev/null +++ b/hapi-fhir-validation/src/test/resources/r4/myconsent-profile.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation/src/test/resources/vitals.json b/hapi-fhir-validation/src/test/resources/vitals.json new file mode 100644 index 00000000000..78b3e733c6b --- /dev/null +++ b/hapi-fhir-validation/src/test/resources/vitals.json @@ -0,0 +1,97 @@ +{ + "resourceType": "Observation", + "id": "satO2", + "meta": { + "profile": [ + "http://hl7.org/fhir/StructureDefinition/vitalsigns" + ] + }, + "text": { + "status": "generated", + "div": "

    Generated Narrative with Details

    id: satO2

    meta:

    identifier: o1223435-10

    partOf: Procedure/ob

    status: final

    category: Vital Signs (Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})

    code: Oxygen saturation in Arterial blood (Details : {LOINC code '2708-6' = 'Oxygen saturation in Arterial blood', given as 'Oxygen saturation in Arterial blood'}; {LOINC code '59408-5' = 'Oxygen saturation in Arterial blood by Pulse oximetry', given as 'Oxygen saturation in Arterial blood by Pulse oximetry'}; {urn:iso:std:iso:11073:10101 code '150456' = '150456', given as 'MDC_PULS_OXIM_SAT_O2'})

    subject: Patient/example

    effective: Dec 5, 2014 9:30:10 AM

    value: 95 % (Details: UCUM code % = '%')

    interpretation: Normal (applies to non-numeric results) (Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'N' = 'Normal', given as 'Normal'})

    device: DeviceMetric/example

    ReferenceRanges

    -LowHigh
    *90 % (Details: UCUM code % = '%')99 % (Details: UCUM code % = '%')
    " + }, + "identifier": [ + { + "system": "http://goodcare.org/observation/id", + "value": "o1223435-10" + } + ], + "partOf": [ + { + "reference": "Procedure/ob" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "2708-6", + "display": "Oxygen saturation in Arterial blood" + }, + { + "system": "http://loinc.org", + "code": "59408-5", + "display": "Oxygen saturation in Arterial blood by Pulse oximetry" + }, + { + "system": "urn:iso:std:iso:11073:10101", + "code": "150456", + "display": "MDC_PULS_OXIM_SAT_O2" + } + ] + }, + "subject": { + "reference": "Patient/example" + }, + "effectiveDateTime": "2014-12-05T09:30:10+01:00", + "valueQuantity": { + "value": 95, + "unit": "%", + "system": "http://unitsofmeasure.org", + "code": "%" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "N", + "display": "Normal" + } + ], + "text": "Normal (applies to non-numeric results)" + } + ], + "device": { + "reference": "DeviceMetric/example" + }, + "referenceRange": [ + { + "low": { + "value": 90, + "unit": "%", + "system": "http://unitsofmeasure.org", + "code": "%" + }, + "high": { + "value": 99, + "unit": "%", + "system": "http://unitsofmeasure.org", + "code": "%" + } + } + ] +} diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index ec1362ebd4c..fc2f9f2cdc9 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 5863caf9dee..06a10a7948b 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -27,7 +27,6 @@ import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.*; import ca.uhn.fhir.context.*; -import ca.uhn.fhir.context.support.IContextValidationSupport; import ca.uhn.fhir.fluentpath.IFluentPath; import ca.uhn.fhir.model.api.*; import ca.uhn.fhir.model.base.composite.*; @@ -35,7 +34,6 @@ import ca.uhn.fhir.model.dstu2.composite.*; import ca.uhn.fhir.model.dstu2.resource.StructureDefinition; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.IVersionSpecificBundleFactory; -import ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactory; import ca.uhn.fhir.util.ReflectionUtil; public class FhirDstu2 implements IFhirVersion { @@ -48,11 +46,6 @@ public class FhirDstu2 implements IFhirVersion { } - @Override - public IContextValidationSupport createValidationSupport() { - throw new UnsupportedOperationException("Validation support is not supported in DSTU2 contexts"); - } - @Override public IResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { StructureDefinition retVal = new StructureDefinition(); diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java index b97672c8fd7..c5945196fc7 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java @@ -261,6 +261,14 @@ public class ResourceMinimizerMojo extends AbstractMojo { byteCount += m.getByteCount(); fileCount += m.getFileCount(); + m = new ResourceMinimizerMojo(); + m.myCtx = ctxR5; + m.targetDirectory = new File("./hapi-fhir-validation-resources-r5/src/main/resources/org/hl7/fhir/r5/model/extension"); + m.fhirVersion = "R5"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + ourLog.info("Trimmed {} files", fileCount); ourLog.info("Trimmed {} bytes", FileUtils.byteCountToDisplaySize(byteCount)); } diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 9e07aca1de0..61fb0758709 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/osgi/hapi-fhir-karaf-integration-tests/src/test/java/ca/uhn/fhir/tests/integration/karaf/dstu3/ResourceValidatorDstu3FeatureTest.java b/osgi/hapi-fhir-karaf-integration-tests/src/test/java/ca/uhn/fhir/tests/integration/karaf/dstu3/ResourceValidatorDstu3FeatureTest.java index 356ef1b1d3a..c2833b3395c 100644 --- a/osgi/hapi-fhir-karaf-integration-tests/src/test/java/ca/uhn/fhir/tests/integration/karaf/dstu3/ResourceValidatorDstu3FeatureTest.java +++ b/osgi/hapi-fhir-karaf-integration-tests/src/test/java/ca/uhn/fhir/tests/integration/karaf/dstu3/ResourceValidatorDstu3FeatureTest.java @@ -10,7 +10,7 @@ import ca.uhn.fhir.tests.integration.karaf.ValidationConstants; import ca.uhn.fhir.validation.*; import ca.uhn.fhir.validation.schematron.SchematronBaseValidator; import org.hamcrest.core.StringContains; -import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator; +import org.hl7.fhir.r5.hapi.validation.FhirInstanceValidator; import org.hl7.fhir.dstu3.model.*; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/pom.xml b/pom.xml index 53d60c56cb4..bf88321d7d5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io @@ -587,6 +587,14 @@ jiaola Dazhi Jiao + + dionmcm + + + ttntrifork + Trifork + Tue Toft Nørgård + @@ -598,7 +606,7 @@ - 4.1.7-SNAPSHOT + 4.2.9-SNAPSHOT 1.0.2 -Dfile.encoding=UTF-8 -Xmx2048m @@ -637,9 +645,9 @@ 3.0.2 6.1.0 - 5.4.6.Final + 5.4.12.Final - 5.11.3.Final + 5.11.5.Final 5.5.5 5.4.2.Final 4.4.11 @@ -655,7 +663,7 @@ 9.5.1-5_1 1.2_5 1.7.28 - 5.2.1.RELEASE + 5.2.3.RELEASE 2.2.0.RELEASE 2.2.0.RELEASE @@ -671,6 +679,7 @@ UTF-8 1.0.1 + 1.13.0 5.4.1 @@ -1028,6 +1037,11 @@ httpcore ${httpcore_version} + + co.elastic.apm + apm-agent-api + ${elastic_apm_version} + org.apache.jena apache-jena-libs @@ -1313,12 +1327,12 @@ org.postgresql postgresql - 42.2.8 + 42.2.9 org.quartz-scheduler quartz - 2.3.1 + 2.3.2 org.slf4j @@ -1899,12 +1913,12 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.0.0 + 3.1.0 com.puppycrawl.tools checkstyle - 8.18 + 8.29 @@ -2422,51 +2436,13 @@ - - SITE - - hapi-fhir-base - hapi-fhir-structures-dstu2 - hapi-fhir-structures-dstu3 - hapi-fhir-structures-r4 - hapi-fhir-structures-r5 - hapi-fhir-client - hapi-fhir-server - hapi-fhir-jpaserver-model - hapi-fhir-jpaserver-searchparam - hapi-fhir-jpaserver-subscription - hapi-fhir-jpaserver-base - hapi-fhir-jaxrsserver-base - - examples - - - - - org.codehaus.mojo - findbugs-maven-plugin - 3.0.5 - - ./hapi-fhir-base/target/classes - - - - - findbugs - - - - - - - ALLMODULES true - hapi-fhir-bom + hapi-fhir-bom hapi-deployable-pom hapi-fhir-base hapi-fhir-docs @@ -2504,7 +2480,6 @@ hapi-fhir-android hapi-fhir-cli hapi-fhir-dist - examples @@ -2552,6 +2527,30 @@ -Dfile.encoding=UTF-8 -Xmx2048m -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -Xverify:none -Dfile.encoding=UTF-8 -Xss128M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=2048M + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + validate + generate-sources + + src/checkstyle/checkstyle_config_nofixmes.xml + UTF-8 + true + true + false + + + check + + + + + + NOPARALLEL diff --git a/restful-server-example/pom.xml b/restful-server-example/pom.xml index 69440e2adf4..7e6fd15196a 100644 --- a/restful-server-example/pom.xml +++ b/restful-server-example/pom.xml @@ -8,7 +8,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../pom.xml diff --git a/src/changes/changes.xml b/src/changes/changes.xml deleted file mode 100644 index 498233d327a..00000000000 --- a/src/changes/changes.xml +++ /dev/null @@ -1,7460 +0,0 @@ - - - - James Agnew - HAPI FHIR Changelog - - - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Jetty (CLI): 9.4.14.v20181114 -> 9.4.23.v20191118
  • - - ]]> -
    - - As of FHIR R4, some fields that were previously of type reference are now of type canonical. - One example is QuestionnaireResponse.questionnaire. Technically this means that this field - should no longer contain a relative reference, but as they are sometimes used that way, HAPI - FHIR will now try to be permissive and will index relative link canonical fields - such as (Questionnaire/123) as though it actually was a local relative link. Thanks to - Dean Atchley for reporting and providing a test case! - - - ValueSet PreCalculation did not successfully expand valuesets when Lucene was not enabled - in the JPA server. This has been corrected. - - - When parsing Bundle resources containing other resources, XML/JSON parsers have an option called - "override resource ID with bundle entry fullUrl". This option previously caused any value - found in Bundle.entry.fullUrl to override any value found in - Bundle.entry.resource.id (meaning that the parsed resource would take its ID from - the fullUrl even if that ID disagreed with the ID found in the resource itself. As of - HAPI FHIR 4.1.0 the value in Bundle.entry.fullUrl will only be used to set the parsed resource - ID if the resource has no ID present. - - - Chained searches using the _has search parameter as the chain value are now supported by - the JPA server. - - - Changed database migration to use flyway. This adds a new table called FLY_HFJ_MIGRATION that records all - database migration tasks that have already been applied. The hapi-fhir-cli migrate tool has been changed - to use flyway. Learn more about flyway here: https://flywaydb.org/. - - - ValueSet Precalculation sometimes failed on Oracle DBs due to an invalid SQL function. This - has been corrected. - - - A ConcurrentModificationException was sometimes thrown when performing a cascading delete. - This has been corrected. - - - The constructor for Verdict.java was inadvertantly made private, preventing custom - rules from being written. Thanks to Jafer Khan for the pull request! - - - The - IRestfulClient#registerInterceptor
    - and - IRestfulClient#unregisterInterceptor - ]]> - methods now take Object as an argument instead of IClientInterceptor, allowing - client interceptors to now be migrated to the new interceptor - framework. - - - A missing mandatory was added to the SNOMED CT CodeSystem that is uploaded when SCT is - uploaded to the JPA server. Thanks to Anders Havn for the pull request! - - - An issue with the HAPI FHIR CLI was corrected that prevented the upload of LOINC due to an error - regarding the properties file. - - - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • SLF4j (All): 1.7.25 -> 1.7.28
  • -
  • Spring (JPA): 5.1.8.Final -> 5.2.0.Final
  • -
  • Hibernate Core (JPA): 5.4.2.Final -> 5.4.6.Final
  • -
  • Hibernate Search (JPA): 5.11.1.Final -> 5.11.3.Final
  • -
  • Jackson Databind (JPA): 2.9.9 -> 2.9.10 (CVE-2019-16335, CVE-2019-14540)
  • -
  • Commons-DBCP2 (JPA): 2.6.0 -> 2.7.0
  • -
  • Postgresql JDBC Driver (JPA): 42.2.6.jre7 -> 42.2.8
  • -
  • MSSQL JDBC Driver (JPA): 7.0.0.jre8 -> 7.4.1.jre8
  • -
  • Spring Boot (Boot): 2.1.1 -> 2.2.0
  • -
  • Phloc Schematron (Validator): 5.0.4 -> 5.2.0
  • -
  • Phloc Commons (Validator): 9.1.1 -> 9.3.8
  • - - ]]> -
    - - - New Feature: - The JPA server now saves and supports searching on Resource.meta.source via the - _source search parameter. The server automatically - appends the Request ID as a hash value on the URI as well in order to provide request level tracking. Searches - can use either the source URI, the request ID, or both. - ]]> - - - New Feature: - Support for the FHIR Bulk Data Export specification has been added to the JPA server. See the - specification for information on how this works. Note that - only system level export is currently supported but others will follow. - ]]> - - - New Feature: - Support for ElasticSearch has been added to the JPA server directly (i.e. without needing a separate - module) and a new class called "ElasticsearchHibernatePropertiesBuilder" has been added to facilitate - the creation of relevant properties. Instructions have been added to the hapi-fhir-jpaserver-starter - project to get started with Elasticsearch. It is likely we will switch our default recommendation - to Elastic in the future. - ]]> - - - New Feature: - A new set of operations have been added to the JPA server that allow CodeSystem deltas to be - uploaded. A CodeSystem Delta consists of a set of codes and relationships that are added or - removed incrementally to the live CodeSystem without requiring a downtime or a complete - upload of the contents. Deltas may be specified using either a custom CSV format or a partial - CodeSystem resource. -
    - In addition, the HAPI FHIR CLI - upload-terminology command has been modified to support this new functionality. - ]]> -
    - - New Feature: - When using Externalized Binary Storage in the JPA server, the system will now automatically - externalize Binary and Attachment payloads, meaning that these will automatically not be - stored in the RDBMS. - ]]> - - - Model Update: - The DSTU3 structures have been upgraded to the new 3.0.2 (Technical Correction) release.
    - The R4 structures have been upgraded to the new 4.0.1 (Technical Correction) release.
    - The R5 structure have been upgraded to the current (October) snapshot. - ]]> -
    - - Performance Improvement: - A significant performance improvement was made to the parsers (particularly the Json Parser) - when serializing resources. This work yields improvements of 20-50% in raw encode speed when - encoding large resources. Thanks to David Maplesden for the pull request! - ]]> - - - Performance Improvement: - When running inside a JPA server, The DSTU3+ validator now performs code validations - by directly testing ValueSet membership against a pre-calculated copy of the ValueSet, - instead of first expanding the ValueSet and then examining the expanded contents. - This can yield a significant improvement in validation speed in many cases. - ]]> - - - The email Subscription deliverer now respects the payload property of the subscription - when deciding how to encode the resource being sent. Thanks to Sean McIlvenna for the - pull request! - - - When using the _filter search parameter, string comparisons using the "eq" operator - were incorrectly performing a partial match. This has been corrected. Thanks to - Marc Sandberg for pointing this out! - - - When using the AuthorizationInterceptor with a rule to allow all reads by resource type, - the server will now reject requests for other resource types earlier in the processing - cycle. Thanks to Anders Havn for the suggestion! - - - Reference search parameters did not work via the _filter parameter - - - Transaction entries with a resource URL starting with a leading - slash (e.g. - /Organization?identifier=foo
    ]]> - instead of - Organization?identifier=foo]]> - did not work. These are now supported. - - - SubscriptionDstu2Config incorrectly pointed to a DSTU3 configuration file. This - has been corrected. - - - When using the VersionedApiConverterInterceptor, GraphQL responses failed with an HTTP - 500 error. - - - Cascading deletes now correctly handle circular references. Previously this failed with - an HTTP 500 error. - - - The informational message returned in an OperationOutcome when a delete failed due to cascades not being enabled - contained an incorrect example. This has been corrected. - - - In some cases, deleting a CodeSystem resource would fail because the underlying - codes were not correctly deleted from the terminology service tables. This is - fixed. - - - Two foreign keys have been dropped from the HFJ_SEARCH_RESULT table used by the FHIR search query cache. These - constraints did not add value and caused unneccessary contention when used under high load. - - - An inefficient regex expression in UrlUtil was replaced with a much more efficient hand-written - checker. This regex was causing a noticable performance drop when feeding large numbers of transactions - into the JPA server at the same time (i.e. when loading Synthea data). - - - The FHIRPath engine used to parse search parameters in the JPA R4/R5 server is now reused across - requests, as it is somewhat expensive to create and is thread safe. - - - It is now possible to submit a PATCH request as a part of a FHIR transaction in DSTU3 (previously this - was only supported in R4+). This is not officially part of the DSTU3 spec, but it can now be performed by - leaving the Bundle.entry.request.method blank in DSTU3 transactions and setting the request payload - as a Binary resource containing a valid patch. - - - The HAPI FHIR CLI server now uses H2 as its database platform instead of Derby. - Note that this means that data in any existing installations will need to be - re-uploaded to the new database platform. - - - LOINC concepts now include multiaxial hierarchical properties (e.g. parent]]> and - child]]>, which identify parent and child concepts. - - - When loading LOINC terminology, a new ValueSet is automatically created with a single include element that - identifies the LOINC CodeSystem in ValueSet.compose.include.system]]>. This ValueSet - includes all LOINC codes. - - - A note has been added to the downloads page explaning the removal of the hapi-fhir-utilities - module. Thanks to Andrew Fitzgerald for the PR! - - - REST servers will no longer try to guess the content type for HTTP requests where a body - is provided but no Content-Type header is included. These requests are invalid, and will now - result in an HTTP 400. This change corrects an error where some interceptors (notably - the RequestValidatingInterceptor, but not including any HAPI FHIR security interceptors) - could be bypassed if a Content Type was not included. - - - The GraphQL provider did not wrap the respone in a "data" element as described in the FHIR - specification. This has been corrected. - - - Added support for comparing resource dates to the current time via a new variable %now. E.g. - Procedure?date=gt%now would match future procedures. - - - Add support for in-memory matching on date comparisons ge,gt,eq,lt,le. - - - When using the Consent Service and denying a resource via the "Will See Resource" method, the resource ID - and version were still returned to the user. This has been corrected so that no details about - the resource are leaked. - - - Fix a failure in FhirTerser#visit when fields in model classes being visited contain custom subclasses of the - expected type. - - - Updating an existing CodeSystem resource with a content mode of COMPLETE did not cause the - terminology service to accurately reflect the new CodeSystem URL and/or concepts. This is now - corrected. - - - The JPA server now uses the Quartz scheduling library as a lob scheduling mechanism - - - The Testpage Overlay has been upgraded to use FontAwesome 5.x, and now supports being - deployed to a servlet path other than "/". - - - A NullPointerException when using the AuthorizationInterceptor RuleBuilder to build a conditional - rule with a custom tester has been corrected. Thanks to Tue Toft Nørgård for reporting! - - - The R4+ client and server modules did not recognize the new - _include:iterate]]> - syntax that replaces the previous - _include:recurse]]> - syntax. Both are now supported on all servers in order to avoid breaking backwards - compatibility, with the new syntax now being emitted in R4+ clients. - - - The hapi-fhir-jaxrs-server module now lists dependencies on structures JARs as optional - dependencies, in order to avoid automatically importing all versions. This means that implementers - of JAX-RS servers may now need to add an explicit dependency on one or more structures JARs to - their own project. - - - The LOINC terminology distribution includes multiple copies of the same files. Uploading LOINC terminology - resulted in some ValueSets with duplicate codes. This has been corrected by specifying a path with each - filename. - - - A corner case bug in the JPA server was solved: When performing a search that contained chained reference searches - where the value contained slashes (e.g. - Observation?derived-from:DocumentReference.contenttype=application/vnd.mfer]]>) - the server could fail to load later pages in the search results. - - - A new flag has been added to the JPA migrator tool that causes the migrator to not try to reduce the length - of existing columns in the schema. - - - Some resource IDs and URLs for LOINC ValueSets and ConceptMaps were inconsistently populated by the - terminology uploader. This has been corrected. - - - When a resource was updated with a meta.source containing a request id, the meta.source was getting appended - with the new request id, resulting in an ever growing source.meta value. E.g. after the first update, it looks - like "#9f0a901387128111#5f37835ee38a89e2" when it should only be "#5f37835ee38a89e2". This has been corrected. - - - The Plain Server method selector was incorrectly allowing client requests with _include statements to be - handled by method implementations that did not have any @IncludeParam]]> defined. This - is now corrected. Thanks to Tuomo Ala-Vannesluoma for reporting and providing a test case! - - - The ValueSet operation $expand]]> has been optimized for large ValueSets. ValueSets are - now persistence-backed by the terminology tables, which are populated by a scheduled pre-expansion process. - A ValueSet previously stored in an existing FHIR repository will need to be re-created or updated to make - it a candidate for pre-expansion. ValueSets that have yet to be pre-expanded will continue to be expanded - in-memory. - - - The ValueSet operation $validate-code]]> has been optimized for large ValueSets. - Codes in ValueSets that have yet to be pre-expanded will continue to be validated in-memory. - - - LOINC filenames for terminology upload are now configurable using the - loincupload.properties]]> file. - - - Support for the LOINC EXTERNAL_COPYRIGHT_NOTICE]]> property and - copyright]]> filter has been added. - - - Support for the LOINC parent]]> and child]]> filters has been - added. Both filters can be used with either of the =]]> or - in]]> operators. - - - Support for the LOINC ancestor]]> and descendant]]> filters has - been added. The descendant]]> filter can be used with either of the - =]]> or in]]> operators. At present, the - ancestor]]> filter can only be used with the =]]> operator. - - - Support for the LOINC ancestor]]> filter with the in]]> - operator has been added. - - - The JPA server failed to find codes defined in not-present codesystems in some cases, and reported - that the CodeSystem did not exist. This has been corrected. - - - The method - IVersionSpecificBundleFactory#initializeBundleFromResourceList - ]]> - has been deprecated, as it provided duplicate functionality to other methods and had an - outdated argument list based on the Bundle needs in DSTU1. We are not aware of any - public use of this API, please let us know if this deprecation causes any issues. - - - Support for concept property values with a length exceeding 500 characters has been added in the terminology - tables. In particular, this was added to facilitate the LOINC EXTERNAL_COPYRIGHT_NOTICE property, for which - values can be quite long. - - - The AuthorizationInterceptor has been enhanced so that a user can be authorized to - perform create operations specifically, without authorizing all write operations. Also, - conditional creates can now be authorized even if they are happening inside a FHIR - transaction. - - - When encoding a Composition resource in XML, the section narrative blocks were incorrectly - replaced by the main resource narrative. Thanks to Mirjam Baltus for reporting! - - - AN issue with date pickers not working in the hapi-fhir-testpage-overlay - project has been fixed. Thanks to GitHub user @jaferkhan for the pull - request! - - - A docker compose script for the hapi-fhir-jpaserver-starter project was added. Thanks to - Long Nguyen for the pull request! - - - A number of overridden methods in the HAPI FHIR codebase did not have the - @Override annotation. Thanks to Clayton Bodendein for cleaning this up! - - - Plain server resource providers were not correctly matching methods that - had the _id search parameter if a client performed a request using a modifier - such as :not or :exact. Thanks to Petro Mykhailyshyn - for the pull request! - - - The JPA server contained a restriction on the columns used to hold a resource's type name - that was too short to hold the longest name from the final R4 definitions. This has been - corrected to account for names up to 40 characters long. - - - The subscription triggering operation was not able to handle commas within search URLs being - used to trigger resources for subscription checking. This has been corrected. - - - In some cases where resources were recently expunged, null entries could be passed to JPA interceptors registered - against the STORAGE_PRESHOW_RESOURCES hook. - - - In issue was fixed in the JPA server where a previously failed search would be reused, - immediately returning an error rather than retrying the search. - - - The JPA server did not correctly process _has queries where the linked search parameter was - the _id parameter. - - - HTTP PUT (resource update) operations will no longer allow the version to be specified in a - Content-Location header. This behaviour was allowed in DSTU1 and was never removed from HAPI even though - it hasn't been permitted in the spec for a very long time. Hopefully this change will not - impact anyone! - - - HAPI FHIR allows transactions in DSTU3 to contain a JSON/XML Patch in a Binary resource without - specifying a verb in Bundle.entry.request.method, since the valueset defined in DSTU3 for that - field does not include the PATCH verb. The AuthorizationInterceptor however did not understand - this and would reject these requests. This is now corrected. - - - A potential XXE vulnerability in the validator was corrected. The XML parser used for validating - XML payloads (i.e. FHIR resources) will no longer read from DTD declarations. - - - Auto generated transaction IDs will now use both upper- and lowercase letters for more uniqueness in - the same amount of space. - - - Paging requests that are incorrectly executed at the type level were interpreted by the plain server - as search requests with no search parameters, leading to confusing search results. These will now - result in an HTTP 400 error with a meaningful error message. - - - The - IValidationSupport#validateCode(...)]]> - method has been modified to add an additional parameter (String theValueSetUrl). - Most users will be unaffected by this change as HAPI FHIR provides a number of - built-in implementations of this interface, but any direct user implementations - of this interface will need to add the new parameter. - - - The server CapabilityStatement (/metadata) endpoint now respects the Cache-Control header. Thanks - to Jens Villadsen for the pull request! - - - The @Metadata annotation now has an attribute that can be used to control - the cache timeout - - - QuestionnaireResponse validation in the JPA server was not able to load Questionnaire resources that - were referenced using a canonical URI instead of a local reference. Thanks to Vu Vuong for reporting! - - - When validating JSON payloads, the JSON structure was parsed by Gson instead of passing the - raw JSON to the validator. This meant that the validator was unable to catch certain structural - errors that are ignored by Gson. Thanks to Michael Lawley for reporting! - - - The JPA server exposed a number of duplicate entries in the CapabilityStatement's list of - supported _include values for a given resource. Thanks to Jens Villadsen for reporting! - - - An unintended dependency from hapi-fhir-base on Jetty was introduced in HAPI FHIR 4.0.0. This - has been removed. - - - The JPA migrator tool was not able to correctly drop tables containing foreign key references - in some cases. This has been corrected. - - - An issue was fixed where the JPA server would occasionally fail to save a resource because - it contained a string containing characters that change length when normalized. Thanks to - Tuomo Ala-Vannesluoma for the pull request! - - - Validation errors will now include details about the line number where the issue was found - - - The hapi-fhir-testpage-overlay project now uses WebJars for importing - JavaScript dependency libraries. This reduces our Git repository size and - should make it easier to stay up-to-date. - - - In the (fairly unlikely) circumstance that a JPA server was called with a parameter where the parameter name referenced - a custom search parameter with an invalid chain attached, and the value was missing entirely (e.g. - ProcedureRequest?someCustomParameter.BAD_NAME=]]>, the server would ignore this - parameter instead of incorrectly returning an error. This has been corrected. - - - Several issues with HAPI FHIR's annotation scanner that prevented use with Kotlin based - resource providers have been corrected. Thanks to Jelmer ter Wal for the pull request! - - - The JPA server in DST2 mode previously automatically validated submitted QuestionnaireResponse resource against - their corresponding Questionnaires and rejected non-conformant QuestionnaireResponse resources from being - stored. This was in contrast to every other version where the - RequestValidatingInterceptor has to be registered in order to achieve this specific behaviour. This - behaviour has been removed from the JPA server, and the same interceptor must be used for - QR validation in the DSTU2 JPA server as in all other versions of FHIR. - - - DSTU2.1 profile validation now uses the same R5 validation as all other versions of FHIR. - - - A new built-in server interceptor called - CaptureResourceSourceFromHeaderInterceptor]]> - has been added. - This interceptor can be used to capture an incoming source system URI in an HTTP Request - Header and automatically place it in - Resource.meta.source]]> - - - The @ProvidesResources annotation has been removed from HAPI FHIR, as it was not documented - and did not do anything useful. Please get in touch if this causes any issues. - - - Search parameters of type URI did not work in the hapi-fhir-testpage-overlay. This has been corrected. - - - JPA servers accidentally stripped the type attribute from the server-exported CapabilityStatement - when search parameters of type "special" were found. This has been corrected. - - - When running the JPA server without Lucene indexing enabled and performing ValueSet expansion, - the server would incorrectly ignore inclusion rules that specified a system but no codes (i.e. - include the whole system). This has been corrected. - - - The hapi-fhir-testpage-overlay has been updated to support R5 endpoints. Thanks to Dazhi Jiao - for the pull request! - - - The CapabilityStatement generator will now determine supported profiles by navigating the complete - hierarchy of supported resource types, instead of just using the root resource for each type. - Thanks to Stig Døssing for the pull request! - - - A NullPointerException in the XML Parser was fixed when serializing a resource containing an extension - on a primitive datatype that was missing a URL declaration. - - - When using the _filter search parameter in the JPA server with an untyped resource ID, the - filter could bring in search results of the wrong type. Thanks to Anthony Sute for the Pull - Request and Jens Villadsen for reporting! - - - In some cases where where a single search parameter matches the same resource many times with - different distinct values (e.g. a search by Patient:name where there are hundreds of patients having - hundreds of distinct names each) the Search Coordinator would end up in an infinite loop and never - return all of the possible results. Thanks to @imranmoezkhan for reporting, and to - Tim Shaffer for providing a reproducible test case! - - - - - This release contains no new or updated functionality, but addressed a dependency - version that was left incorrectly requiring a SNAPSHOT maven build of the - org.hl7.fhir.utilities module. Users who are successfully using HAPI FHIR 4.0.0 - do not need to upgrade, but any users who were blocked from upgrading due to - snapshot dependency issues are advised to upgrade immediately. - - - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Commons Codec (Core): 1.11 -> 1.12
  • -
  • Apache HTTPClient (Client): 4.5.3 -> 4.5.9
  • -
  • Apache HTTPCore (Client>: 4.4.6 -> 4.4.11
  • -
  • Spring (JPA): 5.1.6.RELEASE -> 5.1.8.RELEASE
  • -
  • Spring-Data (JPA): 2.1.6.RELEASE -> 2.1.8.RELEASE
  • -
  • JANSI (CLI): 1.17.1 -> 1.18
  • -
  • json-patch (JPA): 1.10 -> 1.15 (see changelog entry about this change)
  • -
  • Jackson-Databind (JPA): 2.9.9 -> 2.9.9.1 (due to a Jackson vulnerability CVE-2019-12384)
  • -
  • commons-collections4 (Server/JPA): 4.1 -> 4.3
  • -
  • commons-dbcp2 (JPA): 2.5.0 -> 2.6.0
  • -
  • commons-lang3 (Core): 3.8.1 -> 3.9
  • -
  • commons-text (Core): 1.6 -> 1.7
  • -
  • Guava (JPA): 27.1-jre -> 28.0-jre
  • - - ]]> -
    - - Breaking Change: - The HL7.org DSTU2 structures (and ONLY the HL7.org DSTU2 structures) have been - moved to a new package. Where they were previously found in - org.hl7.fhir.instance.model - they are now found in - org.hl7.fhir.dstu2.model. This was done in order to complete the harmonization - between the - HAPI FHIR - GitHub repository and the - org.hl7.fhir.core - GitHub repository. This is the kind of change we don't make lightly, as we do know that it - will be annoying for users of the existing library. It is a change however that will allow us - to apply validator fixes much more quickly, and will greatly reduce the amount of effort - required to keep up with R5 changes as they come out, so we're hoping it is worth it. - Note that no classes are removed, they have only been moved, so it should be fairly straightforward - to migrate existing code with an IDE. - ]]> - - - Breaking Change: - The - IPagingProvider - interface has been - modified so that the - retrieveResultList - method now takes one additional parameter of type - RequestDetails. If you have created a custom - implementation of this interface, you can add this parameter and - ignore it if needed. The use of the method has not changed, so this - should be an easy fix to existing code. - ]]> - - - Breaking Change: - The HAPI FHIR REST client and server will now default to using JSON encoding instead of XML when - the user has not explicitly configured a preference. - ]]> - - - Breaking Change: - The JPA $upload-external-code-system operation has been moved from being a - server level operation (i.e. called on the root of the server) to being - a type level operation (i.e. called on the CodeSystem type). - ]]> - - - Breaking Change: - The FhirValidator#validate(IResource) method has been removed. It was deprecated in HAPI FHIR 0.7 and replaced with - FhirValidator#validateWithResults(IBaseResource) so it is unlikely anyone is still depending on the - old method. - ]]> - - - New Feature: - Support for the new R5 draft resources has been added. This support includes the client, - server, and JPA server. Note that these definitions will change as the R5 standard is - modified until it is released, so use with caution! - ]]> - - - New Feature: - A new interceptor called - ConsentInterceptor has been added. This interceptor allows - JPA based servers to make appropriate consent decisions related to resources that - and operations that are being returned. See - Server Security - for more information. - ]]> - - - New Feature: - The JPA server now supports GraphQL for DSTU3 / R4 / R5 servers. - ]]> - - - New Feature: - The JPA server now supports the _filter search parameter when configured to - do so. The filter search parameter - is an extremely flexible and powerful feature, allowing for advanced grouping and order of - operations on searches. It can be dangerous however, as it potentially allows users to create - queries for which no database indexes exist in the default configuration so it is disabled by - default. Thanks to Anthony Sute for the pull request and all of his support in what turned - out to be a lengthy merge! - ]]> - - - New Feature: - A new interceptor called CascadingDeleteInterceptor has been added to the - JPA project. This interceptor allows deletes to cascade when a specific - URL parameter or header is added to the request. Cascading deletes - can also be controlled by a new flag in the AuthorizationIntereptor - RuleBuilder, in order to ensure that cascading deletes are only available - to users with sufficient permission. - ]]> - - - Several enhancements have been made to the AuthorizationInterceptor]]>: - -
  • The interceptor now registers against the STORAGE_PRESHOW_RESOURCES interceptor hook, - which allows it to successfully authorize JPA operations that don't actually return resource content, - such as GraphQL responses, and resources that have been filtered using the _elements - parameter.
  • -
  • -
  • The rule list is now cached on a per-request basis, which should improve performance - ]]> -
    - - The $expunge global everything operation has been refactored to do deletes - in small batches. This change will likely reduce performance, but does allow - for the operation to succeed without timing out in larger systems. - - - The JPA server did not correctly index Timing fields where the timing contained - a period but no individual events. This has been corrected. - - - The HAPI FHIR CLI import-csv-to-conceptmap command was not accounting for byte order marks in - CSV files (e.g. some Excel CSV files). This has been fixed. - - - A bug was fixed where deleting resources within a transaction did not always correctly - enforce referential integrity even if referential integrity was enabled. Thanks to - Tuomo Ala-Vannesluoma for reporting! - - - In the JPA server, the - _total=accurate]]> - was not always respected if a previous search already existed - in the query cache that matched the same search parameters. - - - Improved stability of concurrency test framework. Thanks to Stig Døssing for the pull request! - - - Moved in-memory matcher from Subscription module to SearchParam module and renamed the result type - from SubscriptionMatchResult to InMemoryMatchResult. - - - Added some experimental version-independent model classes to ca.uhn.fhir.jpa.model.any. They permit - writing code that is version independent. - - - Added new subclass of HashMapResourceProvider called SearchableHashMapResourceProvider that uses the - in-memory matcher to search the HashMap (using a full table scan). This allows rudimentary testing - without a database. - - - Added a new interceptor hook called STORAGE_PRESTORAGE_DELETE_CONFLICTS that is invoked when a - resource delete operation is about to fail due to referential integrity conflicts. - Hooks have access to the list of resources that have references to the resource being deleted and - can delete them. The boolean return value of the hook indicates whether the server should try - checking for conflicts again (true means try again). - - - The HAPI FHIR unit test suite has been refactored to no longer rely on PortUtil to - assign a free port. This should theoretically result in fewer failed builds resulting from - port conflicts. Thanks to Stig Døssing for the pull request! - - - AuthorizationInterceptor sometimes failed with a 500 error when checking compartment - membership on a resource that has a contained subject (Patient). - - - JPA server now supports conditional PATCH operation (i.e. performing a patch - with a syntax such as - /Patient?identifier=sys|val]]>) - - - The json-patch library used in the JPA server has been changed from - java-json-tools.json-patch - ]]> - to a more active fork of the same project: - crate-metadata.json-patch. - ]]> - Thanks to Jens Villadsen for the suggestion and pull request! - - - Support has been implemented in the JPA server for the CodeSystem - $subsumes]]> - operation. - - - Uploading the LOINC/RSNA Radiology Playbook would occasionally fail when evaluating part type names - due to case sensitivity. This has been corrected. - - - A new pointcut has been added to the JPA server called - JPA_PERFTRACE_RAW_SQL]]> - that can be used to capture the raw SQL statements that are sent to the underlying database. - - - Invoking the transaction or batch operation on the JPA server would fail - with a NullPointerException if the Bundle passed in did not contain - a resource in an entry that required a resource (e.g. a POST). Thanks to - GitHub user @lytvynenko-dmitriy for reporting! - - - HAPI FHIR Server (plain, JPA, and JAX-RS) all populated Bundle.entry.result - on search result bundles, even though the FHIR specification states that this - should not be populated. This has been corrected. Thanks to GitHub user - @gitrust for reporting! - - - Creating R4 Observation resources with a value type of SampledData failed in the - JPA server because of an indexing error. Thanks to Brian Reinhold for - reporting! - - - The JPA server now rejects subscriptions being submitted with no value in - Subscription.status (this field is mandatory, but the subscription was previously ignored - if no value was provided) - - - Fix a build failure thanks to Maven pom errors. Thanks to Gary Teichrow for - the pull request! - - - The JPA server did not correctly process searches with a - _tag:not]]> - expression containing more than one comma separated value. - - - The JSON and XML parsers will now raise a warning or error with the Parser Error Handler - if an extension is being encoded that is missing a URL, or has both a value and nested - extensions on the same parent extension. - - - FHIR model classes have a method called - hasPrimitiveValue()]]> - which previously returned true if the type was a primitive datatype (e.g. StringType). - This method now only returns true if the type is a primitive datatype AND - the type actually has a value. - - - Support in the JPA Terminology Service terminology uploader has been added for - uploading the IMGT - HLA Nomenclature]]> - distribution files as a FHIR CodeSystem. Thanks to Joel Schneider for the - contribution! - - - A BOM POM has been added to the HAPI FHIR distribution, allowing users to import - the HAPI FHIR library with all of its submodules automatically sharing the same - version. Thanks to Stig Døssing for the pull request! - - - AuthorizationInterceptor will now try to block delete operations sooner - in the processing lifecycle if there is no chance they will be permitted - later (i.e. because the type is not authorized at all) - - - The HAPI FHIR server will now generate a random transaction ID to every - request and add it to the response headers. Clients may supply the transaction - header via the X-Request-ID]]> header. - - - When attempting to read a resource that is deleted, a Location header is now - returned that includes the resource ID and the version ID for the deleted - resource. - - - A number of columns in the JPA Terminology Services ConceptMap tables were not - explicitly annotated with @Column, so the DB columns that were generated had - Java ugly field names as their SQL column names. These have been renamed, and - entries in the JPA migrator tool have been added for anyone upgrading. - - - Field values with a datatype of canonical]]> were indexed as - though they were explicit resource references by the JPA server. This led to - errors about external references not being supported when uploading various - resources (e.g. Questionnaires with HL7-defined ValueSet references). This has - been corrected. Note that at this time, we do not index canonical references - at all (as we were previously doing it incorrectly). This will be improved soon. - - - IBundleProvider now has an isEmpty() method that can be used to check whether any - results exist. A default implementation has been provided, so this is not - a breaking change. - - - Server CapabilityStatement/Conformance repsonses from the /metadata endpoint will - now be cached for 60 seconds always. This was previously a configurable setting on - the ServerConformanceProvider, but it is now handled directly by the method - binding so the provider now has no responsibility for caching. - - - The OkHttp client did not correctly apply the connection timeout and - socket timeout settings to client requests. Thanks to Petro Mykhailyshyn - for the pull request! - - - A new server interceptor hook called PROCESSING_COMPLETED has been added. This - hook is called by the server at the end of processing every request (success and failure). - - - The _summary]]> element was not always respected when encoding - JSON resources. - - - The JPA server now uses the H2 database instead of the derby database to run its - unit tests. We are hoping that this cuts down on the number of false test failures - we get due to mysterious derby failures. - - - Added a new Pointcut STORAGE_PRESTORAGE_EXPUNGE_EVERYTHING that is called at the start of - the expungeEverything operation. - - - The JPA server now has the ability to generate snapshot profiles from differential - profiles via the $snapshot operation, and will automatically generate a snapshot when - needed for validation. - - - The Base64Binary types for DSTU3+ now use a byte array internally to represent their - content, which is more efficient than storing base 64 encoded text to represent - the binary as was previously done. - - - Creating/updating CodeSystems now persist CodeSystem.concept.designation]]> to - the terminology tables. - - - Expanded ValueSets now populate ValueSet.expansion.contains.designation.language]]>. - - - @Operation methods can now declare that they will manually process the request - body and/or manually generate a response instead of letting the HAPI FHIR - framework take care of these things. This is useful for situations where - direct access to the low-level servlet streaming API is needed. - - - @Operation methods can now declare that they are global, meaning that they will - apply to all resource types (or instances of all resource types) if they - are found on a plain provider. - - - @Operation method parameters may now declare their type via a String name such as - "code" or "Coding" in an attribute in @OperationParam. This is useful if you want - to make operation methods that can operate across different versions of FHIR. - - - A new resource provider for JPA servers called - BinaryAccessProvider]]> - has been added. This provider serves two custom operations called - $binary-access-read]]> and - $binary-access-write]]> that can be used to - request binary data in Attachments as raw binary content instead of - as base 64 encoded content. - - - A few columns named 'CODE' in the JPA terminology services tables have been - renamed to 'CODEVAL' to avoid any possibility of conflicting with reserved - words in MySQL. The database migrator tool has been updated to handle this - change. - - - Support for PATCH operations performed within a transaction (using a Binary - resource as the resource type in order to hold a JSONPatch or XMLPatch body) - has been added to the JPA server. - - - Two issues in the Thymeleaf Narrative Template which caused an error when generating - a narrative on an untitled DiagnosticReport were fixed. Thanks to GitHub - user @navyflower for reporting! - - - A new attribute has been added to the @Operation annotation called - typeName]]>. This annotation can be used to specify a - type for an operation declared on a plain provider without needing to use - a specific version of the FHIR structures. - - - The $upload-external-code-system operation and the corresponding HAPI FHIR CLI command - can now be used to upload custom vocabulary that has been converted into a standard file format - defined by HAPI FHIR. This is useful for uploading large organizational code systems. - - - Two new operations, - $apply-codesystem-delta-add]]> - and - $apply-codesystem-delta-remove]]> - have been added to the terminology server. These methods allow - codes to be dynamically added and removed from external (notpresent) codesystems. - - - In the JAX-RS server, the resource type history and instance vread - operations had ambiguous paths that could lead to the wrong method - being called. Thanks to Seth Rylan Gainey for the pull request! - - - The profile validator (FhirInstanceValidator) can now be used to validate a resource - using an explicit profile declaration rather than simply relying on the declared - URL in the resource itself. - - - When using the ResponseHighlighterInterceptor, some invalid requests that would normally generate an HTTP - 400 response (e.g. an invalid _elements value) would cause an HTTP 500 crash. - - - When performing a read-if-newer operation on a plain server, the resource ID - in Resource.meta.versionId is now used if a version isn't found in the resource - ID itself. Thanks to Stig Døssing for the pull request! - - - An example datatype was corrected in the DSTU2 Identifier datatype - StructureDefinition. Thanks to Nick Robison for the pull request! - -
    - - - A potential security vulnerability in the hapi-fhir-testpage-overlay project was corrected: A URL - parameter was not being correctly escaped, leading to a potential XSS vulnerability. A big thanks to - Mudit Punia and Dushyant Garg for reporting this. - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Guava (base): 25-jre -> 27.1-jre
  • -
  • Hibernate (JPA): 5.4.1 -> 5.4.2
  • -
  • Jackson (JPA): 2.9.7 -> 2.9.8
  • -
  • Spring (JPA): 5.1.3.RELEASE -> 5.1.6.RELEASE
  • -
  • Spring-Data (JPA): 2.1.3.RELEASE -> 2.1.6.RELEASE
  • -
  • Caffeine (JPA): 2.6.2 -> 2.7.0
  • -
  • JANSI (CLI): 1.16 -> 1.17.1
  • - - - ]]> -
    - - In Servers that are configured to support extended mode - _elements]]> parameters, it is now possible to - use the :exclude modifier to exclude entire resource types. - - - RequestDetails now has methods called getAttribute and setAttribute that can - be used by interceptors to pass arbitrary data between requests. - - - The hapi-fhir-jpaserver-starter project has been updated to use a properties - file for configuration, making it much easier to get started with this - project. Thanks to Sean McIlvenna for the pull request! - - - The hapi-fhir-jpaserver-example did not have Subscription capabilities - enabled after the refactoring of how Subscriptions are enabled that - occurred in HAPI FHIR 3.7.0. Thanks to Volker Schmidt for the pull request! - - - Re-use subscription channel and handlers when a subscription is updated (unless the channel type changed). - - - When using the _elements]]> parameter on searches and reads, - requesting extensions to be included caused the extensions to be included but - not any values contained within. This has been corrected. - - - The JPA terminology service can now detect when Hibernate Search (Lucene) - is not enabled, and will perform simple ValueSet expansions without relying - on Hibenrate Search in such cases. - - - A Google Analytics script fragment was leftover in the hapi-fhir-jpaserver - example and starter projects. Thanks to Patrick Werner for removing these! - - - ParametersUtil now has a utility method that can be used to add parameter values - using the string name of the datatype (e.g. "dateTime") in order to help - building Parameters resources in a version-independent way. - - - When performing a search using the JPA server, if a search returned between 1500 - and 2000 results, a query for the final page of results would timeout due to - a page calculation error. This has been corrected. - - - In the JPA server, a much more readable error message is now returned returned when - two client threads collide while trying to simultaneously create a resource with the - same client-assigned ID. In addition, better error messages are now returned - when conflicts such as this one are hit within a FHIR transaction operation. - - - The JPA query builder has been optimized to take better advantage of SQL IN (..) expressions - when performing token searches with multiple OR values. - - - The JPA server transaction processor will now automatically detect if the request - Bundle contains multiple entries having identical conditional create operations, and - collapse these into a single operation. This is done as a convenience, since many - conversion algorithms can accidentally generate such duplicates. - - - Searching the JPA server with multiple instances of the same token search parameter - (e.g. "Patient?identifier=&identifier=b" returned no results even if resources - should have matched. Thanks to @mingdatacom for reporting! - - - A new config setting has been added to the JPA DaoConfig that disables validation - of the resource type for target resources in references. - - - HapiLocalizer can now handle message patterns with braces that aren't a part of a - message format expression. E.g. "Here is an {example}". - - - JPA searches using a Composite Unique Index will now use that index for faster - searching even if the search has _includes and/or _sorts. Previously these two - features caused the search builder to skip using the index. - - - JPA searches using a Composite Unique Index did not return the correct results if - a REFERENCE search parameter was used with arguments that consisted of - unqualified resource IDs. - - - A non-threadsafe use of DateFormat was cleaned up in the StopWatch class. - - - When performing a search in the JPA server where one of the parameters is a - reference with multiple values (e.g. Patient?organization=A,B) the generated - SQL was previously a set of OR clauses and this has been collapsed into a single - IN clause for better performance. - - - When returning the results of a history operation from a HAPI FHIR server, - any entries with a method of DELETE contained a stub resource in - Bundle.entry.resource, even though the FHIR spec states that this field - should be empty. This was corrected. - - - The hapi-fhir-testpage-overlay project no longer includes any library JARs - in the built WAR, in order to prevent duplicates and conflicts in implementing - projects. - - - Two expunge bug fixes: - The first bug is that the expunge operation wasn't bailing once it hit its limit. This resulted in a - "Page size must not be less than one!" error. - The second bug is that one case wasn't properly handled: when a resourceId with no version is provided. - This executed the case where only resource type is provided. - - - When updating a resource in the JPA server, if the contents have not actually changed - the resource version is not updated and no new version is created. In this situation, - the update time was modified however. It will no longer be updated. - - - When running the JPA server in Resource Client ID strategy mode of "ANY", using the - _id]]> search parameter could return incorrect results. This - has been corrected. - - - Performing a PUT or POST against a HAPI FHIR Server with no request body caused an - HTTP 500 to be returned instead of a more appropriate HTTP 400. This has been - corrected. - - - The fetchValueSet method on IValidationSupport implementation was not visible and could - not be overridden. Thanks to Patrick Werner for the pull reuqest! - - - The JPA server failed to index R4 reources with search parameters pointing to the Money data type. - Thanks to GitHub user @navyflower for reporting! - - - When validating DSTU3 QuestionnaireResponses that leverage the "enableWhen" functionality available - in Questionnaire resources, the validation could sometimes fail incorrectly. - - - Added new configuration parameter to DaoConfig and ModelConfig to specify the websocket context path. - (Before it was hardcoded to "/websocket"). - - - Added new IRemovableChannel interface. If a SubscriptionChannel implements this, then when a subscription - channel is destroyed (because its subscription is deleted) then the remove() method will be called on that - channel. - - - The JSON Patch provider has been switched to use the provider from the - Java JSON Tools - ]]> - project, as it is much more robust and fault tolerant. - - - Ensure that database cursors are closed immediately after performing a FHIR search. - - - When performing a JSON Patch in JPA server, the post-patched document is now validated to - ensure that the patch was valid for the candidate resource. This means that invalid patches - are caught and not just silently ignored. - - - Expunges are now done in batches in multiple threads. Both the number of expunge threads and batch size are - configurable - in DaoConfig. - - - Validation errors were fixed when using a Questionnaire with enableWhen on a question that - contains sub-items. - - - Fixed "because at least one resource has a reference to this resource" delete error message that mistakingly - reported - the target instead of the source with the reference. - - - ValidationSupportChain will now call isCodeSystemSupported() on each entry in the chain before - calling fetchCodeSystem() in order to reduce the work required by chain entries. Thanks to - Anders Havn for the suggestion! - - - In JPA server when updating a resource using a client assigned ID, if the resource was previously - deleted (meaning that the operation is actually a create), the server will now return - an HTTP 201 instead of an HTTP 200. Thanks to Mario Hyland for reporting! - - - The HAPI FHIR CLI was unable to start a server in R4 mode in HAPI FHIR 3.7.0. - This has been corrected. - - - When encoding resources, profile declarations on contained resources will now be - preserved. Thanks to Anders Havn for the pull request! - - - Two incorrect package declarations in unit tests were corrected. Thanks to github user - @zaewonyx for the PR! - - - The InstanceValidator now supports validating QuestionnairResponses with empty items - for disabled questions. Thanks to Matti Uusitalo for the pull request! - - - A new method has been added to the client that allows arbitrary headers to be easily - added to the request. Thanks to Christian Ohr for the pull request! - - - VersionConverter for R2-R3 has been modified to correectly handle the renamed basedOn - field. Thanks to Gary Graham for the pull request! - - - The JPA database migration tool has been enhanced to support migration from HAPI FHIR - 2.5. Thanks to Gary Graham for the pull request! - - - Add a missing @Deprecated tag. Thanks to Drew Mitchell for the pull request! - - - The JSON parser has removed a few unneeded super keywords that prevented overriding behaviour. - Thanks to Anders Havn for the pull request! - - - The DSTU2/3 version converter now converts Specimen resources. Thanks to Gary - Graham for the pull request! - -
    - - - HAPI FHIR is now built using OpenJDK 11. Users are recommended to upgrade to this version - of Java if this is feasible. We are not yet dropping support for Java 8 (aka 1.8), but - users are recommended to upgrade if possible. - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Spring (JPA): 5.0.8.RELEASE -> 5.1.3.RELEASE
  • -
  • Spring-Data (JPA): 2.0.7.RELEASE -> 2.1.3.RELEASE
  • -
  • Hibernate-Core (JPA): 5.3.6.FINAL -> 5.4.1.FINAL
  • -
  • Hibernate-Search (JPA): 5.10.3.FINAL -> 5.11.1.FINAL
  • -
  • Thymeleaf (JPA): 3.0.9.RELEASE -> 3.0.11.RELEASE
  • -
  • thymeleaf-spring4 (Testpage Overlay) has been replaced with thymeleaf-spring5
  • -
  • Commons-Lang3: 3.8 -> 3.8.1
  • -
  • Commons-Text: 1.4 -> 1.4
  • -
  • Spring Boot: 1.5.6.RELEASE -> 2.1.1.RELEASE
  • - - ]]> -
    - - Changed subscription processing, if the subscription criteria are straightforward (i.e. no - chained references, qualifiers or prefixes) then attempt to match the incoming resource against - the criteria in-memory. If the subscription criteria can't be matched in-memory, then the - server falls back to the original subscription matching process of querying the database. The - in-memory matcher can be disabled by setting isEnableInMemorySubscriptionMatching to "false" in - DaoConfig (by default it is true). If isEnableInMemorySubscriptionMatching is "false", then all - subscription matching will query the database as before. - - - Removed BaseSubscriptionInterceptor and all its subclasses (RestHook, EMail, WebSocket). These are replaced - by two new interceptors: SubscriptionActivatingInterceptor that is responsible for activating subscriptions - and SubscriptionMatchingInterceptor that is responsible for matching incoming resources against activated - subscriptions. Call DaoConfig.addSupportedSubscriptionType(type) to configure which subscription types - are supported in your environment. If you are processing subscriptions on a separate server and only want - to activate subscriptions on this server, you should set DaoConfig.setSubscriptionMatchingEnabled to false. - The helper method SubscriptionInterceptorLoader.registerInterceptors() - will check if any subscription types are supported, and if so then load active subscriptions into the - SubscriptionRegistry and register the subscription activating interceptor. This method also registers - the subscription matching interceptor (that matches incoming resources and sends matches to subscription - channels) only if DaoConfig.isSubscriptionMatchingEnabled is true. - See https://github.com/jamesagnew/hapi-fhir/wiki/Proposed-Subscription-Design-Change for more - details. - - - Added support for matching subscriptions in a separate server from the REST Server. To do this, run the - SubscriptionActivatingInterceptor on the REST server and the SubscriptionMatchingInterceptor in the - standalone server. Classes required to support running a standalone subscription server are in the - ca.uhn.fhir.jpa.subscription.module.standalone package. These classes are excluded by default from - the JPA ApplicationContext (that package is explicitly filtered out in the BaseConfig.java @ComponentScan). - - - Changed behaviour of FHIR Server to reject subscriptions with invalid criteria. If a Subscription - is submitted with invalid criteria, the server returns HTTP 422 "Unprocessable Entity" and the - Subscription is not persisted. - - - The JPA server $expunge operation could sometimes fail to expunge if - another resource linked to a resource that was being - expunged. This has been corrected. In addition, the $expunge operation - has been refactored to use smaller chunks of work - within a single DB transaction. This improves performance and reduces contention when - performing large expunge workloads. - - - A badly formatted log message when handing exceptions was cleaned up. Thanks to - Magnus Watn for the pull request! - - - A NullPointerException has been fixed when using custom resource classes that - have a @Block class as a child element. Thanks to Lars Gram Mathiasen for - reporting and providing a test case! - - - AuthorizationInterceptor now allows the GraphQL operation to be - authorized. Note that this is an all-or-nothing grant for now, it - is not yet possible to specify individual resource security when - using GraphQL. - - - The ResponseHighlighterInterceptor now declines to handle Binary responses - provided as a response from extended operations. In other words if the - operation $foo returns a Binary resource, the ResponseHighliterInterceptor will - not provide syntax highlighting on the response. This was previously the case for - the /Binary endpoint, but not for other binary responses. - - - FHIR Parser now has an additional overload of the - parseResource]]> method that accepts - an InputStream instead of a Reader as the source. - - - FHIR Fluent/Generic Client now has a new return option called - returnMethodOutcome]]> which can be - used to return a raw response. This is handy for invoking operations - that might return arbitrary binary content. - - - Moved state and functionality out of BaseHapiFhirDao.java into new classes: LogicalReferenceHelper, - ResourceIndexedSearchParams, IdHelperService, SearcchParamExtractorService, and MatchUrlService. - - - Replaced explicit @Bean construction in BaseConfig.java with @ComponentScan. Beans with state are annotated - with - @Component and stateless beans are annotated as @Service. Also changed SearchBuilder.java and the - three Subscriber classes into @Scope("protoype") so their dependencies can be @Autowired injected - as opposed to constructor parameters. - - - A bug in the JPA resource reindexer was fixed: In many cases the reindexer would - mark reindexing jobs as deleted before they had actually completed, leading to - some resources not actually being reindexed. - - - The JPA stale search deletion service now deletes cached search results in much - larger batches (20000 instead of 500) in order to reduce the amount of noise - in the logs. - - - AuthorizationInterceptor now allows arbitrary FHIR $operations to be authorized, - including support for either allowing the operation response to proceed unchallenged, - or authorizing the contents of the response. - - - JPA Migrator tool enhancements: - An invalid SQL syntax issue has been fixed when running the CLI JPA Migrator tool against - Oracle or SQL Server. In addition, when using the "Dry Run" option, all generated SQL - statements will be logged at the end of the run. Also, a case sensitivity issue when running against - some Postgres databases has been corrected. - - - In the JPA server, when performing a chained reference search on a search parameter with - a target type of - Reference(Any)]]>, the search failed with an incomprehensible - error. This has been corrected to return an error message indicating that the chain - must be qualified with a resource type for such a field. For example, - QuestionnaireResponse?subject:Patient.name=smith]]> - instead of - QuestionnaireResponse?subject.name=smith]]>. - - - The LOINC uploader has been updated to suport the LOINC 2.65 release - file format. - - - The resource reindexer can now detect when a resource's current version no longer - exists in the database (e.g. because it was manually expunged), and can automatically - adjust the most recent version to - account for this. - - - When updating existing resources, the JPA server will now attempt to reuse/update - rows in the index tables if one row is being removed and one row is being added (e.g. - because a Patient's name is changing from "A" to "B"). This has the net effect - of reducing the number - - - An issue was corrected with the JPA reindexer, where String index columns do not always - get reindexed if they did not have an identity hash value in the HASH_IDENTITY column. - - - Plain Server ResourceProvider classes are no longer required to be public classes. This - limitation has always been enforced, but did not actually serve any real purpose so it - has been removed. - - - A new interceptor called ServeMediaResourceRawInterceptor has been added. This interceptor - causes Media resources to be served as raw content if the client explicitly requests - the correct content type cia the Accept header. - - - A new configuration item has been added to the FhirInstanceValidator that - allows you to specify additional "known extension domains", meaning - domains in which the validator will not complain about when it - encounters new extensions. Thanks to Heinz-Dieter Conradi for the - pull request! - - - Under some circumstances, when a custom search parameter was added to the JPA server - resources could start reindexing before the new search parameter had been saved, meaning that - it was not applied to all resources. This has been corrected. - - - In example-projects/README.md and hapi-fhir-jpaserver-example/README.md, incidate that these examples - projects - are no longer maintained. The README.md points users to a starter project they should use for examples. - - - Replaced use of BeanFactory with custom factory classes that Spring @Lookup the @Scope("prototype") beans - (e.g. SearchBuilderFactory). - - - Moved e-mail from address configuration from EmailInterceptor (which doesn't exist any more) to DaoConfig. - - - Added 3 interfaces for services required by the standalone subscription server. The standalone subscription - server doesn't have access to a database and so needs to get its resources using a FhirClient. Thus - for each of these interfaces, there are two implementations: a Dao implementaiton and a FhirClient - implementation. The interfaces thus introduced are ISubscriptionProvider (used to load subscriptions - into the SubscriptionRegistry), the IResourceProvider (used to get the latest version of a resource - if the "get latest version" flag is set on the subscription) and ISearchParamProvider used to load - custom search parameters. - - - Separated active subscription cache from the interceptors into a new Spring component called the - SubscriptionRegistry. This component maintains a cache of ActiveSubscriptions. An ActiveSubscription - contains the subscription, it's delivery channel, and a list of delivery handlers. - - - Introduced a new Spring factory interface ISubscribableChannelFactory that is used to create delivery - channels and handlers. By default, HAPI FHIR ships with a LinkedBlockingQueue implementation of the - delivery channel factory. If a different type of channel factory is required (e.g. JMS or Kafka), add it - to your application context and mark it as @Primary. - - - When using the HL7.org DSTU2 structures, a QuestionnaireResponse with a - value of type reference would fail to parse. Thanks to David Gileadi for - the pull request! - - - FHIR Servers now support the HTTP HEAD method for FHIR read operations. Thanks - to GitHub user Cory00 for the pull request! - - - When running the JPA server on Oracle, certain search queries that return a very large number of - _included resources failed with an SQL exception stating that too many parameters were used. Search - include logic has been reworked to avoid this. - - - JPA Subscription deliveries did not always include the accurate versionId if the Subscription - module was configured to use an external queuing engine. This has been corrected. - - - It is now possible in a plain or JPA server to specify the default return - type for create/update operations when no Prefer header has been provided - by the client. - - - It is now possible in a JPA server to specify the _total calculation - behaviour if no parameter is supplied by the client. This is done using a - new setting on the DaoConfig. This can be used to force a total to - always be calculated for searches, including large ones. - - - AuthorizationInterceptor now rejects transactions with an invalid or unset request - using an HTTP 422 response Bundle type instead of silently refusing to authorize them. - - - AuthorizationInterceptor is now able to authorize DELETE operations performed via a - transaction operation. Previously these were always denied. - - - OperationDefinitions are now created for named queries in server - module. Thanks to Stig Døssing for the pull request! - - - A new server interceptor has been added called "SearchNarrowingInterceptor". - This interceptor can be used to automatically narrow the scope of searches - performed by the user to limit them to specific resources or compartments - that the user should have access to. - - - In a DSTU2 server, if search parameters are expressed with chains directly in the - parameter name (e.g. - @RequiredParam(name="subject.name.family")]]>) the second - part of the chain was lost when the chain was described in the server - CapabilityStatement. This has been corrected. - - - In the JPA server, search/read operations being performed within a transaction bundle - did not pass the client request HTTP headers to the sub-request. This meant that - AuthorizationInterceptor could not authorize these requests if it was depending on - headers being present. - - - When using a client in DSTU3/R4 mode, if the client attempted to validate the server - CapabilityStatement but was not able to parse the response, the client would throw - an exception with a misleading error about the Conformance resource not existing. This - has been corrected. Thanks to Shayaan Munshi for reporting and providing a test case! - - - It is now possible to upload a ConceptMap to the JPA server containing mappings where the - source or target is a StructureDefinition canonical URI. This was previously blocked, as the - system could not apply these mappings. It is now permitted to be stored, although - the system will still not apply these mappings. - - - A wrapper script for Maven has been added, enabling new users to use Maven without having - to install it beforehand. Thanks to Ari Ruotsalainen for the Pull Request! - - - AuthorizationInterceptor can now allow a user to perform a search that is scoped to a particular - resource (e.g. Patient?_id=123) if the user has read access for that specific instance. - - - In JPA Server REST Hook Subscriptions, any Headers defined in the - Subscription resource are now applied to the outgoing HTTP - request. - Thanks to Volker Schmidt for the pull request! - - - HAPI FHIR will now log the Git revision when it first starts up (on the ame line as the version number - that it already logs). - - - When fetching a page of search results, if a page offset beyond the total number - of available result was requested, a single result was still returned (e.g. - requesting a page beginning at index 1000 when there are only 10 results would - result in the 10th result being returned). This will now result in an empty - response Bundle as would be expected. - - - Added support for _id in in-memory matcher - - - The casing of the base64Binary datatype was incorrect in the DSTU3 and R4 model classes. - This has been corrected. - - - Add a "subscription-matching-strategy" meta tag to incoming subscriptions with value of IN_MEMORY - or DATABASE indicating whether the subscription can be matched against new resources in-memory or - whether a call out to the database may be required. I say "may" because subscription matches fail fast - so a negative match may be performed in-memory, but a positive match will require a database call. - - - When performing a JPA search with a chained :text modifier - (e.g. MedicationStatement?medication.code:text=aspirin,tylenol) a series - of unneccesary joins were introduced to the generated SQL query, harming - performance. This has been fixed. - - - A serialization error when performing some searches in the JPA server - using data parameters has been fixed. Thanks to GitHub user - @PickOneFish for reporting! - - - An issue with outdated syntax in the Vagrant file that prevent it from being used - was corrected. Thanks to Steve Lewis for the pull requst! - - - The HAPI FHIR tutorial server project had outdated versions of HAPI FHIR - in its pom file. Thanks to Ricardo Estevez for the pull request! - - - A NullPointerException during validation was fixed. Thanks to GitHub - user zilin375 for the pull request! - - - Support for validating enableWhen in Questionnaires has been added to the Validator. Thanks - to Eeva Turkka and Matti Uutsitalo for the pull request! - -
    - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Karaf (OSGi): 4.1.4 -> 4.1.6
  • -
  • Commons-Compress (JPA): 1.14 -> 1.18
  • -
  • Jackson (JPA): 2.9.2 -> 2.9.7
  • - - ]]> -
    - - A bug in the JPA migration tasks from 3.4.0 to 3.5.0 caused a failure if the HFJ_SEARCH_PARM - table did not exist. This table existed in previous versions of HAPI FHIR but was dropped - in 3.5.0, meaning that migrations would fail if the database was created using a snapshot - version of 3.5.0. - - - Automatic ID generation for contained resources (in cases where the user hasn't manually specified an ID) - has been streamlined to generate more predictable IDs in some cases. - - - An issue in the HAPI FHIR CLI database migrator command has been resolved, where - some database drivers did not automatically register and had to be manually added to - the classpath. - - - The module which deletes stale searches has been modified so that it deletes very large - searches (searches with 10000+ results in the query cache) in smaller batches, in order - to avoid having very long running delete operations occupying database connections for a - long time or timing out. - - - When invoking an operation using the fluent client on an instance, the operation would - accidentally invoke against the server if the provided ID did not include a type. This - has been corrected so that an IllegalArgumentException is now thrown. - - - A new operation has been added to the JPA server called - $trigger-subscription]]>. This can - be used to cause a transaction to redeliver a resource that previously triggered. - See - this link]]> - for a description of how this feature works. Note that you must add the - SubscriptionRetriggeringProvider as shown in the sample project - here.]]> - - - When operating in R4 mode, the HAPI FHIR server will now populate Bundle.entry.response - for history and search results, which is did not previously do. - - - The JPA database migrator tool has been enhanced so that it now supports migrations from - HAPI FHIR 3.3.0 to HAPI FHIR 3.4.0 / 3.5.0+ as well. - - - When using the HAPI FHIR CLI, user-prompted passwords were not correctly encoded, meaning that the - "--basic-auth PROMPT" action was not usable. This has been corrected. - - - The JPA server SearchCoordinator has been refactored to make searches more efficient: - When a search is performed, the SearchCoordinator loads multiple pages of results even - if the user has only requested a small number. This is done in order to prevent needing - to re-run the search for every page of results that is loaded. - In previous versions of HAPI FHIR, when a search was made the SearchCoordinator would - prefetch as many results as the user could possibly request across all pages (even if - this meant prefetching thousands or millions of resources). - As of this version, a new option has been added to DaoConfig that specifies how many - resources to prefetch. This can have a significant impact on performance for servers - with a large number of resources, where users often only want the first page - of results. - See - DatConfig#setSearchPreFetchThresholds()]]> - for configuration of this feature. - - - When performing a JPA server using a date parameter, if a time is not specified in - the query URL, the date range is expanded slightly to include all possible - timezones where the date that could apply. This makes the search slightly more - inclusive, which errs on the side of caution. - - - A bug was fixed in the JPA server $expunge operation where a database connection - could sometimes be opened and not returned to the pool immediately, leading to - pool starvation if the operation was called many times in a row. - - - A new setting has been added to the JPA server DaoConfig that causes the server - to keep certain searches "warm" in the cache. This means that the search will - be performed periodically in the background in order to keep a reasonably fresh copy - of the results in the query cache. - - - When using the testpage overlay to delete a resource, currently a crash can occur - if an unqualified ID is placed in the ID text box. This has been corrected. - - - AuthorizationInterceptor did not allow FHIR batch operations when the transaction() - permission is granted. This has been corrected so that transaction() allows both - batch and transaction requests to proceed. - - - The JPA server now automatically supplies several appropriate hibernate performance - settings as long as the JPA EntityManagerFactory was created using HAPI FHIR's - built-in method for creating it. -
    ]]> - Existing JPA projects should consider using - super.entityManagerFactory()]]> - as shown in - the example project]]> - if they are not already. -
    - - The FhirTerser getValues(...)]]> methods have been overloaded. The terser can now be - used to create a null-valued element where none exists. Additionally, the terser can now add a null-valued - extension where one or more such extensions already exist. These changes allow better population of FHIR - elements provided an arbitrary FHIR path. - - - The FhirTerser getValues(...)]]> methods were not properly handling modifier - extensions for verions of FHIR prior to DSTU3. This has been corrected. - - - When updating resources in the JPA server, a bug caused index table entries to be refreshed - sometimes even though the index value hadn't changed. This issue did not cause incorrect search - results but had an effect on write performance. This has been corrected. - - - The @Operation annotation used to declare operations on the Plain Server now - has a wildcard constant which may be used for the operation name. This allows - you to create a server that supports operations that are not known to the - server when it starts up. This is generally not advisable but can be useful - for some circumstances. - - - When using an @Operation method in the Plain Server, it is now possible - to use a parameter annotated with @ResourceParam to receive the Parameters - (or other) resource supplied by the client as the request body. - - - The JPA server version migrator tool now runs in a multithreaded way, allowing it to - upgrade th database faster when migration tasks require data updates. - - - A bug in the JPA server was fixed: When a resource was previously deleted, - a transaction could not be posted that both restored the deleted resource but - also contained references to the now-restored resource. - - - The $expunge operation could sometimes fail to delete resources if a resource - to be deleted had recently been returned in a search result. This has been - corrected. - - - A new setting has been added to the JPA Server DopConfig that controls the - behaviour when a client-assigned ID is encountered (i.e. the client performs - an HTTP PUT to a resource ID that doesn't already exist on the server). It is - now possible to disallow this action, to only allow alphanumeric IDs (the default - and only option previously) or allow any IDs including alphanumeric. - - - It is now possible to use your own IMessageResolver instance in the narrative - generator. Thanks to Ruth Alkema for the pull request! - - - When restful reponses tried to return multiple instances of the same response header, - some instances were discarded. Thanks to Volker Schmidt for the pull request! - - - The REST client now allows for configurable behaviour as to whether a - _format]]> - parameter should be included in requests. - - - JPA server R4 SearchParameter custom expression validation is now done using the - actual FHIRPath evaluator, meaning it is more rigorous in what it can find. - - - A NullPointerException in DateRangeParam when a client URL conrtained a malformed - date was corrected. Thanks Heinz-Dieter Conradi for the Pull Request! - -
    - - - HAPI FHIR now supports JDK 9 and JDK 10, both for building HAPI FHIR - as well as for use. JDK 8 remains supported and is the minimum requirement - in order to build or use HAPI FHIR. - - - A new command has been added to the HAPI FHIR CLI tool: "migrate-database". This - command performs the schema modifications required when upgrading HAPI FHIR JPA - to a new version (previously this was a manual process involving running scripts and - reindexing everything). -
    - See the - command documentation - for more information on how to use this tool. Please post in the HAPI FHIR - Google Group if you run into issues, as this is a brand new framework and we still need - lots of help with testing. - ]]> -
    - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Gson (JSON Parser): 2.8.1 -> 2.8.5
  • -
  • Spring Framework (JPA): 5.0.3.RELEASE -> 5.0.8.RELEASE
  • -
  • Hibernate ORM (JPA): 5.2.16.Final -> 5.3.6.Final
  • -
  • Hibernate Search (JPA): 5.7.1.Final -> 5.10.3.Final
  • -
  • Jetty (CLI): 9.4.8.v20171121 -> 9.4.12.v20180830
  • -
  • Commons-Codec (All): 1.10 -> 1.11
  • -
  • Commons-Lang (All): 3.7 -> 3.8
  • -
  • Commons-IO (All): 2.5 -> 2.6
  • -
  • Spring-Data (JPA): 1.11.6.RELEASE -> 2.0.7.RELEASE
  • - - ]]> -
    - - A new mnandatory library depdendency has been added to hapi-fhir-base, meaning that all - applications using HAPI FHIR must import ti: commons-text. This library has been added as - a few utility methods used by HAPI FHIR that were formerly in the commons-lang3 - project have been moved into commons-text. This library has been added as a non-optional - dependency in the hapi-fhir-base POM, so Maven/Gradle users should not have to make - any changes. - - - The JPA server now has a configuration item in the DaoConfig to specify which bundle types - may be stored as-is on the /Bundle endpoint. By default the following types - are allowed: collection, document, message. - - - CapabilityStatements generated by the server module will now include the server - base URL in the - CapabilityStatement.implementation.url]]> - field. - - - Spring-data (used by the JPA server) has been upgraded to version 2.0.7 - (from version 1.11.6). Thanks to Roman Doboni for the pull request! - - - A crash in the validator was fixed: Validating a Bundle that did not have Bundle.fullUrl - populated could cause a NullPointerException. - - - AuthorizationInterceptor now examines requests more closely in order - to block requests early that are not possibly going to return - allowable results when compartment rules are used. For example, - if an AuthorizationInterceptor is configured to allow only - read]]> - access to compartment - Patient/123]]>, - a search for - Observation?subject=987]]> - will now be blocked before the method handler is called. Previously - the search was performed and the results were examined in order to - determine whether they were all in the appropriate compartment, but - this incurs a performance cost, and means that this search would - successfully return an empty Bundle if no matches were present. -
    ]]> - A new setting on AuthorizationInterceptor called - setFlags(flags)]]> - can be used to maintain the previous behaviour. -
    - - JPA server loading logic has been improved to enhance performance when - loading a large number of results in a page, or when loading multiple - search results with tags. Thanks to Frank Tao for the pull request! - This change was introduced as a part of a collaboration between - HAPI FHIR and the US National Institiutes for Health (NIH). - - - Resource loading logic for the JPA server has been optimized to - reduce the number of database round trips required when loading - search results where many of the entries have a "forced ID" (an alphanumeric - client-assigned resource ID). Thanks to Frank Tao for the pull - request! - This change was introduced as a part of a collaboration between - HAPI FHIR and the US National Institiutes for Health (NIH). - - - LOINC uploader has been updated to support the new LOINC filename - scheme introduced in LOINC 2.64. Thanks to Rob Hausam for the - pull request! - - - In the JPA server, it is now possible for a custom search parameter - to use the - resolve()]]> function in its path to descend into - contained resources and index fields within them. - - - A new IValidationSupport implementation has been added, named CachingValidationSupport. This - module wraps another implementation and provides short-term caching. This can have a dramatic - performance improvement on servers that are validating or executing FHIRPath repeatedly - under load. This module is used by default in the JPA server. - - - An index in the JPA server on the HFJ_FORCED_ID table was incorrectly - not marked as unique. This meant that under heavy load it was possible to - create two resources with the same client-assigned ID. - - - The JPA server - $expunge]]> - operation deleted components of an individual resource record in - separate database transactions, meaning that if an operation failed - unexpectedly resources could be left in a weird state. This has been - corrected. - - - A bug was fixed in the JPA terminology uploader, where it was possible - in some cases for some ValueSets and ConceptMaps to not be saved because - of a premature short circuit during deferred uploading. Thanks to - Joel Schneider for the pull request! - - - A bug in the HAPI FHIR CLI was fixed, where uploading terminology for R4 - could cause an error about the incorrect FHIR version. Thanks to - Rob Hausam for the pull request! - - - A new method has been added to AuthorizationInterceptor that can be used to - create rules allowing FHIR patch operations. See - Authorizing Patch Operations]]> - for more information. - - - A new view has been added to the JPA server, reducing the number of database - calls required when reading resources back. This causes an improvement in performance. - Thanks to Frank Tao for the pull request! - - - A crash was fixed when deleting a ConceptMap resource in the - JPA server. This crash was a regression in HAPI FHIR 3.4.0. - - - A crash in the JPA server when performing a manual reindex of a deleted resource - was fixed. - - - Using the generic/fluent client, it is now possible to - invoke the $process-message method using a standard - client.operation() call. Previously this caused a strange - NullPointerException. - - - The REST Server now sanitizes URL path components and query parameter - names to escape several reserved characters (e.g. " and <) - in order to prevent HTML injection attacks via maliciously - crafted URLs. - - - The generic/fluent client now supports the :contains modifier on - string search params. Thanks to Clayton Bodendein for the pull - request! - - - The HAPI FHIR Server has been updated to correctly reflect the current - FHIR specification behaviour for the Prefer header. This means that - the server will no longer return an OperationOutcome by default, but - that one may be requested via a Prefer header, using the newly implemented - "Repreentation: OperationOutcome" value. - Thanks to Ana Maria Radu for the pul request! - - - The REST Server module now allows more than one Resource Provider - (i.e. more than one implementation of IResourceProvider) to be registered - to the RestfulServer for the same resource type. Previous versions of - HAPI FHIR have always limited support to a single resource provider, but - this limitation did not serve any purpose so it has been removed. - - - The HashMapResourceProvider now supports the type and - instance history operations. In addition, the search method - for the - _id]]> search parameter now has the - search parameter marked as "required". This means that additional - search methods can be added in subclasses without their intended - searches being routed to the searchById method. Also, the resource - map now uses a LinkedHashMap, so searches return a predictable - order for unit tests. - - - Fixed a bug when creating a custom search parameter in the JPA - server: if the SearchParameter resource contained an invalid - expression, create/update operations for the given resource would - fail with a cryptic error. SearchParameter expressions are now - validated upon storage, and the SearchParameter will be rejected - if the expression can not be processed. - - - The generic client history operations (history-instance, history-type, - and history-server) now support the - _at]]> parameter. - - - In the plain server, many resource provider method parameters may now - use a generic - IPrimitiveType<String>]]> - or - IPrimitiveType<Date>]]> at the - parameter type. This is handy if you are trying to write code - that works across versions of FHIR. - - - Several convenience methods have been added to the fluent/generic - client interfaces. These methods allow the adding of a sort via a - SortSpec object, as well as specifying search parameters via a plain - Map of Strings. - - - A new client interceptor called ThreadLocalCapturingInterceptor has been - added. This interceptor works the same way as CapturingInterceptor in that - it captures requests and responses for later processing, but it uses - a ThreadLocal object to store them in order to facilitate - use in multithreaded environments. - - - A new constructor has been added to the client BasicAuthInterceptor - allowing credentials to be specified in the form - "username:password" as an alternate to specifying them as two - discrete strings. - - - SimpleBundleProvider has been modified to optionally allow calling - code to specify a search UUID, and a field to allow the preferred - page size to be configured. - - - The JPA server search UUID column has been reduced in length from - 40 chars to 36, in order to align with the actual length of the - generated UUIDs. - - - Plain servers using paging may now specify an ID/name for - individual pages being returned, avoiding the need to - respond to arbitrary offset/index requests from the server. - In this mode, page links in search result bundles simply - include the ID to the next page. - - - An issue was fixed in BundleUtil#toListOfEntries, where sometimes - a resource could be associated with the wrong entry in the response. - Thanks to GitHub user @jbalbien for the pull request! - - - JPA subscription delivery queues no longer store the resource body in the - queue (only the ID), which should reduce the memory/disk footprint of the queue - when it grows long. - - - A bug was fixed in JPA server searches: When performing a search with a _lastUpdate - filter, the filter was applied to any _include values, which it should not have been. - Thanks to Deepak Garg for reporting! - - - When performing a ConceptMap/$translate operation with reverse="true" in the arguments, - the equivalency flag is now set on the response just as it is for a non-reverse lookup. - - - When executing a FHIR transaction in JPA server, if the request bundle contains - placeholder IDs references (i.e. "urn:uuid:*" references) that can not be resolved - anywhere else in the bundle, a user friendly error is now returned. Previously, - a cryptic error containing only the UUID was returned. As a part of this change, - transaction processing has now been consolidated into a single codebase for DSTU3 - / R4 (and future) versions of FHIR. This should greatly improve maintainability - and consistency for transaction processing. - - - ResponseHighlighterInterceptor now displays the total size of the output and - an estimate of the transfer time at the bottom of the response. - - - The Prefer header is now honoured for HTTP PATCH requests. Thanks to - Alin Leonard for the Pull Request! - - - The Composition]]> operation $document]]> has been - implemented. Thanks to Patrick Werner for the Pull Request! - - - HAPI FHIR CLI commands that allow Basic Auth credentials or a Bearer Token may now use - a value of "PROMPT" to cause the CLI to prompt the user for credentials using an - interactive prompt. - - - The experimental "dynamic mode" for search parameter registration has been removed. This - mode was never published or documented and was labelled as experimental, so I am hoping it - was never depended on by anyone. Please post on the HAPI FHIR mailing list if this - change affects you. - - - A crash was fixed when using the ConceptMap/$translate operation to translate a mapping - where the equivalence was not specified. - - - The maximum length for codes in the JPA server terminology service have been increased - to 500 in order to better accomodate code systems with very long codes. - - - A bug in the DSTU3 validator was fixed where validation resources such as StructureDefinitions - and Questionnaires were cached in a cache that never expired, leading to validations against - stale versions of resources. - - - In the REST server, if an incoming request has the Content-Encoding header, the server will - not try to read request parameters from the content stream. This avoids an incompatibility with - new versions of Jetty. - - - Custom profile names when not matching standard FHIR profile names, are now - handled properly by the validator. Thanks to Anthony Sute - for the Pull Request! - - - The JPA server now performs a count query instead of a more expensive data query - when searches using - _summary=count]]>. - This means that a total will always be returned in the Bundle (this isn't always - guaranteed otherwise, since the Search Controller can result in data being returned - before the total number of results is known). - - - The JPA server SearchCoordinator now prefetches only a smaller and configurable number - of results during the initial search request, and more may be requested in subsequent - page requests. This change may have a significant improvement on performance: in - previous versions of HAPI FHIR, even if the user only wanted the first page of 10 - results, many many more might be prefetched, consuming database resources and - server time. - -
    - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Commons-Lang3 (All): 3.6 -> 3.7
  • -
  • Hibernate (JPA): 5.2.12.Final -> 5.2.16.Final
  • -
  • Javassist (JPA): 3.20.0-GA -> 3.22.0-GA
  • - - ]]> -
    - - Several enhancements have been made to the JPA server index - tables. These enhancements consist of new colums that will be - used in a future version of HAPI FHIR to significantly decrease - the amount of space required for indexes on token and string index - types. -
    ]]> - These new columns are not yet used in HAPI FHIR 3.4.0 but will be - enabled in HAPI FHIR 3.5.0. Anyone upgrading to HAPI FHIR 3.4.0 (or above) - is recommended to invoke the following SQL statement on their - database in order to reindex all data in a background job: - ]]> - update HFJ_RESOURCE set SP_INDEX_STATUS = null;]]> - ]]> - Note that if you do this reindex now, you will not have any downtime while - you upgrade to HAPI FHIR 3.5.0. If you need to perform the reindex at the - time that you upgrade to HAPI FHIR 3.5.0 some indexes may not be - available. - ]]> - In addition, the following schema changes should be made while upgrading: - ]]> - update table TRM_CODESYSTEM_VER drop column RES_VERSION_ID;
    - alter table TRM_CODESYSTEM_VER drop constraint IDX_CSV_RESOURCEPID_AND_VER
    ]]> -
    - - R4 structures have been updated to the latest definitions - (SVN 13732) - - - When calling a getter on a DSTU3/R4 structure for a choice type - (e.g. Observation#getValueString()), a NullPointerException - was thrown if there was no value in this field, and the NPE - had no useful error message. Now this method call will simply - return null. - method - - - When performing a FHIR resource update in the JPA server - where the update happens within a transaction, and the - resource being updated contains placeholder IDs, and - the resource has not actually changed, a new version was - created even though there was not actually any change. - This particular combination of circumstances seems very - specific and improbable, but it is quite common for some - types of solutions (e.g. mapping HL7v2 data) so this - fix can prevent significant wasted space in some cases. - - - JPA server index tables did not have a column length specified - on the resource type column. This caused the default of 255 to - be used, which wasted a lot of space since resource names are all - less than 30 chars long and a single resource can have 10-100+ - index rows depending on configuration. This has now been set - to a much more sensible 30. - - - The LOINC uploader for the JPA Terminology Server has been - significantly beefed up so that it now takes in the full - set of LOINC distribution artifacts, and creates not only - the LOINC CodeSystem but a complete set of concept properties, - a number of LOINC ValueSets, and a number of LOINC ConceptMaps. - This work was sponsored by the Regenstrief Institute. Thanks - to Regenstrief for their support! - - - The DSTU2 validator has been refactored to use the same codebase - as the DSTU3/R4 validator (which were harmonized in HAPI FHIR 3.3.0). - This means that we now have a single codebase for all validators, which - improves maintainability and brings a number of improvements - to the accuracy of DSTU2 resource validation. - - - When encoding a resource that had contained resources with user-supplied - local IDs (e.g. resource.setId("#1")) as well as contained resources - with no IDs (meaning HAPI should automatically assign a local ID - for these resources) it was possible for HAPI to generate - a local ID that already existed, making the resulting - serialization invalid. This has been corrected. - - - The REST Generic Client now supports invoking an operation - on a specific version of a resource instance. - - - A new operation has been added to the JPA server called - "$expunge". This operation can be used to physically delete - old versions of resources, logically deleted resources, or - even all resources in the database. - - - An experimental new feature has been added to AuthorizationInterceptor which - allows user-supplied checkers to add additional checking logic - to determine whether a particular rule applies. This could be - used for example to restrict an auth rule to particular - source IPs, or to only allow operations with specific - parameter values. - - - A new qualifier has been added to the AuthorizationInterceptor - RuleBuilder that allows a rule on an operation to match - atAnyLevel()]]>, meaning that the rule - applies to the operation by name whether it is at the - server, type, or instance level. - - - Calling IdType#withVersion(String)]]> - with a null/blank parameter will now return a copy of the - ID with the version removed. Previously this call would - deliberately cause an IllegalArgumentException. - - - When updating resources on the JPA server, tags did not always - consistently follow FHIR's recommended rules for tag retention. According - to FHIR's rules, if a tag is not explicitly present on an update but - was present on the previous version, it should be carried forward anyhow. - Due to a bug, this happened when more than one tag was present - but not when only one was present. This has been corrected. In - addition, a new request header called - X-Meta-Snapshot-Mode]]> - has been added that can be used by the client to override - this behaviour. - - - The JPA server's resource counts query has been optimized to - give the database a bit more flexibility to - optimize, which should increase performance for this query. - - - The JPA server CapabilityStatement generator has been tuned - so that resource counts are no longer calculated synchronously - as a part of building the CapabilityStatement response. With - this change, counts are calculated in the background and cached - which can yield significant performance improvements on - hevaily loaded servers. - - - Fix a significant performance regression in 3.3.0 when validating DSTU3 content using the - InstanceValidator. From 3.3.0 onward, StructureDefinitions are converted to FHIR R4 - content on the fly in order to reduct duplication in the codebase. These conversions - happened upon every validation however, instead of only happening once which adversely - affected performance. A cache has been added. - - - Fix a bug in the DSTU2 QuestionnaireResponseValidator which prevented validation - on groups with only one question. Thanks David Gileadi for the pull request! - - - The ConceptMap]]> operation $translate]]> has been - implemented. - - - HAPI-FHIR_CLI now includes two new commands: one for importing and populating a - ConceptMap]]> resource from a CSV; and one for exporting a - ConceptMap]]> resource to a CSV. - - - Operation methods on a plain server may now use parameters - of type String (i.e. plain Java strings), and any FHIR primitive - datatype will be automatically coerced into a String. - - - The HAPI FHIR CLI now supports importing an IGPack file as an import - to the validation process. - - - When two threads attempt to update the same resource at the same time, previously - an unspecified error was thrown by the JPA server. An HTTP 409 - (Conflict) with an informative error message is now thrown. - - - A bug in the JPA server's DSTU2 transaction processing routine caused it - to occasionally consume two database connections, which could lead to deadlocks - under heavy load. This has been fixed. - - - AuthorizationInterceptor sometimes incorrectly identified an operation - invocation at the type level as being at the instance level if the method - indicated that the IdParam parameter was optional. This has been fixed. - - - StructureDefinitions for the FHIR standard extensions have been added to the - hapi-fhir-validation-resources-XXXX modules. Thanks to Patrick Werner for the - pull request! These have also been added to the list of definitions uploaded - by the CLI "upload-definitions" command. - - - A workaround for an invalid search parameter path in the R4 consent - resource has been implemented. This path was preventing some Consent - resources from successfully being uploaded to the JPA server. Thanks to - Anthony Sute for identifying this. - - - A hard-to-understand validation message was fixed in the validator when - validating against profiles that declare some elements as mustSupport - but have others used but not declared as mustSupport. Thanks to Patrick - Werner for the PR! - - - The HAPI FHIR CLI is now available for installation on OSX using the - (really excellent) Homebrew package manager thanks to an effort by - John Grimes to get it added. Thanks John! - - - When the REST Server experiences an expected error (such as a NullPointerException) - in a resource provider class, a simple message of "Failed to call access method" is - returned to the user. This has been enhanced to also include the message from - the underlying exception. - - - A bug in the plain server was fixed that prevented some includes from - correctly causing their targets to be included in the response bundle. - Thanks to GitHub user @RuthAlk for the pull request! - - - DateRangeParameter was enhanced to support convenient method chanining, and - the parameter validation was improved to only change state after validating - that parameters were valid. Thanks to Gaetano Gallo for the pull request! - - - The HumanName DSTU3+ datatype had convenience methods for testing - whether the name has a specific given name or not, but these methods - did not work. Thanks to Jason Owen for reporting and providing a test - case! - - - An issue was corrected in the validator where Questionnaire references that - used contained resources caused an unexpected crash. Thanks to - Heinz-Dieter Conradi for the pull request! - - - An issue in the narrative generator template for the CodeableConcept - datatype was corrected. Thanks to @RuthAlk for the pull request! - - - The JPA server automatic reindexing process has been tweaked so that it no - longer runs once per minute (this was a heavy strain on large databases) - but will instead run once an hour unless triggered for some reason. In addition, - the number of threads allocated to reindexing may now be adjusted via a - setting in the DaoConfig. - - - AuthorizationInterceptor did not correctly grant access to resources - by compartment when the reference on the target resource that pointed - to the compartment owner was defined using a resource object (ResourceReference#setResource) - instead of a reference (ResourceReference#setReference). - - - Several tests were added to ensure accurate validation of QuestionnaireResponse - resources. Thanks to Heinz-Dieter Conradi for the pull request! - - - A NullPointerException when validating some QuestionnaireResponse reousrces - was fixed in the validator. Thanks to Heinz-Dieter Conradi for the pull request! - - - QuestionnaireResponse answers of type "text" may now be validated by the - FhirInstanceValidator. Thanks to Heinz-Dieter Conradi for the pull request! - - - The REST server has been modified so that the - Location]]> - header is no longer returned by the server on read or update responses. - This header was returned in the past, but this header is actually - inappropriate for any response that is not a create operation. - The - Content-Location]]> - will still be returned, and will hold the same contents. - - - The Postgres sample JPA project was fixed to use the current version - of HAPI FHIR (it was previously stuck on 2.2). Thanks to - Kai Liu for the pull request! - -
    - - - This release corrects an inefficiency in the JPA Server, but requires a schema - change in order to update. Prior to this version of HAPI FHIR, a CLOB column - containing the complete resource body was stored in two - tables: HFJ_RESOURCE and HFJ_RES_VER. Because the same content was stored in two - places, the database consumed more space than is needed to. -
    ]]> - In order to reduce this duplication, the - RES_TEXT and RES_ENCODING]]> - columns have been - dropped]]> - from the - HFJ_RESOURCE]]> - table, and the - RES_TEXT and RES_ENCODING]]> - columns have been - made NULLABLE]]> - on the - HFJ_RES_VER]]> - table. -
    ]]> - The following migration script may be used to apply these changes to - your database. Naturally you should back your database up prior to - making this change. - - ALTER TABLE hfj_resource DROP COLUMN res_text;
    - ALTER TABLE hfj_resource DROP COLUMN res_encoding;
    - ALTER TABLE hfj_res_ver ALTER COLUMN res_encoding DROP NOT NULL;
    - ALTER TABLE hfj_res_ver ALTER COLUMN res_text DROP NOT NULL;
    - ]]> -
    - - The validation module has been refactored to use the R4 (currently maintained) - validator even for DSTU3 validation. This is done by using an automatic - converter which converts StructureDefinition/ValueSet/CodeSystem resources - which are used as inputs to the validator. This change should fix a number - of known issues with the validator, as they have been fixed in R4 but - not in DSTU3. This also makes our validator much more maintainable - since it is now one codebase. - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Hibernate (JPA): 5.2.10.Final -> 5.2.12.Final
  • -
  • Spring (JPA): 5.0.0 -> 5.0.3
  • -
  • Thymeleaf (Web Tespage Overlay): 3.0.7.RELEASE -> 3.0.9.RELEASE
  • - - ]]> -
    - - A number of HAPI FHIR modules have been converted so that they now work - as OSGi modules. Unlike the previous OSGi module, which was a mega-JAR - with all of HAPI FHIR in it, this is simply the appropriate - OSGi manifest inside the existing JARs. Thanks to John Poth - for the Pull Request! -
    - Note that this does not cover all modules in the project. Current support includes: -
      -
    • HAPI-FHIR structures DSTU2, HL7ORGDSTU2, DSTU2.1, DSTU3, R4
    • -
    • HAPI-FHIR Resource validation DSTU2, HL7ORGDSTU2, DSTU2.1, DSTU3, R4
    • -
    • Apache Karaf features for all the above
    • -
    • Integration Tests
    • -
    - Remaining work includes: -
      -
    • HAPI-FHIR Server support
    • -
    • HAPI-FHIR narrative support. This might be tricky as Thymeleaf doesn't support OSGi.
    • -
    - ]]> -
    - - Fix a crash in the JSON parser when parsing extensions on repeatable - elements (e.g. Patient.address.line) where there is an extension on the - first repetition but not on subsequent repetitions of the - repeatable primitive. Thanks to Igor Sirkovich for providing a - test case! - - - Fix an issue where the JPA server crashed while attempting to normalize string values - containing Korean text. Thanks to GitHub user @JoonggeonLee for reporting! - - - An issue was solved where it was possible for server interceptors - to have both processingCompletedNormally and handleException called - if the stream.close() method threw an exception. Thanks to Carlos - Eduardo Lara Augusto for investigating! - - - The @TagListParam]]> annotation has been removed. This - annotation had no use after DSTU1 but never got deleted and was misleading. Thanks - to Angelo Kastroulis for reporting! - - - A new method overload has been added to IServerInterceptor: - outgoingResponse(RequestDetails, ResponseDetails, HttpServletRequest, HttpServletResponse) - ]]>. This new method allows an interceptor to completely replace - the resource being returned with a different resource instance, or - to modify the HTTP Status Code being returned. All other "outgoingResponse" - methods have been deprecated and are recommended to be migrated - to the new method. This new method (with its RequestDetails and ResponseDetails - parameters) should be flexible enough to - accommodate future needs which means that this should be the last - time we have to change it. - - - The HAPI-FHIR-CLI now explicitly includes JAXB dependencies in its combined JAR - file. These were not neccesary prior to Java 9, but the JDK (mercifully) does - not include JAXB in the default classpath as of Java 9. This means that - it is possible to perform Schematron validation on Java 9. Thanks to - John Grimes for reporting and suggesting a fix! - - - An experimental interceptor called VersionedApiConverterInterceptor has been added, - which automaticaly converts response payloads to a client-specified version - according to transforms built into FHIR. - - - Searches which were embedded in a Bundle as a transaction or batch operation did - not respect any chained method parameters (e.g. MedicationRequest?medication.code=123). - Thanks to @manjusampath for reporting! - - - A few fixes went into the build which should now allow HAPI FHIR - to build correctly on JDK 9.0. Currently building is supported on - JDK 8.x and 9.x only. - - - Client requests with an - Accept]]> - header value of - application/json]]> - will now be served with the non-legacy content type of - application/fhir+json]]> - instead of the legacy - application/json+fhir]]>. - Thanks to John Grimes for reporting! - - - Fixed a regression in server where a count parameter in the form - @Count IntegerType theCount]]> - caused an exception if the client made a request with - no count parameter included. Thanks to Viviana Sanz for reporting! - - - A bug in the JPA server was fixed where a Subscription incorrectly created - without a status or with invalid criteria would cause a crash during - startup. - - - ResponseHighlightingInterceptor now properly parses _format - parameters that include additional content (e.g. - _format=html/json;fhirVersion=1.0]]>) - - - Stale search deleting routine on JPA server has been adjusted - to delete one search per transaction instead of batching 1000 - searches per transaction. This should make the deletion logic - more tolerant of deleting very large search result sets. - - - Avoid refreshing the search parameter cache from an incoming client - request thread, which caused unneccesary delays for clients. - - - An occasional crash in the JPA was fixed when using unique search - parameters and updating a resource to no longer match - one of these search parameters. - - - Avoid an endless loop of reindexing in JPA if a SearchParameter is - created which indexed the SearchParameter resource itself - - - JPA server now performs temporary/placeholder ID substitution processing on elements in - resources which are of type "URI" in addition to the current substitution for - elements of type "Reference". Thanks to GitHub user @t4deon for supplying - a testcase! - - - Deleting a resource from the testpage overlay resulted in an error page after - clicking "delete", even though the delete succeeded. - - - A number of info level log lines have been reduced to debug level in the JPA server, in - order to reduce contention during heavy loads and reduce the amount of noise - in log files overall. A typical server should now see far less logging coming - from HAPI, at least at the INFO level. - - - JPA server now correctly indexes custom search parameters which - have multiple base resource types. Previously, the indexing could - cause resources of the wrong type to be returned in a search - if a parameter being used also matched that type. Thanks - to Dave Carlson for reporting! - - - A new IResourceProvider implementation called - HashMapResourceProvider - ]]> - has been added. This is a complete resource provider - implementation that uses a HashMap as a backing store. This class - is probably of limited use in real production systems, but it - cam be useful for tests or for static servers with small amounts - of data. - - - An issue in the JPA server was corrected where searching using - URI search parameters would sometimes not include the resource type in the - criteria. This meant, for example, that a search for - ValueSet?url=http://foo]]> would also - match any CodeSystem resource that happened to also have - that URL as the value for the "url" search parameter. Thanks - to Josh Mandel for reporting and supplying a test case! - - - DateParam class now has equals() and hashCode() implementations. Thanks - to Gaetano Gallo for the pull request! - - - Fix a bug where under certain circumstances, duplicate contained resources - could be output by the parser's encode methods. Thanks to - Frank Tao for supplying a test case! - - - The client LoggingInterceptor now includes the number of - milliseconds spent performing each call that is logged. - - - ReferenceParam has been enhanced to properly return the resource type to - user code in a server via the ReferenceType#getResourceType() method - if the client has specified a reference parameter with - a resource type. Thanks to @CarthageKing for the pull request! - - - An entry has been added to ResourceMetadataKeyEnum which allows extensions - to be placed in the resource metadata section in DSTU2 resource (this is - possible already in DSTU3+ resources as Meta is a normal model type, but - the older structures worked a bit differently. Thanks to GitHub user - sjanic for the contribution! - - - An example project has een contributed which shows how to use the CQL - framework in a server with HAPI FHIR JPA. Thanks to Chris Schuler - for the pull request! - - - A new module has been contributed called hapi-fhir-jpaserver-elasticsearch - which adds support for Elasticsearch instead of raw Lucene for fulltext - indexing. Testing help on this would be appreciated! Thanks to - Jiajing Liang for the pull request! - - - JAX-RS server now supports R4 and DSTU2_1 FHIR versions, which were - previously missing. Thanks to Clayton Bodendein for the pull - request! - - - AuthorizationInterceptor did not correctly handle authorization against - against a compartment where the compartment owner was specified - as a list of IDs. Thanks to Jiajing Liang for the pull request! - - - REST HOOK subscriptions in the JPA server now support having - an empty/missing Subscription.channel.payload value, which - is supported according to the FHIR specification. Thanks - to Jeff Chung for the pull request! - - - JPA Server Operation Interceptor create/update methods will now no - longer be fired if the create/update operation being performed - is a no-op (e.g. a conditional create that did not need to perform - any action, or an update where the contents didn't actually change) - - - JPA server sometimes updated resources even though the client - supplied an update with no actual changes in it, due to - changes in the metadata section being considered content - changes. Thanks to Kyle Meadows for the pull request! - - - A new example project has been added called hapi-fhir-jpaserver-dynamic, - which uses application/environment properties to configure which version - of FHIR the server supports and other configuration. Thanks to - Anoush Mouradian for the pull request! - - - A new example project showing the use of JAX-RS Server Side Events has - been added. Thanks to Jens Kristian Villadsen for the pull request! - - - An unneccesary reference to the Javassist library has been - removed from the build. Thanks to Łukasz Dywicki for the - pull request! - - - Support has been added to the JPA server for the :not modifier. Thanks - to Łukasz Dywicki for the pull request! - - - Suport for the :contains string search parameter modifier has been added to - the JPA server. Thanks to Anthony Sute for the pull request! - - - All instances of DefaultProfileValidationSupport (i.e. one for - each version of FHIR) have been fixed so that they explicitly - close any InputStreams they open in order to read the built-in - profile resources. Leaving these open caused resource starvation - in some cases under heavy load. - -
    - - - Support for custom search parameters has been backported in the JPA server - from DSTU3 back to DSTU2. As of this release of HAPI, full support for custom - search parameters exists in all supported versions of FHIR. - - - A new set of methods have been added to - IServerOperationInterceptor]]> - called - resourcePreCreate]]>, - resourcePreUpdate]]>, and - resourcePreDelete]]>. These - methods are called within the database transaction - (just as the existing methods were) but are invoked - prior to the contents being saved to the database. This - can be useful in order to allow interceptors to - change payload contents being saved. - - - A few redundant and no longer useful methods have been marked as - deprecated in - IServerInterceptor]]>. If you have implemented - custom interceptors you are recommended to migrate to the recommended - methods. - - - A new method has been added to RequestDetails called - setRequestContents()]]> which can be used - by interceptors to modify the request body before it - is parsed by the server. - - - Fix a crash in JPA server when performing a recursive - _include]]> which doesn't actually find any matches. - - - When encoding URL parameter values, HAPI FHIR would incorrectly escape - a space (" ") as a plus ("+") insetad of as "%20" as required by - RFC 3986. This affects client calls, as well as URLs generated by - the server (e.g. REST HOOK calls). Thanks to James Daily for reporting! - - - Searching in JPA server using a combination of _content and _id parameters - failed. Thanks to Jeff Weyer for reporting! - - - A new configuration option has been added to DaoConfig which allows newly created - resources to be assigned a UUID by the server instead of a sequential ID - - - An unneccesary column called "MYHASHCODE" was added to the - HFJ_TAG_DEF table in the JPA server schema - - - A few log entries emitted by the JPA server suring every search have been reduced - from INFO to DEBUG in order to reduce log noise - - - Fix an issue in JPA server where updating a resource sometimes caused date search indexes to - be incorrectly deleted. Thanks to Kyle Meadows for the pull request! - - - Servers did not return an ETag if the version was provided on a - DSTU3/R4 structure in the getMeta() version field instead of in the - getIdElement() ID. Thanks to GitHub user @Chrisjobling for reporting! - - - A bug was fixed in the JPA server when performing a validate operation with a mode - of DELETE on a server with referential integrity disabled, the validate operation would delete - resource reference indexes as though the delete was actually happening, which negatively - affected searching for the resource being validated. - - - The HAPI FHIR Server framework now has initial support for - multitenancy. At this time the support is limited to the server - framework (not the client, JPA, or JAX-RS frameworks). See - Server Documentation - ]]> - for more information. - - - - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Spring (JPA): 4.3.10 -> 5.0.0
  • -
  • Jackson (JPA): 2.8.1 -> 2.9.2
  • - - ]]> -
    - - The Android client module has been restored to working order, and no longer - requires a special classifier or an XML parser to be present in order to - work. This means that the hapi-fhir-android library is much less likely - to cause conflicts with other libraries imported into an Android application - via Gradle. -
    ]]> - See the - HAPI FHIR Android Documentation]]> - for more information. As a part of this fix, all dependencies on - the StAX API have been removed in environments where StAX is not - present (such as Android). The client will now detect this case, and - explicitly request JSON payloads from servers, meaning that Android clients - no longer need to include two parser stacks -
    - - A performance to the JPA server has been made which reduces the number - of writes to index tables when updating a resource with contents that - only make minor changes to the resource content. In many cases this can - noticeably improve update performance. - - - In FHIR DSTU3 the - ValueSet/$expand?identifier=foo]]> - and - ValueSet/$validate-code?identifier=foo]]> - parameters were changed to - ValueSet/$expand?url=foo]]> - and - ValueSet/$validate-code?url=foo]]> - respectively, but the JPA server had not caught up. The - JPA DSTU3 server has been adjusted to accept either "identifier" - or "url" (with "url" taking precedence), and the JPA R4 server - has been changed to only accept "url". - Thanks to Avinash Shanbhag for reporting! - - - Fix an error in JPA server when using Derby Database, where search queries with - a search URL longer than 255 characters caused a mysterious failure. Thanks to - Chris Schuler and Bryn Rhodes for all of their help in reproducing this issue. - - - JPA server now supports the use of the - Cache-Control]]> - header in order to allow the client to selectively disable the - search result cache. This directive can also be used to disable result paging - and return results faster when only a small number of results is needed. - See the - JPA Page]]> - for more information. - - - In certain cases in the JPA server, if multiple threads all attempted to - update the same resource simultaneously, the optimistic lock failure caused - a "gap" in the history numbers to occur. This would then cause a mysterious - failure when trying to update this resource further. This has been - resolved. - - - JPA Server search/history results now set the ID of the returned Bundle to - the ID of the search, meaning that if a search returns results from the Query - cache, it will reuse the ID of the previously returned Bundle - - - Fix a NullPointerException when validating a Bundle (in DSTU3/R4) with no - Bundle.type]]> value - - - The JPA server transaction operation (DSTU3/R4) did not correctly process the - If-Match header when passed in via - Bundle.entry.request.ifMatch]]> value - - - In Apache client, remove a log message at WARN level when the response does not - specify a charset. This log line often showed up any time a server was not supplying - a response, making client logs quite noisy - - - A new configuration item has been added to the JPA server DaoConfig - called - getCountSearchResultsUpTo()]]>. - This setting governs how many search results the search - coordinator should try to find before returning an initial - search response to the user, which has an effect on whether - the - Bundle.total]]> - field is always populated in search responses. This has now - been set to 20000 on out public server (fhirtest.uhn.ca) - so most search results should now include a total. - - - Remove a bunch of exceptions in the org.hl7.fhir.exception package from the - hapi-fhir-base module, as they were also duplicated in the - hapi-fhir-utilities module. - - - The DSTU2 XhtmlDt type has been modified so that it no longer uses - the StAX XMLEvent type as its internal model, and instead simply uses - a String. New methods called "parse" and "encode" have been added - to HAPI FHIR's XmlUtil class, which can be used to convert - between a String and an XML representation. This should allow - HAPI FHIR to run in environments where StAX is not available, such - as Android phones. - - - Restored the - org.hl7.fhir.r4.model.codesystem.*]]> - classes (which are Java Enums for the various FHIR codesystems). - These were accidentally removed in HAPI FHIR 3.0.0. Thanks to - GitHub user @CarthageKing for reporting! - - - The resource Profile Validator has been enhanced to not try to validate - bound fields where the binding strength is "example", and a crash was - resolved when validating QuestionnaireResponse answers with a type - of "choice" where the choice was bound to a ValueSet. - - - Remove the fake "Test" resource from DSTU2 structures. This was not - a real resource type, and caused conflicts with the .NET client. Thanks to - Vlad Ignatov for reporting! - - - Parsing a DSTU3/R4 custom structure which contained a field of - a custom type caused a crash during parsing. Thanks to - GitHub user @mosaic-hgw for reporting! - - - Client logic for checking the version of the connected - server to ensure it is for the correct version of FHIR now - includes a check for R4 servers. Thanks to Clayton Bodendein - for the pull request, including a number of great tests! - - - JAX-RS client framework now supports the ability to - register your own JAX-RS Component Classes against the client, - as well as better documentation about thread safety. Thanks - to Sébastien Rivière for the pull request! - - - Processing of the If-Modified-Since header on FHIR read operations was reversed, - returning a 304 when the resource had been modified recently. Thanks to - Michael Lawley for the pull request! - - - Add Prefer and Cache-Control]]> to the list of headers which are declared - as - being acceptable for CORS requests in CorsInterceptor, CLI, and JPA Example. - Thanks to Patrick Werner for the pull request! - - - DSTU2-hl7org and DSTU2.1 structures did not copy resource IDs when invoking - copyValues(). Thanks to Clayton Bodendein for the pull request! - - - When encoding a Binary resource, the Binary.securityContext field - was not encoded correctly. Thanks to Malcolm McRoberts for the pull - request with fix and test case! - - - Bundle resources did not have their version encoded when serializing - in FHIR resource (XML/JSON) format. - - - The Binary resource endpoint now supports the X-Security-Context]]> header when - reading or writing Binary contents using their native Content-Type (i.e exchanging - the raw binary with the server, as opposed to exchanging a FHIR resource). - - - When paging through multiple pages of search results, if the - client had requested a subset of resources to be returned using the - _elements]]> parameter, the elements list - was lost after the first page of results. - In addition, elements will not remove elements from - search/history Bundles (i.e. elements from the Bundle itself, as opposed - to elements in the entry resources) unless the Bundle elements are - explicitly listed, e.g. _include=Bundle.total]]>. - Thanks to @parisni for reporting! - - - Add support for Spring Boot for initializing a number of parts of the library, - as well as several examples. - See the - Spring Boot samples]]> - for examples of how this works. - Thanks to Mathieu Ouellet for the contribution! - - - JPA server now has lucene index support moved to separate classes from the entity - classes in order to facilitate support for ElasticSearch. Thanks to Jiang Liang - for the pull request! - hibernate.search.model_mapping. See this line in the example project. - ]]> - - - A new client interceptor has been added called - AdditionalRequestHeadersInterceptor, which allows - a developer to add additional custom headers to a - client requests. - Thanks to Clayton Bodendein for the pull request! - - - An issue was fixed in JPA server where extensions on primitives which - are nestedt several layers deep are lost when resources are retrieved - - - Conditional deletes in JPA server were incorrectly denied by AuthorizationInterceptor - if the delete was permitted via a compartment rule. Thanks to Alvin Leonard for the - pull request! - - - JAX-RS server module was not able to generate server CapabilityStatement for - some versions of FHIR (DSTU2_HL7ORG, DSTU2_1, or R4). Thanks to Clayton Bodendein for the Pull Request! - - - When a server method throws a DataFormatException, the error will now be converted into - an HTTP 400 instead of an HTTP 500 when returned to the client (and a stack - trace will now be returned to the client for JAX-RS server if configured to - do so). Thanks to Clayton Bodendein for the pull request! - - - JAX-RS server conformance provider in the example module passed in the - server description, server name, and server version in the incorrect order. - Thanks to Clayton Bodendein for the pull request! - - - The learn more links on the website home page had broken links. Thanks to - James Daily for the pull request to fix this! - - - Prevent a crash in AuthorizationInterceptor when processing transactions - if the interceptor has rules declared which allow resources to be read/written - by "any ID of a given type". Thanks to GitHub user @dconlan for the pull - request! - -
    - - - Support for FHIR R4 (current working draft) has been added]]> - (in a new module called hapi-fhir-structures-r4]]>) - and - support for FHIR DSTU1 (hapi-fhir-structures-dstu]]>) - has been removed]]>. Removing support for the legacy - DSTU1 FHIR version was a difficult decision, but it allows us the - opportunitity to clean up the codebase quite a bit, and remove some - confusing legacy parts of the API (such as the legacy Atom Bundle class). -
    ]]> - A new redesigned table of HAPI FHIR versions to FHIR version support has been - added to the Download Page]]> -
    - - HAPI FHIR's modules have been restructured for more consistency and less coupling - between unrelated parts of the API. -
    ]]> - A new complete list of HAPI FHIR modules has been added to the - Download Page]]>. Key changes - include: - -
  • - HAPI FHIR's client codebase has been moved out of hapi-fhir-base - and in to a new module called hapi-fhir-client. Client users now need - to explicitly add this JAR to their project (and non-client users now no longer - need to depend on it) -
  • -
  • - HAPI FHIR's server codebase has been moved out of hapi-fhir-base - and in to a new module called hapi-fhir-server. Server users now need - to explicitly add this JAR to their project (and non-server users now no longer - need to depend on it) -
  • -
  • - As a result of the client and server changes above, we no longer need to produce - a special Android JAR which contains the client, server (which added space but was - not used) and structures. There is now a normal module called hapi-fhir-android - which is added to your Android Gradle file along with whatever structures JARs you - wish to add. See the - Android Integration Test - to see a sample project using HAPI FHIR 3.0.0. Note that this has been reported to - work by some people but others are having issues with it! In order to avoid delaying - this release any further we are releasing now despite these issues. If you are an Android - guru and want to help iron things out please get in touch. If not, it might be a good - idea to stay on HAPI FHIR 2.5 until the next point release of the 3.x series. -
  • -
  • - A new JAR containing FHIR utilities called hapi-fhir-utilities has been - added. This JAR reflects the ongoing harmonization between HAPI FHIR and the FHIR - RI codebases and is generally required in order to use HAPI at this point (if you - are using a dependency manager such as Maven or Gradle it will be brought in to your - project automatically as a dependency) -
  • - - ]]> -
    - - In order to allow the reoganizations and decoupling above to happen, a number of important classes - and interfaces have been moved to new packages. A sample list of these changes is listed - below. When upgrading to 3.0.0 your project may well show a number of compile errors - related to missing classes. In most cases this can be resolved by simply removing the HAPI - imports from your classes and asking your IDE to "Organize Imports" once again. This is an - annoying change we do realize, but it is neccesary in order to allow the project to - continue to grow. - -
  • IGenericClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
  • -
  • IRestfulClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
  • -
  • AddProfileTagEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
  • -
  • IVersionSpecificBundleFactory moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
  • -
  • BundleInclusionRule moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
  • -
  • RestSearchParameterTypeEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
  • -
  • EncodingEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
  • -
  • Constants moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
  • -
  • IClientInterceptor moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
  • -
  • ITestingUiClientFactory moved from package ca.uhn.fhir.util to package ca.uhn.fhir.rest.server.util
  • - - ]]> -
    - - Because the Atom-based DSTU1 Bundle class has been removed from the library, users of the - HAPI FHIR client must now always include a Bundle return type in search calls. For example, - the following call would have worked previously: - -Bundle bundle = client.search().forResource(Patient.class)
    - .where(new TokenClientParam("gender").exactly().code("unknown"))
    - .prettyPrint()
    - .execute();

    - ]]> - This now needs an explicit returnBundle statement, as follows: - -Bundle bundle = client.search().forResource(Patient.class)
    - .where(new TokenClientParam("gender").exactly().code("unknown"))
    - .prettyPrint()
    - .returnBundle(Bundle.class)
    - .execute();
    - ]]> -
    - - The version of a few dependencies have been bumped to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Gson (JSON Parser): 2.8.0 -> 2.8.1
  • -
  • Commons-lang3 (Everywhere): 3.5 -> 3.6
  • - -
  • Apache HttpClient (FHIR Client): 4.5.2 -> 4.5.3
  • -
  • Apache HttpCore (FHIR Client): 4.4.5 -> 4.4.6
  • -
  • Phloc Commons (Schematron Validator): 4.4.6 -> 4.4.11
  • -
  • Hibernate (JPA): 5.2.9 -> 5.2.10
  • -
  • Hibernate Search (JPA): 5.7.0 -> 5.7.1
  • -
  • Spring (JPA): 4.3.7 -> 4.3.10
  • -
  • Spring Data JPA (JPA): 1.10.4 -> 1.11.6
  • -
  • Guava (JPA): 22.0 -> 23.0
  • -
  • Thymeleaf (Testpage Overlay): 3.0.2 -> 3.0.7
  • -
  • OkHttp (Android): 3.4.1 -> 3.8.1
  • - - ]]> -
    - - JPA Subscription support has been refactored. A design contributed - by Jeff Chung for the REST Hook subscription module has been ported - so that Websocket subscriptions use it too. This design uses an - interceptor to scan resources as they are processed to test whether - they should be delivered to subscriptions, instead of using a - polling design. -
    ]]> - In addition, this scanning has been reworked to happen in a separate - thread from the main storage thread, which should improve - performance and scalability of systems with multiple - subscriptions. Thanks to Jeff for all of his work on this! -
    - - hapi-fhir-client-okhttp project POM had dependencies on both - hapi-fhir-structures-dstu2 and hapi-fhir-structures-dstu3, which - meant that any project using ookhttp would import both structures - JARs. This has been removed. - - - JPA server is now able to handle placeholder IDs (e.g. urn:uuid:00....000) - being used in Bundle.entry.request.url as a part of the conditional URL - within transactions. - - - Schematron validator now applies invariants to resources within a Bundle, not - just to the outer Bundle resource itself - - - Server and Client both still included Category header for resource tags even though - this feature was only present in FHIR DSTU1 and was removed from the specification in - FHIR DSTU2. The presence of these headers sometimes caused parsed resource instances - to contain duplicate tags - - - When using the AuthorizationInterceptor with the JPA server, when a client is updating a resource - from A to B, the user now needs to have write permission for both A and B. This is particularly - important for cases where (for example) an Observation is being updated from having a subject of - Patient/A to Patient/B. If the user has write permission for Patient/B's compartment, this would - previously have been allowed even if the user did not have access to write to Patient/A's compartment. - Thanks to Eeva Turkka for reporting! - - - IServerOperationInterceptor now has a new method - resourceUpdated(RequestDetails, IBaseResource, IBaseResource)]]> - which replaces the previous - resourceUpdated(RequestDetails, IBaseResource)]]>. This allows - interceptors to be notified of resource updates, but also see what the resource - looked like before the update. This change was made to support the change above, but - seems like a useful feature all around. - - - Allow DateParam (used in servers) to handle values with MINUTE precision. Thanks to - Christian Ohr for the pull request! - - - Fix HTTP 500 error in JPA server if a numeric search parameter was supplied with no value, e.g. - GET /Observation?value-quantity=]]> - - - JPA server transaction processing now honours the Prefer header and includes - created and updated resource bodies in the response bundle if it is set - appropriately. - - - Optimize queries in JPA server remove a few redundant select columns when performing - searches. This provides a slight speed increase in some cases. - - - Add configuration to JPA server DaoConfig that allows a maximum - number of search results to be specified. Queries will never return - more than this number, which can be good for avoiding accidental - performance problems in situations where large queries should not be - needed - - - Prevent duplicates in $everything query response in JPA server. Thanks to @vlad-ignatov - for reporting! - - - Fix issue in calling JPA server transactions programmatically where resources - are linked by object reference and not by ID where indexes were not correctly - generated. This should not affect most users. - - - Fix issue in SubscriptionInterceptor that caused interceptor to only - actually notify listeners of the first 10 subscriptions. Thanks to Jeff Chung - for the pull request! - - - Fix potential ConcurrentModificationException when adding subscriptions while - running under heavy load. Thanks to Jeff Chung for the pull request! - - - JPA search now uses hibernate ScrollableResults instead of plain JPA List. This - should improve performance over large search results. - - - JPA servers with no paging provider configured, or with a paging provider other than - DatabaseBackedPagingProvider will load all results in a single pass and keep them - in memory. Using this setup is not a good idea unless you know for sure that you - will never have very large queries since it means that all results will be loaded into - memory, but there are valid reasons to need this and it will perform better than - paging to the database in that case. This fix also resolves a NullPointerException - when performing an $everything search. Thanks to Kamal Othman for reporting! - - - Correct an issue in JPA server on Postgres where searches with a long search URL - were not able to be automatically purged from the database after they were scheduled - for deletion. Thanks to Ravi Kuchi for reporting! - - - Add an optional and configurable hard limit on the total number of meta items - (tags, profiles, and security labels) on an individual resource. The default - is 1000. - - - When executing a search (HTTP GET) as a nested operation in in a transaction or - batch operation, the search now returns a normal page of results with a link to - the next page, like any other search would. Previously the search would return - a small number of results with no paging performed, so this change brings transaction - and batch processing in line with other types of search. - - - JPA server no longer returns an OperationOutcome resource as the first resource - in the Bundle for a response to a batch operation. This behaviour was previously - present, but was not specified in the FHIR specification so it caused confusion and - was inconsistent with behaviour in other servers. - - - Fix a regression in HAPI FHIR 2.5 JPA server where executing a search in a - transaction or batch operation caused an exception. Thanks to Ravi Kuchi for - reporting! - - - Correct an issue when processing transactions in JPA server where updates and - creates to resources with tags caused the tags to be created twice in the - database. These duplicates were utomatically filtered upon read so this issue - was not user-visible, but it coule occasionally lead to performance issues - if a resource containing multiple tags was updated many times via - transactions. - - - JPA server should not allow creation of resources that have a reference to - a resource ID that previously existed but is now deleted. Thanks to Artem - Sopin for reporting! - - - JpaConformanceProvider now has a configuration setting to enable and - disable adding resource counts to the server metadata. - - - Avoid a deadlock in JPA server when the RequestValidatingInterceptor is being - used and a large number of resources are being created by clients at - the same time. - - - Testpage Overlay's transaction method did not work if the response - Bundle contained any entries that did not contain a resource (which - is often the case in more recent versions of HAPI). Thanks to Sujay R - for reporting! - - - When the server was returning a multi-page search result where the - client did not explicitly request an encoding via the _format - parameter, a _format parameter was incorrectly added to the paging - links in the response Bundle. This would often explicitly request - XML encoding because of the browser Accept header even though - this was not what the client wanted. - - - Enhancement to ResponseHighlighterInterceptor where links in the resource - body are now converted to actual clickable hyperlinks. Thanks to Eugene Lubarsky - for the pull request! - - - BanUnsupportedHttpMethodsInterceptor has been modified so that it now allows - HTTP PATCH to proceed. - - - Enhancement to ResponseHighlighterInterceptor so that it now can be configured - to display the request headers and response headers, and individual lines - may be highlighted. - - - AuthorizationInterceptor did not permit PATCH operations to proceed even - if the user had write access for the resource being patched. - - - Fix an issue in HapiWorkerContext where structure definitions are - not able to be retrieved if they are referred to by their - relative or logical ID. This affects profile tooling such as - StructureMapUtilities. Thanks to Travis Lukach for reporting and - providing a test case! - - - Add link to DSTU3 JavaDocs from documentation index. Thanks - to Vadim Peretokin for the pull request! - - - Fix a typo in the documentation. Thanks to Saren Currie - for the pull request! - - - Add a command line flag to the CLI tool to allow configuration of the - server search result cache timeout period. Thanks to Eugene Lubarsky - for the pull request! - - - Correct an issue with the model classes for STU3 where any classes - containing the @ChildOrder annotation (basically the conformance - resources) will not correctly set the order if any of the - elements are a choice type (i.e. named "foo[x]"). Thanks to - GitHub user @CarthageKing for the pull request! - - - Fix potential deadlock in stale search deleting task in JPA server, as well - as potential deadlock when executing transactions containing nested - searches when operating under extremely heavy load. - - - JPA server transaction operations now put OperationOutcome resources resulting - from actions in - Bundle.entry.response.outcome]]> - instead of the previous - Bundle.entry.resource]]> - - - An issue was corrected where search parameters containing negative numbers - were sometimes treated as positive numbers when processing the search. Thanks - to Keith Boone for reporting and suggesting a fix! - - - Fix an unfortunate typo in the custom structures documentation. Thanks to - Jason Owen for the PR! - - - Correct an issue in the validator (DSTU3/R4) where elements were not always - correctly validated if the element contained only a profiled extension. Thanks - to Sébastien Rivière for the pull request! - - - Testing UI now has a dropdown for modifiers on token search. Thanks - to GitHub user @dconlan for the pull request! - - - When parsing an incomplete ID with the form http://my.org/Foo]]> into - IdDt and IdType objects, the Foo portion will now be treated as the resource type. - Previously my.org was treated as the resource type and Foo was treated as the ID. Thanks - to GitHub user @CarthageKing for the pull request! - - - Extensions on ID datatypes were not parsed or serialized correctly. Thanks to - Stephen Rivière for the pull request! - - - Fix a bug in REST Hook Subscription interceptors which prevented subscriptions - from being activated. Thanks to Jeff Chung for the pull request! - - - Fix broken links in usage pattern diagram on website. Thanks to - Pascal Brandt for the pull request! - - - Fix incorrect FHIR Version Strings that were being outputted and verified in the - client for some versions of FHIR. Thanks to Clayton Bodendein for the - pull request! - - - Add a new constructor to SimpleRequestHeaderInterceptor which allows a complete header - to be passed in (including name and value in one string) - - - REST Hook subscriptions now honour the Subscription.channel.header field - - - DSTU2 validator has been enhanced to do a better job handling - ValueSets with expansions pointing to other ValueSets - - - REST HOOK subscriptions now use HTTP PUT if there is a payload type - specified, regardless of whether the source event was a create or an - update - - - Add appropriate import statements for logging to JPA demo code. Thanks to - Rob Hausam for the pull request! - - - Add some browser performance logging to ResponseHighlightingInterceptor. Thanks - to Eugene Lubarsky for the pull request, and for convincing James not to - optimize something that did not need optimizing! - - - A new config property has been added to the JPA seerver DaoConfig called - "setAutoCreatePlaceholderReferenceTargets". - This property causes references to unknown resources in created/updated resources to have a placeholder - target resource automatically created. - - - The server LoggingInterceptor has had a variable called - processingTimeMillis]]> which logs the number - of milliseconds the server took to process a given request since - HAPI FHIR 2.5, but this was not documented. This variable has now been - documented as a part of the available features. - - - A new experimental feature has been added to the JPA server which allows - you to define certain search parameter combinations as being resource keys, - so that a database constraint will prevent more than one resource from - having a matching pair - - - When using the client LoggingInterceptor in non-verbose mode, the - log line showing the server's response HTTP status will now also include - the returned - Location]]> header value as well - - - A new flag has been add to the CLI upload-definitions command - "-e" which allows skipping particular resources - - - An issue in JPA server has been corrected where if a CodeSystem - resource was deleted, it was not possible to create a new resource - with the same URI as the previous one - - - When uploading a Bundle resource to the server (as a collection or - document, not as a transaction) the ID was incorrectly stripped from - resources being saved within the Bundle. This has been corrected. - - - Subscriptions in JPA server now support "email" delivery type through the - use of a new interceptor which handles that type - - - JPA server can now be configured to not support - :missing]]> modifiers, which - increases write performance since fewer indexes are written - - - A new JPA configuration option has been added to the DaoConfig which allows - support for the :missing]]> search parameter modifier - to be enabled or disabled, and sets the default to DISABLED. -
    ]]> - Support for this parameter causes many more index rows to be inserted in the database, - which has a significant impact on write performance. A future HAPI update may allow these - rows to be written asynchronously in order to improve this. -
    -
    - - -
    -
      -
    • - Searches with multiple search parameters of different - datatypes (e.g. find patients by name and date of birth) - were previously joined in Java code, now the join is - performed by the database which is faster -
    • -
    • - Searches which returned lots of results previously has all - results streamed into memory before anything was returned to - the client. This is particularly slow if you do a search for - (say) "get me all patients" since potentially thousands or - even millions of patients' IDs were loaded into memory - before anything gets returned to the client. HAPI FHIR - now has a multithreaded search coordinator which returns - results to the client as soon as they are available -
    • -
    • - Search results will be cached and reused (so that if a client - does two searches for "get me all patients matching FOO" - with the same FOO in short succession, we won't query the DB - again but will instead reuse the cached results). Note that - this can improve performance, but does mean that searches can - return slightly out of date results. Essentially what this means - is that the latest version of individual resources will always - be returned despite this cacheing, but newly created resources - that should match may not be returned until the cache - expires. By default this cache has been set to one minute, - which should be acceptable for most real-world usage, but - this can be changed or disabled entirely. -
    • -
    • - Updates which do not actually change the contents of the resource - can optionally be prevented from creating a new version - of the resource in the database -
    • -
    -

    - Existing users should delete the - HFJ_SEARCH, - HFJ_SEARCH_INCLUDE, - and - HFJ_SEARCH_RESULT - tables from your database before upgrading, as the structure of these tables - has changed and old search results can not be reused. - ]]> -
    - - AuthorizationInterceptor did not correctly handle paging requests - (e.g. requests for the second page of results for a search operation). - Thanks to Eeva Turkka for reporting! - - - Add configuration property to DSTU3 FhirInstanceValidator to - allow client code to change unknown extension handling behaviour. - - - Fix concurrency issues in FhirContext that were causing issues when - starting a context up on Android. Thanks to GitHub issue @Jaypeg85 for - the pull request! - - - Fix an issue in the JPA server if a resource has been previously - saved containing vocabulary that is no longer valid. This only really - happened if you were using a non-final version of FHIR (e.g. using DSTU3 - before it was finalized) but if you were in this situation, upgrading HAPI - could cause you to have old codes that no longer exist in your database. This - fix prevents these from blocking you from accesing those resources. - - - CLI now defaults to DSTU3 mode if no FHIR version is specified - - - Server and annotation-client @History annotation now allows DSTU3+ resource - types in the type= property - - - JSON Parser gave a very unhelpful error message (Unknown attribute 'value' found during parse) - when a scalar value was found in a spot where an object is expected. This has been corrected to - include much more information. Thanks to GitHub user @jasminas for reporting! - - - DaoConfig#setInterceptors() has been un-deprecated. It was previously deprecated as - we thought it was not useful, but uses have been identified so it turns out this method - will live after all. Interceptors registered to this method will now be treated - appropriately if they implement IServerOperationInterceptor too. - - - JPA server did not correctly support searching on a custom search parameter whose - path pointed to an extension, where the client used a chained value. - - - Fix issue where the JSON parser sometimes did not encode DSTU3 extensions on the root of a - resource which have a value of type reference. - - - Server now respects the If-Modified-Since header and will return an HTTP 304 if appropriate - for read operations. - - - JPA server did not correctly process :missing qualifier on date parameters - - - AppacheHttpClient did not always respect the charset in the response - Content-Type header. Thanks to Gijsbert van den Brink for the pull request! - - - Fix XhtmlParser to correctly handle hexadecimal escaped literals. Thanks to - Gijsbert van den Brink for the Pull Request! - - - JPA server now has configurable properties that allow referential integrity - to be disabled for both writes and deletes. This is useful in some cases - where data integrity is not wanted or not possible. It can also be useful - if you want to delete large amounts of interconnected data quickly. -
    ]]> - A corresponding flag has been added to the CLI tool as well. -
    - - JPA server did not correctly support searching on a custom search parameter whose - path pointed to an extension, where the client used a chained value. - - - Fix dependency on commons-codec 1.4 in hapi-fhir-structures-dstu3, which was - preventing this library from being used on Android because Android includes - an older version of commons-codec. - - - JPA server failed to index search parameters on paths containing a decimal - data type - - - Validator incorrectly rejected references where only an identifier was populated - - - Make error handler in the client more tolerant of errors where no response has - been received by the client when the error happens. Thanks to GitHub - user maclema for the pull request! - - - Add a check in JPA server that prevents completely blank tags, profiles, and security labels - from being saved to the database. These were filtered out anyhow when the - result was returned back to the client but they were persisted which - just wasted space. - - - Loading the build-in profile structures (StructureDefinition, ValueSet, etc) is now done in - a synchronized block in order to prevent multiple loads happening if the server processes - multiple validations in parallel threads right after startup. Previously a heavy load could - cause the server to run out of memory and lock up. Thanks to Karl M Davis - for analysis and help fixing this! - - - Fix bad ValueSet URL in DeviceRequest profile definition for STU3 which - was preventing the CLI from uploading definitions correctly. Thanks to - Joel Schneider for the Pull Request! - - - Improve handling in JPA server when doing code:above and code:below - searches to use a disjunction of AND and IN in order to avoid failures - under certain conditions. Thanks to Michael Lawley for the pul request! - - - Fix an error where the JPA server sometimes failed occasional requests - with a weird NullPointerException when running under very large concurrent - loads. Thanks to Karl M. Davis for reporting, investigating, and ultimately - finding a solution! - -
    - - - This release brings the DSTU3 structures up to FHIR R3 (FHIR 3.0.1) definitions. Note that - there are very few changes between the DSTU3 structures in HAPI FHIR 2.3 and - the ones in HAPI FHIR 2.4 since the basis for the DSTU3 structures in HAPI FHIR - 2.3 was the R3 QA FHIR version (1.9.0) but this is the first release of - HAPI FHIR to support the final/complete R3 release. - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Hibernate (JPA): 5.2.7 -> 5.2.9
  • -
  • Hibernate Search (JPA): 5.5.7.CR1 -> 5.2.7.Final
  • -
  • Hibernate Validator (JPA): 5.3.4 -> 5.4.1
  • -
  • Spring (JPA): 4.3.6 -> 4.3.7
  • -
  • Gson (Core): 2.7 -> 2.8.0
  • -
  • Guava (JPA): 19.0 -> 21.0
  • -
  • SLF4j (Core): 1.7.21 -> 1.7.25
  • -
  • Logback (Core): 1.1.7 -> 1.2.2
  • - - ]]> -
    - - hapi-fhir-jpaserver-example now includes the - Prefer]]> header in the list of - CORS headers. Thanks to GitHub user @elnin0815 for - the pull request! - - - AuthorizationInterceptor can now allow make read or write - authorization decisions on a resource by instance ID - - - Remove SupportingDocumentation resource from DSTU2 structures. This isn't - actually a resource in FHIR DSTU2 and its inclusion causes errors on clients - that don't understand what it is. Thanks to Travis Cummings and Michele Mottini for pointing this out. - - - Web testing UI displayed an error when a transaction was pasted into the UI - for a DSTU2 server. Thanks to Suresh Kumar for reporting! - - - DaoConfig#setAllowInlineMatchUrlReferences() now defaults to - true]]> since inline conditional references - are now a part of the FHIR specification. Thanks to Jan Dědek for - pointing this out! - - - hapi-fhir-jpaserver-base now exposes a - FhirInstanceValidator bean named "myInstanceValidatorDstu2"]]> - for DSTU2. A similar bean for DSTU3 was previously implemented. - - - hapi-fhir-jpaserver-example project now defaults to STU3 mode instead of - the previous DSTU2. Thanks to Joel Schneider for the pull request! - - - JPA server now has a setting on the DaoConfig to force it to treat - certain reference URLs or reference URL patterns as logical URLs instead - of literal ones, meaning that the server will not try to resolve these - URLs. Thanks to Eeva Turkka for the suggestion! - - - Add a utility method to JPA server: - IFhirResourceDao#removeTag(IIdType, TagTypeEnum, String, String)]]>. This allows - client code to remove tags - from a resource without having a servlet request object in context. - - - JPA server was unable to process custom search parameters where - the path pointed to an extension containing a reference. Thanks - to Ravi Kuchi for reporting! - - - Servers in DSTU2.1 mode were incorrectly using the legacy mimetypes instead - of the new STU3 ones. Thanks to Michael Lawley for the pull request! - - - Add an option to ParserOptions that specifies that when parsing a bundle, the - ID found in the Bundle.entry.fullUrl should not override the ID found - in the Resource.id field. Technically these fields must always supply the - same ID in order for a server to be considered conformant, but this option allows - you to deal with servers which are behaving badly. Thanks to - GitHub user CarthageKing for the pul request! - - - Remove unneccesary whitespace in the text areas on the testing - web UI. Thanks to GitHub user @elnin0815 for the pull request! - - - In JAX-RS server it is now possible to change the server exception handler - at runtime without a server restart. - Thanks to Sebastien Riviere for the - pull request! - - - Fix a potential race condition when the FhirContext is being accessed by many threads - at the same time right as it is initializing. Thanks to Ben Spencer for the - pull request! - -
    - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Hibernate (JPA): 5.1.0 -> 5.2.7
  • -
  • Hibernate Search (JPA): 5.5.4 ->p; 5.7.0.CR1
  • -
  • Hibernate Validator (JPA): 5.2.4 ->p; 5.3.4
  • -
  • Spring (JPA): 4.3.1 -> 4.3.6
  • - - ]]> -
    - - The JPA server now supports custom search parameters in DSTU3 - mode. This allows users to create search parameters which contain - custom paths, or even override and disable existing search - parameters. - - - CLI example uploader couldn't find STU3 examples after CI server - was moved to build.fhir.org - - - Fix issue in JPA subscription module that prevented purging stale - subscriptions when many were present on Postgres - - - Server interceptor methods were being called twice unnecessarily - by the JPA server, and the DaoConfig interceptor registration - framework was not actually useful. Thanks to GitHub user - @mattiuusitalo for reporting! - - - AuthorizationInterceptor on JPA server did not correctly - apply rules on deleting resources in a specific compartment - because the resource metadata was stripped by the JPA server - before the interceptor could see it. Thanks to - Eeva Turkka for reporting! - - - JPA server exported CapabilityStatement includes - double entries for the _id parameter and uses the - wrong type (string instead of token). Thanks to - Robert Lichtenberger for reporting! - - - Custom resource types which extend Binary must not - have declared extensions since this is invalid in - FHIR (and HAPI would just ignore them anyhow). Thanks - to Thomas S Berg for reporting! - - - Standard HAPI zip/tar distributions did not include the project - sources and JavaDoc JARs. Thanks to Keith Boone for pointing - this out! - - - Server AuthorizationInterceptor always rejects history operation - at the type level even if rules should allow it. - - - JPA server terminology service was not correctly validating or expanding codes - in SNOMED CT or LOINC code systems. Thanks to David Hay for reporting! - - - Attempting to search for an invalid resource type (e.g. GET base/FooResource) should - return an HTTP 404 and not a 400, per the HTTP spec. Thanks to - GitHub user @CarthageKing for the pull request! - - - When parsing a Bundle containing placeholder fullUrls and references - (e.g. "urn:uuid:0000-0000") the resource reference targets did not get - populated with the given resources. Note that as a part of this - change, IdType and IdDt]]> have been modified - so that when parsing a placeholder ID, the complete placeholder including the - "urn:uuid:" or "urn:oid:" prefix will be placed into the ID part. Previously, - the prefix was treated as the base URL, which led to strange behaviour - like the placeholder being treated as a real IDs. Thanks to GitHub - user @jodue for reporting! - - - Declared extensions with multiple type() options listed in the @Child - annotation caused a crash on startup. Now this is supported. - - - STU3 XHTML parser for narrative choked if the narrative contained - an &rsquot;]]> entity string. - - - When parsing a quantity parameter on the server with a - value and units but no system (e.g. - GET [base]/Observation?value=5.4||mg]]>) - the unit was incorrectly treated as the system. Thanks to - @CarthageKing for the pull request! - - - Correct a typo in the JPA ValueSet ResourceProvider which prevented - successful operation under Spring 4.3. Thanks to - Robbert van Waveren for the pull request! - - - Deprecate the method - ICompositeElement#getAllPopulatedChildElementsOfType(Class)]]> - as it is no longer used by HAPI and is just an annoying step - in creating custom structures. Thanks to Allan Bro Hansen - for pointing this out. - - - CapturingInterceptor did not buffer the response meaning - that in many circumstances it did not actually capture - the response. Thanks to Jenny Syed of Cerner for - the pull request and contribution! - - - Clean up dependencies and remove Eclipse project files from git. Thanks to - @sekaijin for the pull request! - - - When performing a conditional create in a transaction in JPA server, - if a resource already existed matching the conditional expression, the - server did not change the version of the resource but did update the body - with the passed in body. Thanks to Artem Sopin for reporting and providing a test - case for this! - - - Client revincludes did not include the :recurse modifier. Thanks to - Jenny Meinsma for pointing this out on Zulip! - - - JPA server did not return an OperationOutcome in the response for - a normal delete operation. - - - Fix an issue in JPA server where _history results were kept in memory instead - of being spooled to the database as they should be. Note that as a part of this fix - a new method was added to - IBundleProvider called getUuid()]]>. This - method may return null]]> in any current cases. - - - Expanding a ValueSet in JPA server did not correctly apply - ?filter=]]> parameter when the ValueSet - being expanded had codes included explicitly (i.e. not by - is-a relationship). Thanks to David Hay for reporting! - - - JPA validator incorrectly returned an HTTP 400 instead of an HTTP 422 when - the resource ID was not present and required, or vice versa. Thanks to - Brian Postlethwaite for reporting! - - - When using an annotation based client, a ClassCastException would - occur under certain circumstances when the response contained - contained resources - - - JPA server interceptor methods for create/update/delete provided - the wrong version ID to the interceptors - - - A post-processing hook for subclasses of BaseValidatingInterceptor is now available. - - - AuthorizationInterceptor can now authorize (allow/deny) extended operations - on instances and types by wildcard (on any type, or on any instance) - - - When RequestValidatingInterceptor is used, the validation results - are now populated into the OperationOutcome produced by - create and update operations - - - Add support for the $process-message operation to fluent client. - Thanks to Hugo Soares for the pull request! - - - Parser can now be configured when encoding to use a specific - base URL for extensions. Thanks to Sebastien Riviere for the - pull request! - - - Correct the resource paths for the DSTU2.1 validation resources, - allowing the validator to correctly work against those structures. - Thanks to Michael Lawley for the pull request! - - - XML Parser failed to parse large field values (greater than 512 Kb) - on certain platforms where the StAX parser was overridden. Thanks to - GitHub user @Jodue for the pull request! - - - Remove an unneccesary database flush when saving large code systems to - the JPA database, improving performance of this operation. Thanks to - Joel Schneider for the pull request and analysis! - - - A new post-processing hook for subclasses of BaseValidatingInterceptor is now - available. The hook exposes the request details on validation failure prior to throwing an - UnprocessableEntityException. - -
    - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - - -
  • Derby (CLI): 10.12.1.1 -> 10.13.1.1
  • -
  • Jetty (CLI): 9.3.10.v20160621 -> 9.3.14.v20161028
  • -
  • JAnsi (CLI): 1.13 -> 1.14
  • -
  • Phloc Commons (SCH Validator): 4.4.5 -> 4.4.6
  • - - ]]> -
    - - Fix issue in AuthorizationIntetceptor where - transactions are blocked even when they - should not be - - - Fix regression in HAPI FHIR 2.1 JPA - server where some search parameters on - metadata resources did not appear - (e.g. "StructureDefinition.url"). Thanks - to David Hay for reporting! - - - Add ability to JPA server for disabling stale search - expiry. This is useful if you are deploying the server - to a cluster. - - - RestfulServer with no explicitly set FhirContext - fails to detect the presents of DSTU3 structures. Thanks - to GitHub user @vijayt27 for reporting! - - - As the - eBay CORS interceptor]]> - project - has gone dormant, we have introduced a new - HAPI server interceptor which can be used to implement CORS support - instead of using the previously recommended Servlet Filter. All server - examples as well as the CLI have been switched to use this new interceptor. - See the - CORS Documentation]]> - for more information. - - - Make the parser configurable so that when - parsing an invalid empty value (e.g. - {"status":""}]]>) the - parser will either throw a meaningful exception - or log a warning depending on the configured - error handler. - - - Fix issue when serializing resources that have - contained resources which are referred to - from multiple places. Sometimes when serializing - these resources the contained resource section - would contain duplicates. Thanks to Hugo Soares - and Stefan Evinance for reporting and providing - a test case! - - - Allow client to gracefully handle running in DSTU3 mode - but with a structures JAR that does not contain a - CapabilityStatement resource. Thanks to Michael Lawley - for the pull request! - - - Fix a crash in JPA server when searching using an _include if _include targets are - external references (and therefore can't be loaded - by the server). Thanks to Hannes Ulrich for reporting! - - - HAPI FHIR CLI failed to delete a file when uploading - example resources while running under Windows. - - - Server should reject update if the resource body - does not contain an ID, or the ID does not match - the request URL. Thanks to Jim Steel for reporting! - - - Web Testing UI's next and previous buttons for paging - through paged results did not work after the migration - to using Thymeleaf 3. Thanks to GitHub user @gsureshkumar - for reporting! - - - When parsing invalid enum values in STU3, - report errors through the parserErrorHandler, - not by throwing an exception. Thanks to - Michael Lawley for the pull request! - - - When parsing DSTU3 resources with enumerated - types that contain invalid values, the parser will now - invoke the parserErrorHandler. For example, when parsing - {"resourceType":"Patient", "gender":"foo"} - ]]> - the previous behaviour was to throw an InvalidArgumentException. - Now, the parserErrorHandler is invoked. In addition, thw - LenientErrorHandler has been modified so that this one case - will result in a DataFormatException. This has the effect - that servers which receive an invalid enum velue will return - an HTTP 400 instead of an HTTP 500. Thanks to Jim - Steel for reporting! - - - DSTU3 context now pulls the FHIR version from the actual - model classes. Thanks to Michael Lawley for the pull request! - - - Enhancements to the tinder-plugin's generic template features - of the generate-multi-files and generate-single-file - Maven goals as well as the Ant hapi-tinder task. -
      -
    • Provides the full Tinder data model by adding composites, valuesets, and profiles to resourcesw.
    • -
    • Supports generating files for resources, composites, valuesets, and profiles
    • -
    • Supports Velocimacro files outside the tinder-plugin JAR
    • -
    • Provides filename prefix as well as suffix properties
    • -
    • Can specify any of the Velocity configuration parameters such as - macro.provide.scope.control which allows safe macro recursion
    • -
    • Templates can now drill down into the referenced children for a ResourceBlockCopy
    • -
    • Normalization of properties across all three generic tasks
    • -
    - ]]> -
    - - Fix ordering of validator property handling when an element - has a name that is similar to a shorter name[x] style name. - Thanks to CarthageKing for the pull request! - - - Add a docker configuration to the hapi-fhir-jpaservr-example - module. Thanks to Gijsbert van den Brink for the pull request! - - - Add utility constructors to MoneyDt. Thanks to James Ren for the - contribution! - - - AuthorizationInterceptor was failing to allow read requests to pass - when a rule authorized those resources by compartment. Thanks to - GitHub user @mattiuusitalo for reporting and supplying - a test case! - - - Correct a typo in client - IHttpRequest]]> class: "bufferEntitity" should be "bufferEntity". - - - ErrorHandler is now called (resulting in a warning by default, but can also be an exception) when arsing - JSON if - the resource ID is not a JSON string, or an object is found where an array is expected (e.g. repeating - field). Thanks - to Jenni Syed of Cerner for providing a test case! - - - Fix Web Testing UI to be able to handle STU3 servers which - return CapabilityStatement instead of the previously used - "Conformance" resource - - - CLI example uploader couldn't find STU3 examples after CI server - was moved to build.fhir.org - - - Fix issue in JPA subscription module that prevented purging stale - subscriptions when many were present on Postgres - - - Server interceptor methods were being called twice unnecessarily - by the JPA server, and the DaoConfig interceptor registration - framework was not actually useful. Thanks to GitHub user - @mattiuusitalo for reporting! - - - AuthorizationInterceptor on JPA server did not correctly - apply rules on deleting resources in a specific compartment - because the resource metadata was stripped by the JPA server - before the interceptor could see it. Thanks to - Eeva Turkka for reporting! - - - JPA server exported CapabilityStatement includes - double entries for the _id parameter and uses the - wrong type (string instead of token). Thanks to - Robert Lichtenberger for reporting! - - - Custom resource types which extend Binary must not - have declared extensions since this is invalid in - FHIR (and HAPI would just ignore them anyhow). Thanks - to Thomas S Berg for reporting! - - - Standard HAPI zip/tar distributions did not include the project - sources and JavaDoc JARs. Thanks to Keith Boone for pointing - this out! - - - Server AuthorizationInterceptor always rejects history operation - at the type level even if rules should allow it. - - - JPA server terminology service was not correctly validating or expanding codes - in SNOMED CT or LOINC code systems. Thanks to David Hay for reporting! - - - Attempting to search for an invalid resource type (e.g. GET base/FooResource) should - return an HTTP 404 and not a 400, per the HTTP spec. Thanks to - GitHub user @CarthageKing for the pull request! - - - When parsing a Bundle containing placeholder fullUrls and references - (e.g. "urn:uuid:0000-0000") the resource reference targets did not get - populated with the given resources. Note that as a part of this - change, IdType and IdDt]]> have been modified - so that when parsing a placeholder ID, the complete placeholder including the - "urn:uuid:" or "urn:oid:" prefix will be placed into the ID part. Previously, - the prefix was treated as the base URL, which led to strange behaviour - like the placeholder being treated as a real IDs. Thanks to GitHub - user @jodue for reporting! - - - Declared extensions with multiple type() options listed in the @Child - annotation caused a crash on startup. Now this is supported. - - - STU3 XHTML parser for narrative choked if the narrative contained - an &rsquot;]]> entity string. - - - When parsing a quantity parameter on the server with a - value and units but no system (e.g. - GET [base]/Observation?value=5.4||mg]]>) - the unit was incorrectly treated as the system. Thanks to - @CarthageKing for the pull request! - - - Correct a typo in the JPA ValueSet ResourceProvider which prevented - successful operation under Spring 4.3. Thanks to - Robbert van Waveren for the pull request! - - - Deprecate the method - ICompositeElement#getAllPopulatedChildElementsOfType(Class)]]> - as it is no longer used by HAPI and is just an annoying step - in creating custom structures. Thanks to Allan Bro Hansen - for pointing this out. - - - CapturingInterceptor did not buffer the response meaning - that in many circumstances it did not actually capture - the response. Thanks to Jenny Syed of Cerner for - the pull request and contribution! - -
    - - - STU3 structure definitions have been updated to the - STU3 latest definitions (1.7.0 - SVN 10129). In - particular, this version supports the new CapabilityStatement - resource which replaces the previous Conformance - resource (in order to reduce upgrade pain, both resource - types are included in this version of HAPI) - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • spring-data-orm (JPA): 1.10.2 -> 1.10.4
  • - - ]]> -
    - - Fix a fairly significant issue in JPA Server when using the - DatabaseBackedPagingProvider]]>: When paging over the results - of a search / $everything operation, under certain circumstances resources may be missing from the last page - of results - that is returned. Thanks to David Hay for reporting! - - - Client, Server, and JPA server now support experimental support - for - - using the XML Patch and JSON Patch syntax as explored during the - September 2016 Baltimore Connectathon. See - this wiki page]]> - for a description of the syntax. - ]]> - Thanks to Pater Girard for all of his help during the connectathon - in implementing this feature! - - - Android library now uses OkHttp client by default instead - of Apache HttpClient. This should lead to much simpler - support for Android in the future. - - - Both client and server now use the new STU3 mime types by default - if running in STU3 mode (in other words, using an STU3 - FhirContext). - - - In server, when returning a list of resources, the server sometimes failed to add - _include]]> resources to the response bundle if they were - referred to by a contained resource. Thanks to Neal Acharya for reporting! - - - Fix regression in web testing UI where "prev" and "next" buttons don't work - when showing a result bundle - - - JPA server should not attempt to resolve built-in FHIR StructureDefinitions from the - database (this causes a significant performance hit when validating) - - - BanUnsupportedHttpMethodsInterceptor was erroring out when a client - attempts HTTP HEAD requests - - - Conditional URLs in JPA server (e.g. for delete or update) did not support the - _has]]> parameter - - - Remove Maven dependency on Saxon library, as it is not actually used. Thanks - to Lem Edmondson for the suggestion! - - - Times before 1970 with fractional milliseconds were parsed incorrectly. Thanks - to GitHub user @CarthageKing for reporting! - - - Prevent crash in parser when parsing resource - with multiple profile declarations when - default type for profile is used. Thanks to - Filip Domazet for the pull request! - - - STU3 servers were adding the old MimeType - strings to the - Conformance.format]]> - part of the generated server conformance - statement - - - When performing an update using the client on a resource that - contains other resources (e.g. Bundle update), all child resources in the - parent bundle were incorrectly given the ID of the parent. Thanks - to Filip Domazet for reporting! - - - STU clients now use an Accept header which - indicates support for both the old MimeTypes - (e.g. application/xml+fhir]]>) - and the new MimeTypes - (e.g. application/fhir+xml]]>) - - - JPA server now sends correct - HTTP 409 Version Conflict]]> - when a - DELETE fails because of constraint issues, instead of - HTTP 400 Invalid Request]]> - - - Server history operation did not populate the Bundle.entry.request.url - field, which is required in order for the bundle to pass validation. - Thanks to Richard Ettema for spotting this! - - - Add a new method to the server interceptor framework which will be - called after all other processing is complete (useful for performance - tracking). The server LoggingInterceptor has been switched to using this - method which means that log lines will be created when processing is finished, - instead of when it started. - - - STU3 clients were not sending the new mimetype values in the - Content-Type]]> header. Thanks to - Claude Nanjo for pointing this out! - - - JAX-RS server was not able to handle the new mime types defined - in STU3 - - - JPA server did not handle custom types when being called - programatically (I.e. not through HTTP interface). Thanks to - Anthony Mei for pointing this out! - - - CLI was not correctly able to upload DSTU2 examples to any server - - - STU3 validator has been upgrated to include fixes made since the - 1.6.0 ballot - - - Prevent JPA server from creating a bunch of - FhirContext objects for versions of FHIR that - aren't actually being used - - - XhtmlNode.equalsDeep() contained a bug which caused resources - containing a narrative to always return - false]]> for STU3 - Resource#equalsDeep()]]>. Thanks to - GitHub user @XcrigX for reporting! - - - JPA server did not correctly process searches for chained parameters - where the chain passed across a field that was a choice between a - reference and a non-reference type (e.g. - MedicationAdministration.medication[x]]]>. - Thanks to GitHub user @Crudelus for reporting! - - - Handle parsing an extension without a URL more gracefully. In HAPI FHIR 2.0 this caused - a NullPointerException to be thrown. Now it will trigger a warning, or throw a - DataFormatException if the StrictErrorHandler is configured on the parser. - - - Calling a HAPI server URL with a chain on a parameter that shouldn't accept - chains (e.g. - GET [base]/Patient?name.foo=smith]]>) - did not return an error and instead just ignored the chained part - and treated the parameter as though it did not have the chain. This - led to confusing and potentially unsafe behaviour. This has been - corrected to return an error to the client. Thanks to - Kevin Tallevi for finding this! - - - Fix #411 - Searching by POST [base]/_search]]> with urlencoded parameters doesn't work - correctly if - interceptors are accessing the parameters and there is are also - parameters on the URL. Thanks to Jim Steel for reporting! - - - Fluent client can now return types other than Parameters - when invoking operations. - - - JPA server shouldn't report a totalCount in Bundle of "-1" when - there are no results - - - JPA server was not correctly normalizing strings with non-latin characters - (e.g. Chinese chars). Thanks to GitHub user @YinAqu for reporting and providing - some great analysis of the issue! - - - Add a new method to ReferenceClientParam which allows you to - pass in a number of IDs by a collection of Strings. Thanks to - Thomas Andersen for the pul request! - - - When encoding a resource in JSON where the resource has - an extension with a value where the value is a reference to a - contained resource, the reference value (e.g. "#1") did not - get serialized. Thanks to GitHub user @fw060 for reporting! - - - ResponseHighlighterInterceptor now pretty-prints responses - by default unless the user has explicitly requested - a non-pretty-printed response (ie. - using ?_pretty=false]]>. Thanks to - Allan Brohansen and Jens Villadsen for the suggestion! - - - Add a new JSON library abstraction layer to the JSON parser. - This contribution shouldn't have any end-user impact but does - make it easier to use the JSON parser to generate custom structures - for other purposes, and should allow us to support RDF more - easily at some point. Thanks to Bill Denton for the pull - request and the contribution! - - - DSTU1 Bundle encoder did not include the Bundle entry author in - the generated bundle. Thanks to Hannes Venter for the pull - request and contribution! - - - Remove unused field (myIsContained) from ResourceTable - in JPA server. - - - AuthorizationInterceptor is now a bit more aggressive - at blocking read operations, stopping them on the - way in if there is no way they will be accepted - to the resource check on the way out. In addition - it can now be configured to allow/deny operation - invocations at the instance level on any - instance of a given type - - - STU3 servers were incorrectly returning the - Content-Location]]> - header instead of the - Content]]> - header. The former has been removed from the - FHIR specification in STU3, but the - latter got removed in HAPI's code base. - Thanks to Jim Steel for reporting! - - - Correct several documentation issues. Thanks to Vadim Peretokin - for the pull requests! - - - Remove an unneccesary database flush - from JPA persistence operations - - - Add method to fluent client to allow OR search across several - profiles. Thanks to Thomas Andersen for the pull request! - -
    - - - JSON parsing in HAPI FHIR has been switched from using JSR353 (javax.json) to - using Google Gson. For this reason we are bumping the major release number to - 2.0. Theoretically this should not affect projects in any major way, but Gson - does have subtle differences. Two differences which popped up a fair bit in - our own testing: - -
      - A space is placed after the : in keys, e.g. what was previously - encoded as "resourceType":"Patient" is now encoded - as "resourceType": "Patient" (this broke a number of - our unit tests with hardcoded resource definitions) -
    -
      - Trailing content after a valid json resource is rejected by - Gson (it was ignored by the Glassfish parser we were previously - using even though it was invalid) -
    - - ]]> -
    - - STU3 structure definitions have been updated to the - STU3 ballot candidate versions (1.6.0 - SVN 9663) - - - Both client and server now support the new Content Types decided in - FHIR #10199]]> - . -
    ]]> - This means that the server now supports - application/fhir+xml and application/fhir+json]]> - in addition to the older style - application/xml+fhir and application/json+fhir]]>. - In order to facilitate migration by implementors, the old style remains the default - for now, but the server will respond using the new style if the request contains it. The - client now uses an Accept]]> header value which requests both - styles with a preference given to the new style when running in DSTU3 mode. -
    ]]> - As a part of this change, the server has also been enhanced so that if a request - contains a Content-Type header but no Accept header, the response will prefer the - encoding specified by the Content-Type header. -
    - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Logback (used in sample projects): 1.1.5 -> 1.1.7
  • -
  • Phloc Commons (used by schematron validator): 4.4.4 -> 4.4.5
  • -
  • Commons-IO: 2.4 -> 2.5
  • -
  • Apache HTTPClient: 4.5.1 -> 4.5.2
  • -
  • Apache HTTPCore: 4.4.4 -> 4.4.5
  • -
  • Jersey (JAX-RS tests): 2.22.2 -> 2.23.1
  • -
  • Spring (JPA, Web Tester): 4.3.0 -> 4.3.1
  • - -
  • Hibernate Search (JPA): 5.5.2 -> 5.5.4
  • -
  • Thymeleaf (Narrative Generator / Web Tester): 2.1.4 ->3.0.1
  • - - ]]> -
    - - - Fix issue in DSTU1 Bundle parsing where unexpected elements in the bundle resulted in a failure - to parse. - - - DSTU2 QuestionnaireResponse validator failed with an exception if the - QuestionnaireResponse contained certain groups with no content - - - Fluent client should ignore parameter values which are null instead of including - them as ?foo=null]]> - - - When using _elements]]> parameter on server, the server was not - automatically adding the SUBSETTED]]> tag as it should - - - JPA server should now automatically detect - if Hibernate Search (Lucene) is configured to be - disabled and will not attempt to use it. This - prevents a crash for some operations. - - - A new server interceptor "BanUnsupprtedHttpMethodsInterceptor" has been added - which causes the server to return an HTTP 405 if an unsupported HTTP - verb is received from the client - - - Fix an issue where resource IDs were not correctly set when using - DSTU2 HL7org structures with the JAX-RS module. Thanks to Carlo Mion - for the pull request! - - - hapi-fhir-testpage-overlay project contained an unneccesary - dependency on hapi-fhir-jpaserver-base module, which resulted in - projects using the overlay having a large number of unnneded - JARs included - - - It is not possible to configure both the parser and the context to - preserve versions in resource references (default behaviour is to - strip versions from references). Thanks to GitHub user @cknaap - for the suggestion! - - - Tag#setCode(String)]]> did not actually set the code it was supposed to - set. Thanks to Tim Tschampel for reporting! - - - JPA server's /Bundle]]> endpoint cleared - the Bundle.entry.fullUrl]]> field on stored - bundles, resulting in invalid content being saved. Thanks to Mirjam - Baltus for reporting! - - - JPA server now returns HTTP 200 instead of HTTP 404 for - conditional deletes which did not find any matches, - per FHIR-I decision. - - - Client that declares explicitly that it is searching/reading/etc for - a custom type did not automatically parse into that type. - - - Allow servers to specify the authentication realm of their choosing when - throwing an AuthenticationException. Thanks to GitHub user @allanbrohansen - for the suggestion! - - - Add a new client implementation which uses the - OkHttp]]> - library as the HTTP client implementation (instead of Apache HttpClient). - This is particularly useful for Android (where HttpClient is a pain) but - could also be useful in other places too. - Thanks to Matt Clarke of Orion Health for the contribution! - - - Fix a regression when parsing resources that have contained - resources, where the reference in the outer resource which - links to the contained resource sometimes did does not get - populated with the actual target resource instance. Thanks to - Neal Acharya for reporting! - - - hapi-fhir-cli upload-terminology command now has an argument - "-b FOO" that lets you add an authorization header in the form - Authorization: Bearer FOO]]> - - - Parser failed to successfully encode a custom resource - if it contained custom fields that also used custom - types. Thanks to GitHub user @sjanic for reporting! - - - Inprove handling of _text and _content searches in JPA server to do better - matching on partial strings - - - Servers in STU3 mode will now ignore any ID or VersionID found in the - resource body provided by the client when processing FHIR - update]]> operations. This change has been made - because the FHIR specification now requires servers to ignore - these values. Note that as a result of this change, resources passed - to @Update]]> methods will always have - null]]> ID - - - Add new methods to - AuthorizationInterceptor]]> - which allow user code to declare support for conditional - create, update, and delete. - - - When encoding a resource with a reference to another resource - that has a placeholder ID (e.g. urn:uuid:foo), the urn prefix - was incorrectly stripped from the reference. - - - Servers for STU3 (or newer) will no longer include a - Location:]]> header on responses for - read]]> operations. This header was - required in earlier versions of FHIR but has been removed - from the specification. - - - Fix NullPointerException when encoding an extension containing CodeableConcept - with log level set to TRACE. Thanks to Bill Denton for the report! - - - Add two new methods to the parser error handler that let users trap - invalid contained resources with no ID, as well as references to contained - resource that do not exist. - - - Improve performance when parsing resources containing contained resources - by eliminating a step where references were woven twice - - - Parser failed to parse resources containing an extension with a value type of - "id". Thanks to Raphael Mäder for reporting! - - - When committing a transaction in JPA server - where the transaction contained placeholder IDs - for references between bundles, the placeholder - IDs were not substituted with viewing - resources using the _history operation - - - HAPI root pom shouldn't include animal-sniffer plugin, - since that causes any projects which extend this to - be held to Java 6 compliance. - -
    - - - Performance has been improved for the initial FhirContext - object creation by avoiding a lot of unnecessary reflection. HAPI FHIR - 1.5 had a regression compared to previous releases - and this has been corrected, but other improvements have been - made so that this release is faster than previous releases too. -
    ]]> - In addition, a new "deferred scan" mode has been implemented for - even faster initialization on slower environments (e.g. Android). - See the performance documentation]]> - for more information. -
    ]]> - The following shows our benchmarks for context initialization across several - versions of HAPI: - -
  • Version 1.4: 560ms
  • -
  • Version 1.5: 800ms
  • -
  • Version 1.6: 340ms
  • -
  • Version 1.6 (deferred mode): 240ms
  • - - ]]> -
    - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Spring (JPA, Web Tester): 4.2.5 -> 4.3.0
  • -
  • Spring-Data (JPA): 1.9.2 -> 1.10.1
  • - -
  • Hibernate Search (JPA): 5.5.2 -> 5.5.3
  • -
  • Jetty (CLI): 9.3.9 -> 9.3.10
  • - - ]]> -
    - - Remove some clases that were deprecated over a year ago and have - suitable replacements: - -
  • QualifiedDateParam has been removed, but DateParam may be used instead
  • -
  • PathSpecification has been removedm but Include may be used instead
  • - - ]]> -
    - - ResponseValidatingInterceptor threw an InternalErrorException (HTTP 500) for operations - that do not return any content (e.g. delete). Thanks to Mohammad Jafari for reporting! - - - REST server now throws an HTTP 400 instead of an HTTP 500 if an operation which takes - a FHIR resource in the request body (e.g. create, update) contains invalid content that - the parser is unable to parse. Thanks to Jim Steel for the suggestion! - - - Deprecate fluent client search operations without an explicit declaration of the - bundle type being used. This also means that in a client - .search()]]> - operation, the - .returnBundle(Bundle.class)]]> - needs to be the last statement before - .execute()]]> - - - Server now respects the parameter _format=application/xml+fhir"]]> - which is technically invalid since the + should be escaped, but is likely to be used. Also, - a parameter of _format=html]]> can now be used, which - forces SyntaxHighlightingInterceptor to use HTML even - if the headers wouldn't otherwise trigger it. - Thanks to Jim Steel for reporting! - - - Improve performance when parsing large bundles by fixing a loop over all of the - entries inthe bundle to stitch together cross-references, which was happening once - per entry instead of once overall. Thanks to Erick on the HAPI FHIR Google Group for - noticing that this was an issue! - - - JSON parser no longer allows the resource ID to be specified in an element called "_id" - (the correct one is "id"). Previously _id was allowed because some early FHIR examples - used that form, but this was never actually valid so it is now being removed. - - - JPA server now allows "forced IDs" (ids containing non-numeric, client assigned IDs) - to use the same logical ID part on different resource types. E.g. A server may now have - both Patient/foo and Obervation/foo on the same server.
    ]]> - Note that existing databases will need to modify index "IDX_FORCEDID" as - it is no longer unique, and perform a reindexing pass. -
    - - When serializing/encoding custom types which replace exsting choice fields by - fixing the choice to a single type, the parser would forget that the - field was a choice and would use the wrong name (e.g. "abatement" instead of - "abatementDateType"). Thanks to Yaroslav Kovbas for reporting and - providing a unit test! - - - JPA server transactions sometimes created an incorrect resource reference - if a resource being saved contained references that had a display value but - not an actual reference. Thanks to David Hay for reporting! - - - When performing a REST Client create or update with - Prefer: return=representation]]> set, - if the server does not honour the Prefer header, the client - will automatically fetch the resource before returning. Thanks - to Ewout Kramer for the idea! - - - DSTU3 structures now have - setFoo(List)]]> - and - setGetFooFirstRep()]]> - methods, bringing them back to parity with the HAPI - DSTU2 structures. Thanks to Rahul Somasunderam and - Claude Nanjo for the suggestions! - - - JPA server has now been refactored to use the - new FluentPath search parameter definitions - for DSTU3 resources. - - - RequestValidatingInterceptor and ResponseValidatingInterceptor - both have new method setIgnoreValidatorExceptions]]> - which causes validator exceptions to be ignored, rather than causing - processing to be aborted. - - - LoggingInterceptor on server has a new parameter - ${requestBodyFhir}]]> which logs the entire request body. - - - JAX-RS server module now supports DSTU3 resources (previously it only supported DSTU2). Thanks - to Phillip Warner for implementing this, and providing a pull request! - - - Generated conformance statements for DSTU3 servers did not properly reference their - OperationDefinitions. Thanks - to Phillip Warner for implementing this, and providing a pull request! - - - Properly handle null arrays when parsing JSON resources. Thanks to Subhro for - fixing this and providing a pull request! - - - STU3 validator failed to validate codes where the - code was a child code within the code system that contained it - (i.e. not a top level code). Thanks to Jon - Zammit for reporting! - - - Restore the setType method in the DSTU1 Bundle - class, as it was accidentally commented out. Thanks - to GitHub user @Virdulys for the pull request! - - - JPA server now supports composite search parameters - where the type of the composite parameter is - a quantity (e.g. Observation:component-code-component-value-quantity) - - - Remove the Remittance resource from DSTU2 - structures, as it is not a real resource and - was causing issues with interoperability - with the .NET client. - - - CLI tool cache feature (-c) for upload-example task sometimes failed - to write cache file and exited with an exception. - - - Fix error message in web testing UI when loading pages in a search - result for STU3 endpoints. - - - When encoding JSON resource, the parser will now always - ensure that XHTML narrative content has an - XHTML namespace declaration on the first - DIV tag. This was preventing validation for - some resources using the official validator - rules. - - - Server failed to invoke operations when the name - was escaped (%24execute instead of $execute). - Thanks to Michael Lawley for reporting! - - - JPA server transactions containing a bundle that has multiple entries - trying to delete the same resource caused a 500 internal error - - - JPA module failed to index search parameters that mapped to a Timing datatype, - e.g. CarePlan:activitydate - - - Add a new option to the CLI run-server command called --lowmem]]>. - This option disables some features (e.g. fulltext search) in order to allow the - server to start in memory-constrained environments (e.g Raspberry Pi) - - - When updating a resource via an update operation on the server, if the ID of the - resource is not present in the resource body but is present on the URL, this will - now be treated as a warning instead of as a failure in order to be a bit more - tolerant of errors. If the ID is present in the body but does not agree with the - ID in the URL this remains an error. - - - Server / JPA server date range search params (e.g. Encounter:date) now treat - a single date with no comparator (or the eq comparator) as requiring that the - value be completely contained by the range specified. Thanks to Chris Moesel - for the suggestion. - - - In server, if a parameter was annotated with the annotation, the - count would not appear in the self/prev/next links and would not actually be applied - to the search results by the server. Thanks to Jim Steele for letting us know! - - - Conditional update on server failed to process if the conditional URL did not have any - search parameters that did not start with an underscore. E.g. "Patient?_id=1" failed - even though this is a valid conditional reference. - - - JPA server can now be configured to allow external references (i.e. references that - point to resources on other servers). See - JPA Documentation]]> for information on - how to use this. Thanks to Naminder Soorma for the suggestion! - - - When posting a resource to a server that contains an invalid value in a boolean field - (e.g. Patient with an active value of "1") the server should return an HTTP 400, not - an HTTP 500. Thanks to Jim Steel for reporting! - - - Enable parsers to parse and serialize custom resources that contain custom datatypes. - An example has been added which shows how to do this - here]]> - - - JSON parser was incorrectly encoding resource language attribute in JSON as an - array instead of a string. Thanks to David Hay for reporting! - - - Sébastien Rivière contributed an excellent pull request which adds a - number of enhancements to JAX-RS module: - -
  • Enable the conditional update and delete
  • -
  • Creation of a bundle provider, and support of the @Transaction
  • -
  • Bug fix on the exceptions handling as some exceptions throw outside bean context were not intercept.
  • -
  • Add the possibility to have the stacktrace in the jaxrsException
  • - - ]]> -
    - - FhirTerser.cloneInto method failed to clone correctly if the source - had any extensions. Thanks to GitHub user @Virdulys for submitting and - providing a test case! - - - Update DSTU2 InstanceValidator to latest version from upstream - - - Web Testing UI was not able to correctly post an STU3 transaction - - - DateTime parser incorrectly parsed times where more than 3 digits of - precision were provided on the seconds after the decimal point - - - Improve error messages when the $validate operation is called but no resource - is actually supplied to validate - - - DSTU2+ servers no longer return the Category header, as this has been - removed from the FHIR specification (and tags are now available in the - resource body so the header was duplication/wasted bandwidth) - - - Create and Update operations in server did not - include ETag or Last-Modified headers even though - the spec says they should. Thanks to Jim Steel for - reporting! - - - Update STU3 client and server to use the new sort parameter style (param1,-param2,param). Thanks to GitHub - user @euz1e4r for - reporting! - - - QuantityClientParam#withUnit(String) put the unit into the system part of the - parameter value - - - Fluent client searches with date parameters were not correctly using - new prefix style (e.g. gt) instead of old one (e.g. >) - - - Some built-in v3 code systems for STU3 resources were missing - certain codes, which caused false failures when validating - resources. Thanks to GitHub user @Xoude for reporting! - - - Some methods on DSTU2 model structures have JavaDocs that - incorrectly claim that the method will not return null when - in fact it can. Thanks to Rick Riemer for reporting! - - - ResponseHighlightingInterceptor has been modified based on consensus - on Zulip with Grahame that requests that have a parameter of - _format=json]]> or - _format=xml]]> will output raw FHIR content - instead of HTML highlighting the content as they previously did. - HTML content can now be forced via the (previously existing) - _format=html]]> or via the two newly added - values - _format=html/json]]> and - _format=html/xml]]>. Because of this - change, the custom - _raw=true]]> mode has been deprecated and - will be removed at some point. - - - Operation definitions (e.g. for $everything operation) in the generated - server conformance statement should not include the $ prefix in the operation - name or code. Thanks to Dion McMurtrie for reporting! - - - Server generated OperationDefinition resources did not validate - due to some missing elements (kind, status, etc.). - Thanks to - Michael Lawley for reporting! - - - Operations that are defined on multiple resource provider types with - the same name (e.g. "$everything") are now automatically exposed by the server - as separate OperationDefinition resources per resource type. Thanks to - Michael Lawley for reporting! - - - OperationDefinition resources generated automatically by the server for operations - that are defined within resource/plain providers incorrectly stated that - the maximum cardinality was "*" for non-collection types with no explicit - maximum stated, which is not the behaviour that the JavaDoc on the - annotation describes. Thanks to Michael Lawley - for reporting! - - - Server parameters annotated with - @Since]]> - or - @Count]]> - which are of a FHIR type such as IntegerDt or DateTimeType will - now be set to null if the client's URL does not - contain this parameter. Previously they would be populated - with an empty instance of the FHIR type, which was inconsistent with - the way other server parameters worked. - - - Server now supports the _at parameter (including multiple repetitions) - for history operation - - - - AuthorizationInterceptor can now allow or deny requests to extended - operations (e.g. $everything) - - - DecimalType used BigDecimal constructor instead of valueOf method to - create a BigDecimal from a double, resulting in weird floating point - conversions. Thanks to Craig McClendon for reporting! - - - Remove the depdendency on a method from commons-lang3 3.3 which was - causing issues on some Android phones which come with an older version - of this library bundled. Thanks to Paolo Perliti for reporting! - - - Parser is now better able to handle encoding fields which have been - populated with a class that extends the expected class - - - When declaring a child with - order=Child.REPLACE_PARENT]]> - the serialized form still put the element at the - end of the resource instead of in the correct - order - - - Fix STU3 JPA resource providers to allow validate operation - at instance level - -
    - - - Security Fix: XML parser was vulnerable to XXE (XML External Entity) - processing, which could result in local files on disk being disclosed. - See this page]]> - for more information. - Thanks to Jim Steel for reporting! - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Hibernate (JPA, Web Tester): 5.0.7 -> 5.1.0
  • -
  • Spring (JPA, Web Tester): 4.2.4 -> 4.2.5
  • -
  • SLF4j (All): 1.7.14 -> 1.7.21
  • - - ]]> -
    - - Support comments when parsing and encoding both JSON and XML. Comments are retrieved - and added to the newly created methods - IBase#getFormatCommentsPre() and - IBase#getFormatCommentsPost() - - - Added options to the CLI upload-examples command which allow it to cache - the downloaded content file, or use an arbitrary one. Thanks to Adam Carbone - for the pull request! - - - REST search parameters with a prefix/comparator had not been updated to use - the DSTU2 style prefixes (gt2011-01-10) instead of the DSTU1 style prefixes - (>2011-01-01). The client has been updated so that it uses the new prefixes - if the client has a DSTU2+ context. The server has been updated so that it now - supports both styles. -
    ]]> - As a part of this change, a new enum called - ParamPrefixEnum]]> - has been introduced. This enum replaces the old - QuantityCompararatorEnum]]> - which has a typo in its name and can not represent several new prefixes added since - DSTU1. -
    - - JPA server number and quantity search params now follow the rules for the - use of precision in search terms outlined in the - search page]]> of the - FHIR specification. For example, previously a 1% tolerance was applied for - all searches (10% for approximate search). Now, a tolerance which respects the - precision of the search term is used (but still 10% for approximate search). - - - Fix a failure starting the REST server if a method returns an untyped List, which - among other things prevented resource provider added to the server - as CDI beans in a JBoss enviroment. Thanks to GitHub user fw060 (Fei) for - reporting and figuring out exactly why this wasn't working! - - - JPA server now supports :above and :below qualifiers on URI search params - - - Add optional support (disabled by default for now) to JPA server to support - inline references containing search URLs. These URLs will be resolved when - a resource is being created/updated and replaced with the single matching - resource. This is being used as a part of the May 2016 Connectathon for - a testing scenario. - - - The server no longer adds a - WWW-Authenticate]]> - header to the response if any resource provider code throws an - AuthenticationException]]>. This header is - used for interactive authentication, which isn't generally - appropriate for FHIR. We added code to add this header a long time - ago for testing purposes and it never got removed. Please let us - know if you need the ability to add this header automatically. Thanks - to Lars Kristian Roland for pointing this out. - - - In the client, the create/update operations on a Binary resource - (which use the raw binary's content type as opposed to the FHIR - content type) were not including any request headers (Content-Type, - User-Agent, etc.) Thanks to Peter Van Houte of Agfa Healthcare for - reporting! - - - Handling of Binary resources containing embedded FHIR resources for - create/update/etc operations has been corrected per the FHIR rules - outlined at - Binary Resource]]> - in both the client and server. -
    ]]> - Essentially, if the Binary contains something - that isn't FHIR (e.g. an image with an image content-type) the - client will send the raw data with the image content type to the server. The - server will place the content type and raw data into a Binary resource instance - and pass those to the resource provider. This part was already correct previous - to 1.5. -
    ]]> - On the other hand, if the Binary contains a FHIR content type, the Binary - is now sent by the client to the server as a Binary resource with a FHIR content-type, - and the embedded FHIR content is contained in the appropriate fields. The server - will pass this "outer" Binary resource to the resource provider code. -
    - - The RequestDetails and ActionRequestDetails objects which are passed to - server interceptor methods and may also be used as server provider method - arguments now has a new method - Map<String, String> getUserData() - ]]> - which can be used to pass data and objects between interceptor methods to - to providers. This can be useful, for instance, if an authorization - interceptor wants to pass the logged in user's details to other parts - of the server. - - - IServerInterceptor#incomingRequestPreHandled() is called - for a @Validate method, the resource was not populated in the - ActionRequestDetails argument. Thanks to Ravi Kuchi for reporting! - ]]> - - - [baseUrl]/metadata with an HTTP method - other than GET (e.g. POST, PUT) should result in an HTTP 405. Thanks to - Michael Lawley for reporting! - ]]> - - - Fix a server exception when trying to automatically add the profile tag - to a resource which already has one or more profiles set. Thanks to - Magnus Vinther for reporting! - - - QuantityParam parameters being used in the RESTful server were ignoring - the - :missing]]> - qualifier. Thanks to Alexander Takacs for reporting! - - - Annotation client failed with an exception if the response contained - extensions on fields in the resonse Bundle (e.g. Bundle.entry.search). - Thanks to GitHub user am202 for reporting! - - - Primitive elements with no value but an extension were sometimes not - encoded correctly in XML, and sometimes not parsed correctly in JSON. - Thanks to Bill de Beaubien for reporting! - - - The Web Testing UI has long had an issue where if you click on a button which - navigates to a new page (e.g. search, read, etc) and then click the back button - to return to the original page, the button you clicked remains disabled and can't - be clicked again (on Firefox and Safari). This is now fixed. Unfortunately the fix means that the - buttom will no longer show a "loading" spinner, but there doesn't seem to - be another way of fixing this. Thanks to Mark Scrimshire for reporting! - - - Extensions found while parsing an object that doesn't support extensions are now - reported using the IParserErrorHandler framework in the same way that - other similar errors are handled. This allows the parser to be more lenient - when needed. - - - Improve error message if incorrect type is placed in a list field in the data model. Java - uses generics to prevent this at compile time, but if someone is in an environment without - generics this helps improve the error message at runtime. Thanks to Hugo Soares for - suggesting. - - - Prevent an unneeded warning when parsing a resource containing - a declared extension. Thanks to Matt Blanchette for reporting! - - - Web Tester UI did not invoke VRead even if a version ID was specified. Thanks - to Poseidon for reporting! - - - Per discussion on the FHIR implementer chat, the JPA server no - longer includes _revinclude matches in the Bundle.total count, or the - page size limit. - - - JPA server now persists search results to the database in a new table where they - can be temporaily preserved. This makes the JPA server much more scalable, since it - no longer needs to store large lists of pages in memory between search invocations. -
    ]]> - Old searches are deleted after an hour by default, but this can be changed - via a setting in the DaoConfig. -
    - - JPA servers' resource version history mechanism - has been adjusted so that the history table - keeps a record of all versions including the - current version. This has the very helpful - side effect that history no longer needs to be - paged into memory as a complete set. Previously - history had a hard limit of only being able to - page the most recent 20000 entries. Now it has - no limit. - - - JPA server returned the wrong Bundle.type value (COLLECTION, should be SEARCHSET) - for $everything operation responses. Thanks to Sonali Somase for reporting! - - - REST and JPA server should reject update requests where the resource body does not - contain an ID, or contains an ID which does not match the URL. Previously these - were accepted (the URL ID was trusted) which is incorrect according to the - FHIR specification. Thanks to GitHub user ametke for reporting! -
    ]]> - As a part of this change, server error messages were also improved for - requests where the URL does not contain an ID but needs to (e.g. for - an update) or contains an ID but shouldn't (e.g. for a create) -
    - - When fields of type BoundCodeDt (e.g. Patient.gender) - are serialized and deserialized using Java's native - object serialization, the enum binder was not - serialized too. This meant that values for the - field in the deserialized object could not be - modified. Thanks to Thomas Andersen for reporting! - - - REST Server responded to HTTP OPTIONS requests with - any URI as being a request for the server's - Conformance statement. This is incorrect, as only - a request for OPTIONS [base url]]]> should be treated as such. Thanks to Michael - Lawley for reporting! - - - REST annotation style client was not able to handle extended operations - ($foo) where the response from the server was a raw resource instead - of a Parameters resource. Thanks to Andrew Michael Martin for reporting! - - - JPA server applies _lastUpdated filter inline with other searches wherever possible - instead of applying this filter as a second query against the results of the - first query. This should improve performance when searching against large - datasets. - - - Parsers have new method - setDontEncodeElements]]> - which can be used to force the parser to not encode certain elements - in a resource when serializing. For example this can be used to omit - sensitive data or skip the resource metadata. - - - JPA server database design has been adjusted - so that different tables use different sequences - to generate their indexes, resulting in more sequential - resource IDs being assigned by the server - - - Server now correctly serves up Binary resources - using their native content type (instead of as a - FHIR resource) if the request contains an accept - header containing "application/xml" as some browsers - do. - - - DSTU2 resources now have a - getMeta()]]> method which returns a - modifiable view of the resource metadata for convenience. This - matches the equivalent method in the DSTU3 structures. - - - Add a new method to FhirContext called - setDefaultTypeForProfile - ]]> - which can be used to specify that when recources are received which declare - support for specific profiles, a specific custom structures should be used - instead of the default. For example, if you have created a custom Observation - class for a specific profile, you could use this method to cause your custom - type to be used by the parser for resources in a search bundle you receive. -
    - See the documentation page on - Profiles and Extensions - for more information. - ]]> -
    - - Parsing/Encoding a custom resource type which extends a - base type sometimes caused the FhirContext to treat all future - parses of the same resource as using the custom type even when - this was not wanted. -
    ]]> - Custom structures may now be explicitly declared by profile - using the - setDefaultTypeForProfile - ]]> - method. -
    ]]> - This issue was discovered and fixed as a part of the implementation of issue #315. -
    - - Set up the tinder plugin to work as an ant task - as well as a Maven plugin, and to use external - sources. Thanks to Bill Denton for the pull - request! - - - JPA server now allows searching by token - parameter using a system only and no code, - giving a search for any tokens which match - the given token with any code. Previously the - expected behaviour for this search - was not clear in the spec and HAPI had different - behaviour from the other reference servers. - - - Introduce a JAX-RS client provider which can be used instead of the - default Apache HTTP Client provider to provide low level HTTP - services to HAPI's REST client. See - JAX-RS & Alternate HTTP Client Providers]]> - for more information. -
    ]]> - This is useful in cases where you have other non-FHIR REST clients - using a JAX-RS provider and want to take advantage of the - rest of the framework. -
    ]]> - Thanks to Peter Van Houte from Agfa for the amazing work! -
    - - Parser failed with a NPE while encoding resources if the - resource contained a null extension. Thanks to - steve1medix for reporting! - - - In generated model classes (DSTU1/2) don't - use BoundCodeDt and BoundCodeableConceptDt for - coded fields which use example bindings. Thanks - to GitHub user Ricq for reporting! - - - @Operation will now infer the maximum number of repetitions - of their parameters by the type of the parameter. Previously if - a default max() value was not specified in the - @OperationParam annotation on a parameter, the maximum - was assumed to be 1. Now, if a max value is not explicitly specified - and the type of the parameter is a basic type (e.g. StringDt) the - max will be 1. If the parameter is a collection type (e.g. List<StringDt>) - the max will be * - ]]> - - - @Operation - may now use search parameter types, such as - TokenParam and - TokenAndListParam as values. Thanks to - Christian Ohr for reporting! - ]]> - - - Add databases indexes to JPA module search index tables - for the RES_ID column on each. This should help - performance when searching over large datasets. - Thanks to Emmanuel Duviviers for the suggestion! - - - DateTimeType should fail to parse 1974-12-25+10:00 as this is not - a valid time in FHIR. Thanks to Grahame Grieve for reporting! - - - When parsing a Bundle resource, if the Bundle.entry.request.url contains a UUID - but the resource body has no ID, the Resource.id will be populated with the ID from the - Bundle.entry.request.url. This is helpful when round tripping Bundles containing - UUIDs. - - - When parsing a DSTU3 bundle, references between resources did not have - the actual resource instance populated into the reference if the - IDs matched as they did in DSTU1/2. - - - Contained resource references on DSTU3 - resources were not serialized correctly when - using the Json Parser. Thanks to GitHub user - @fw060 for reporting and supplying a patch - which corrects the issue! - - - DSTU3 model classes equalsShallow and equalsDeep both did not work - correctly if a field was null in one object, but contained an empty - object in the other (e.g. a StringType with no actual value in it). These - two should be considered equal, since they would produce the exact same - wire format.
    ]]> - Thanks to GitHub user @ipropper for reporting and providing - a test case! -
    - - JPA server now supports searching for _tag:not=[tag]]]> - which enables finding resources that to not have a given tag/profile/security tag. - Thanks to Lars Kristian Roland for the suggestion! - - - Extensions containing resource references did not get encoded correctly - some of the time. Thanks to Poseidon for reporting! - - - Parsers (both XML and JSON) encoded the first few elements of DSTU3 structures in the wrong order: - Extensions were placed before any other content, which is incorrect (several - elements come first: meta, text, etc.) - - - In server implementations, the Bundle.entry.fullUrl was not getting correctly - populated on Hl7OrgDstu2 servers. Thanks to Christian Ohr for reporting! - - - Ensure that element IDs within resources (i.e. IDs on elements other than the - resource itself) get serialized and parsed correctly. Previously, these didn't get - serialized in a bunch of circumstances. Thanks to Vadim Peretokin for reporting - and providing test cases! - - - Improve CLI error message if the tool can't bind to the requested port. Thanks - to Claude Nanjo for the suggestion! - - - Server param of _summary=text]]> did not - include mandatory elements in return as well as - the text element, even though the FHIR specification - required it. - - - Remove invalid resource type "Documentation" from DSTU2 - structures. - - - JPA server did not respect target types for search parameters. E.g. Appointment:patient has - a path of "Appointment.participant.actor" and a target type of "Patient". The search path - was being correctly handled, but the target type was being ignored. - - - RestfulServer now manually parses URL parameters instead of relying on the container's - parsed parameters. This is useful because many Java servlet containers (e.g. Tomcat, Glassfish) - default to ISO-8859-1 encoding for URLs insetad of the UTF-8 encoding specified by - FHIR. - - - ResponseHighlightingInterceptor now doesn't highlight if the request - has an Origin header, since this probably denotes an AJAX request. - -
    - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Hibernate (JPA, Web Tester): 5.0.3 -> 5.0.7
  • -
  • Springframework (JPA, Web Tester): 4.2.2 -> 4.2.4
  • -
  • Phloc-Commons (Schematron Validator): 4.3.6 -> 4.4.4
  • -
  • Apache httpclient (Client): 4.4 -> 4.5.1
  • -
  • Apache httpcore (Client): 4.4 -> 4.4.4
  • -
  • SLF4j (All): 1.7.13 -> 1.7.14
  • - - ]]> -
    - - Remove a dependency on a Java 1.7 class - (ReflectiveOperationException) in several spots in the - codebase. This dependency was accidentally introduced in - 1.3, and animal-sniffer-plugin failed to detect it (sigh). - - - Add two new server interceptors: - RequestValidatingInterceptor - and - ResponseValidatingInterceptor - ]]> - which can be used to validate incoming requests or outgoing responses using the standard FHIR validation - tools. See the - Server Validation Page - ]]> - for examples of how to use these interceptors. These intereptors have both - been enabled on the - public test page. - ]]> - - - Make IBoundCodeableConcept and IValueSetEnumBinder serializable, - fixing an issue when trying to serialize model classes containing - bound codes. Thanks to Nick Peterson for the Pull Request! - - - Introduce a JAX-RS version of the REST server, which can be used - to deploy the same resource provider implementations which work - on the existing REST server into a JAX-RS (e.g. Jersey) environment. - Thanks to Peter Van Houte from Agfa for the amazing work! - - - CLI now supports writing to file:// URL for 'upload-examples' command - - - GZipped content is now supported for client-to-server uploads (create, update, transaction, etc.). - The server will not automatically detect compressed incoming content and decompress it (this can be - disabled using a RestfulServer configuration setting). A new client interceptor has been added - which compresses outgoing content from the client. - - - JPA server transaction attempted to validate resources twice each, - with one of these times being before anything had been committed to the - database. This meant that if a transaction contained both a Questionnaire - and a QuestionnaireResponse, it would fail because the QuestionnaireResponse - validator wouldn't be able to find the questionnaire. This is now corrected. - - - Add a new method to the generic/fluent client for searching: - .count(int)
    ]]> - This replaces the existing ".limitTo(int)" method which has - now been deprocated because it was badly named and undocumented. -
    - - Profile validator has been configured to allow extensions even if they - aren't explicitly declared in the profile. - - - Add a constraint that the Maven build will only run in JDK 8+. HAPI - remains committed to supporting JDK 6+ in the compiled library, but these - days it can only be built using JDK 8. Thanks to joelsch for the PR! - - - When serializing a value[x] field, if the value type was a profiled type (e.g. markdown is a - profile of string) HAPI 1.3 would use the base type in the element name, e.g. - valueString instead of valueMarkdown. After discussion with Grahame, this appears to - be incorrect behaviour so it has been fixed. - - - Support target parameter type in _include / _revinclude values, e.g. - _include=Patient:careProvider:Organization. Thanks to Joe Portner - for reporting! - - - Use ResponseHighlighterInterceptor in the hapi-fhir-jpaserver-example - project to provide nice syntax highlighting. Thanks to Rob Hausam for - noting that this wasn't there. - - - Introduce custom @CoverageIgnore annotation to hapi-fhir-base in order to - remove dependency on cobertura during build and in runtime. - - - Server-generated conformance statements incorrectly used /Profile/ instead - of /StructureDefinition/ in URL links to structures. - - - JsonParser has been changed so that when serializing numbers it will use - plain format (0.001) instead of scientific format (1e-3). The latter is - valid JSON, and the parser will still correctly parse either format (all - clients should be prepared to) but this change makes serialized - resources appear more consistent between XML and JSON. As a result of this - change, trailing zeros will now be preserved when serializing as well. - - - Add DSTU3 example to hapi-fhir-jpaserver-example. Thanks to Karl - Davis for the Pull Request! - - - RestfulServer#setUseBrowserFriendlyContentTypes has been deprecated and its - functionality removed. The intention of this feature was that if it - detected a request coming in from a browser, it would serve up JSON/XML - using content types that caused the browsers to pretty print. But - each browser has different rules for when to pretty print, and - after we wrote that feature both Chrome and FF changed their rules to break it anyhow. - ResponseHighlightingInterceptor provides a better implementation of - this functionality and should be used instead. - - - Narrative generator framework has removed the - ability to generate resource titles. This - functionality was only useful for DSTU1 - implementations and wasn't compatible - with coming changes to that API. - - - Remove dependency on Servlet-API 3.0+ by using methods available in 2.5 where possible. - Note that we continue to use Servlet-API 3.0+ features in some parts of the JPA API, so - running in an old serlvet container should be tested well before use. Thanks to Bill Denton - for reporting! - - - Add new methods to RestfulClientFactory allowing you to configure the size of the - client pool used by Apache HttpClient. Thanks to Matt Blanchette for the pull - request! - - - Add support for new modifier types on Token search params in Server and - annotation client. - - - Server conformance statement should include search parameter chains if the - chains are explicitly defined via @Search(whitelist={....}). Thanks to lcamilo15 - for reporting! - - - Remove afterPropertiesSet() call in Java config for JPA - server's EntityManagerFactory. This doesn't need to be called - manually, the the manual call led to a warning about - the EntityManager being created twice. - - - Allow server to correctly figure out it's own address even if the container provides - a Servlet Context Path which does not include the root. Thanks to Petro Mykhaylyshyn - for the pull request! - -
    - - - Bump the version of a few dependencies to the - latest versions (dependent HAPI modules listed in brackets): - -
  • Commons-lang3 (Core): 3.3.2 -> 3.4
  • -
  • Logback (Core): 1.1.2 -> 1.1.3
  • -
  • SLF4j (Core): 1.7.102 -> 1.7.12
  • -
  • Springframework (JPA, Web Tester): 4.1.5 -> 4.2.2
  • -
  • Hibernate (JPA, Web Tester): 4.2.17 -> 5."
  • -
  • Hibernate Validator (JPA, Web Tester): 5.2.1 -> 5.2.2
  • -
  • Derby (JPA, CLI, Public Server): 10.11.1.1 -> 10.12.1.1
  • -
  • Jetty (JPA, CLI, Public Server): 9.2.6.v20141205 -> 9.3.4.v20151007
  • - - ]]> -
    - - JPA and Tester Overlay now use Spring Java config files instead - of the older XML config files. All example projects have been updated. - - - JPA server removes duplicate resource index entries before storing them - (e.g. if a patient has the same name twice, only one index entry is created - for that name) - - - JPA server did not correctly index search parameters of type "reference" where the - path had multiple entries (i.e. "Resource.path1 | Resource.path2") - - - JPA server _history operations (server, type, instance) not correctly set the - Bundle.entry.request.method to POST or PUT for create and updates of the resource. - - - Support AND/OR on _id search parameter in JPA - - - Constructor for DateRanfeParam which dates in two DateParam instances was ignoring - comparators on the DateParam. - - - In JSON parsing, finding an object where an array was expected led to an unhelpful - error message. Thanks to Avinash Shanbhag for reporting! - - - JPA server gave an unhelpful error message if $meta-add or $meta-delete were called - with no meta elements in the input Parameters - - - Narrative generator did not include OperationOutcome.issue.diagnostics in the - generated narrative. - - - Clients (generic and annotation) did not populate the Accept header on outgoing - requests. This is now populated to indicate that the client supports both XML and - JSON unless the user has explicitly requested one or the other (in which case the - appropriate type only will be send in the accept header). Thanks to - Avinash Shanbhag for reporting! - - - QuestionnaireResponse validator now allows responses to questions of - type OPENCHOICE to be of type 'string' - - - JPA server should reject resources with a reference that points to an incorrectly typed - resource (e.g. points to Patient/123 but resource 123 is actually an Observation) or points - to a resource that is not valid in the location it is found in (e.g. points to Patient/123 but - the field supposed to reference an Organization). Thanks to Bill de Beaubien for reporting! - - - In server, if a client request is received and it has an Accept header indicating - that it supports both XML and JSON with equal weight, the server's default is used instead of the first - entry in the list. - - - JPA server now supports searching with sort by token, quantity, - number, Uri, and _lastUpdated (previously only string, date, and _id - were supported) - - - Fix issue in JPA where a search with a _lastUpdated filter which matches no results - would crash if the search also had a _sort - - - Fix several cases where invalid requests would cause an HTTP 500 instead of - a more appropriate 400/404 in the JPA server (vread on invalid version, - delete with no ID, etc.) - - - Fix narrative generation for DSTU2 Medication resource - - - Profile validator now works for valuesets which use - v2 tables - - - JPA server Patient/[id]/$everything operation now supports - _lastUpdated filtering and _sort'ing of results. - - - Fix parser issue where profiled choice element datatypes (e.g. value[x] where one allowable - type is Duration, which is a profile of Quantity) get incorrectly encoded using the - profiled datatype name instead of the base datatype name as required by the FHIR - spec. Thanks to Nehashri Puttu Lokesh for reporting! - - - Some generated Enum types in DSTU2 HAPI structures - did not have latest valueset definitions applied. Thanks - to Bill de Beaubien for reporting! - - - JPA server can now successfully search for tokens pointing at code values - (values with no explicit system but an implied one, such as Patient.gender) - even if the system is supplied in the query. - - - Correct issues with Android library. Thanks to - Thomas Andersen for the submission! - - - JPA server incorrectly rejected match URLs - if they did not contain a question mark. Thanks - to Bill de Beaubien for reporting! - - - Remove invalid entries in OSGi Manifest. Thanks - to Alexander Kley for the fix! - - - JPA server now supports $everything on Patient and Encounter types (patient and encounter instance was - already supported) - - - Generic client operation invocations now - have an additional inline method for generating the input - Parameters using chained method calls instead - of by passing a Parameters resource in - - - Parsing an XML resource where the XHTML - namespace was declared before the beginning - of the narrative section caused an invalid - re-encoding when encoding to JSON. - - - Conditional deletes in JPA did not correctly - process if the condition had a chain or a - qualifier, e.g. "Patient?organization.name" or - "Patient.identifier:missing" - - - Generic/fluent client search can now be - performed using a complete URL supplied - by user code. Thanks to Simone Heckmann - pointing out that this was needed! - - - Refactor JPA $everything operations so that - they perform better - - - Server operation methods can now declare the - ID optional, via - @IdParam(optional=true) - meaning that the same operation can also be invoked - at the type level. - - - Make JPA search queries with _lastUpdated parameter a bit more efficient - - - Clean up Android project to make it more lightweight and remove a - number of unneeded dependencies. Thanks to Thomas Andersen - for the pull request! - - - Fix a crash when encoding a Binary resource in JSON encoding - if the resource has no content-type - - - JPA server now supports read/history/search in transaction entries - by calling the actual implementing method in the server (previously - the call was simulated, which meant that many features did not work) - - - ResourceReferenceDt#loadResource(IRestfulClient) did not - use the client's read functionality, so it did not - handle JSON responses or use interceptors. Thanks to - JT for reporting! - - - JPA server maximumn length for a URI search parameter has been reduced from - 256 to 255 in order to accomodate MySQL's indexing requirements - - - Server failed to respond correctly to compartment search operations - if the same provider also contained a read operation. Thanks to GitHub user - @am202 for reporting! - - - Fix issue in testpage-overlay's new Java configuration where only the first - configured server actually gets used. - - - Introduce - IJpaServerInterceptor - interceptors for JPA server which can be used for more fine grained operations. - - - Parser (XML and JSON) shouldn't encode an ID tag in resources - which are part of a bundle when the resource has a UUID/OID - ID. - - - Add ability for a server REST resource provider @Search method - to declare that it should allow even parameters it doesn't - understand. - - - Correctly set the Bundle.type value on all pages of a search result in - the server, and correcltly set the same value in JPA server $everything - results. - - - JPA $everything operations now support new parameters _content - and _text, which work the same way as the same parameters on a - search. This is experimental, since it is not a part of the core - FHIR specification. - - - Process "Accept: text/xml" and "Accept: text/json" headers was - wanting the equivalent FHIR encoding styles. These are not - correct, but the intention is clear so we will honour them - just to be helpful. - - - Generated Enum types for some ValueSets did not include all - codes (specifically, ValueSets which defined concepts containing - child concepts did not result in Enum values for the child concepts) - - - In the JPA server, order of transaction processing should be - DELETE, POST, PUT, GET, and the order should not matter - within entries with the same verb. Thanks to Bill de Beaubien - for reporting! - - - Add the ability to wire JPA conformance providers - using Spring (basically, add default constructors - and setters to the conformance providers). Thanks - to C. Mike Bylund for the pull request! - -
    - - - JPA server now validates QuestionnaireAnswers for conformance to their respective Questionnaire - if one is declared. - - - SyntaxHighlightingInterceptor now also highlights OperationOutcome responses for errors/exceptions. - - - Model classes do not use BoundCodeableConcept for example bindings that do not - actually point to any codes (e.g. Observation.interpretation). Thanks - to GitHub user @steve1medix for reporting! - - - Server now exports operations as separate resources instead of as contained resources - within Conformance - - - Add new operation $get-resource-counts which will replace the resource - count extensions exported in the Conformance statement by the JPA - server. - - - JPA server sorting often returned unexpected orders when multiple - indexes of the same type were found on the same resource (e.g. multiple string indexed fields). Thanks to - Travis Cummings for reporting! - - - Add another method to IServerInterceptor which converts an exception generated on the server - into a BaseServerResponseException. This is useful so that servers using ResponseHighlighterInterceptor - will highlight exceptions even if they aren't created with an OperationOutcome. - - - XmlParser and JsonParser in DSTU2 mode should not encode empty - tags in resource. Thanks to Bill De Beaubien for reporting! - - - OperationDefinitions generated by server did not properly document - their return parameters or the type of their input parameters. - - - Operations in server generated conformance statement should only - appear once per name, since the name needs to be unique. - - - Resources and datatypes are now serializable. This is an - experimental feature which hasn't yet been extensively tested. Please test and give us your feedback! - - - Switch REST server to using HttpServletRequest#getContextPath() to get - the servlet's context path. This means that the server should behave more - predictably, and should work in servlet 2.4 environments. Thanks to - Ken Zeisset for the suggestion! - - - Vagrant environment now has an apt recipt to ensure that - package lists are up to date. Thanks to GitHub user - Brian S. Corbin (@corbinbs) for thr contribution! - - - JPA server and generic client now both support the _tag search parameter - - - Add support for BATCH mode to JPA server transaction operation - - - Server was not correctly unescaping URL parameter values with - a trailing comma or an escaped backslash. Thanks to GitHub user - @SherryH for all of her help in diagnosing this issue! - - - Avoid crash when parsing if an invalid child element is found in - a resource reference. - - - Create new android specialty libraries for DSTU1 and DSTU2 - - - Throwing a server exception (e.g. AuthenticationException) in a server interceptor's - incomingRequestPreProcessed method resulted in the server returning an HTTP 500 instead - of the appropriate error code for the exception being thrown. Thanks to Nagesh Bashyam - for reporting! - - - Fix issue in JSON parser where invalid contained resources (missing - a resourceType element) fail to parse with a confusing NullPointerException. - Thanks to GitHub user @hugosoares for reporting! - - - JPA server now implements the $validate-code operation - - - HAPI-FHIR now has support for _summary and _elements parameters, in server, client, - and JPA server. - - - _revinclude results from JPA server should have a Bundle.entry.search.mode of - "include" and not "match". Thanks to Josh Mandel for reporting! - - - Resource references using resource instance objects instead of resource IDs - will correctly qualify the IDs with the resource type if they aren't already qualified - - - Testpage Overlay project now properly allows a custom client - factory to be used (e.g. for custom authentication, etc.) Thanks - to Chin Huang (@pukkaone) for the pull request! - - - JPA server should reject IDs containing invalid characters (e.g. "abc:123") - but should allow client assigned IDs that contain text but do not start with - text. Thanks to Josh Mandel for reporting! - - - :text modifier on server and JPA server did not work correctly. Thanks to - Josh Mandel for reporting! - - - Fix issue in client where parameter values containing a comma were - sometimes double escaped. - - - _include parameters now support the new _include:recurse=FOO]]> - syntax that has been introduced in DSTU2 in the Client, Server, and JPA Server modules. - Non-recursive behaviour is now the default (previously it was recursive) and :recurse - needs to be explicitly stated in order to support recursion. - - - New operations added to JPA server to force re-indexing of all - resources (really only useful after indexes change or bugs are - fixed) - - - JPA server did not correctly index search parameters - of type "URI". Thanks to David Hay for reporting! Note that if you are using the JPA server, this change - means that - there are two new tables added to the database schema. Updating existing resources in the database may fail - unless you - set default values for the resource - table by issuing a SQL command similar to the following (false may be 0 or something else, depending on the - database platform in use) - update hfj_resource set sp_coords_present = false;
    - update hfj_resource set sp_uri_present = false;
    ]]> -
    - - FIx issue in JPA server where profile declarations, tags, and - security labels were not always properly removed by an update that - was trying to remove them. Also don't store duplicates. - - - Instance $meta operations on JPA server did not previously return the - resource version and lastUpdated time - - - Server responses populate Bundle.entry.fullUrl if possible. Thanks - to Bill de Beaubien for reporting! - - - XML parser failed to initialize in environments where a very old Woodstox - library is in use (earlier than 4.0). Thanks to Bill de Beaubien for - reporting! - - - Invalid/unexpected attributes found when parsing composite elements - should be logged or reported to the parser error handler - - - JPA server can now store Conformance resources, per a request - from David Hay - - - ResponseHighlightingInterceptor now skips handling responses if it - finds a URL parameter of _raw=true]]> (in other - words, if this parameter is found, the response won't be returned as - HTML even if the request is detected as coming from a browser. - - - RestfulServer now supports dynamically adding and removing resource providers - at runtime. Thanks to Bill Denton for adding this. - - - JPA server now correctly suppresses contents of deleted resources - in history - - - JPA server returned deleted resources in search results when using the _tag, _id, _profile, or _security - search parameters - - - Fix issue with build on Windows. Thanks to Bryce van Dyk for the pull request! - - - JPA server now supports $validate operation completely, including delete mode - and profile validation using the RI InstanceValidator - -
    - - - Add support for reference implementation structures. - - - Parsers did not encode the resource meta element if the resource - had tags but no other meta elements. Thanks to Bill de Beaubien and - Claude Nanjo for finding this. - - - Correct performance issue with :missing=true search requests where the parameter is a resource link. Thanks - to wanghaisheng for all his help in testing this. - - - The self link in the Bundle returned by searches on the server does not respect the - server's address strategy (which resulted in an internal IP being shown on fhirtest.uhn.ca) - - - Introduce ResponseHighlighterInterceptor, which provides syntax highlighting on RESTful server responses - if the server detects that the request is coming from a browser. This interceptor has been added - to fhirtest.uhn.ca responses. - - - Performing a create operation in a client used an incorrect URL if the - resource had an ID set. ID should be ignored for creates. Thanks to - Peter Girard for reporting! - - - Add better addXXX() methods to structures, which take the datatype being added as a parameter. Thanks to - Claude Nanjo for the - suggestion! - - - Add a new parser validation mechanism (see the - validation page]]> for info) which can be - used to validate resources as they are being parsed, and optionally fail if invalid/unexpected - elements are found in resource bodies during parsing. - - - IParser#parseResource(Class, String) method, which is used to parse a resource into the given - structure will now throw a DataFormatException if the structure is for the wrong type of - resource for the one actually found in the input String (or Reader). For example, if a Patient - resource is being parsed into Organization.class this will now cause an error. Previously, - the XML parser would ignore the type and the JSON parser would fail. This also caused - operations to not parse correctly if they returned a resource type other than - parameters with JSON encoding (e.g. the $everything operation on UHN's test server). - Thanks to Avinash Shanbhag for reporting! - - - Web tester UI now supports _revinclude - - - Support link elements in Bundle.entry when parsing in DSTU2 mode - using the old (non-resource) Bundle class. Thanks to GitHub user - @joedai for reporting! - - - LoggingInterceptor for server now supports logging DSTU2 extended operations by name - - - Woodstox XML parser has a default setting to limit the maximum - length of an attribute to 512kb. This caused issues handling - large attachments, so this setting has been increased to 100Mb. - Thanks to Nikos Kyriakoulakos for reporting! - - - Some HTML entities were not correctly converted during parsing. Thanks to - Nick Kitto for reporting! - - - In the JPA Server: - Transactions creating resources with temporary/placeholder resource IDs - and other resources with references to those placeholder IDs previously - did not work if the reference did not contain the resource type - (e.g. Patient/urn:oid:0.1.2.3 instead of urn:oid:0.1.2.3). The - latter is actually the correct way of specifying a reference to a - placeholder, but the former was the only way that worked. Both forms - now work, in order to be lenient. Thanks to Bill De Beaubien for - reporting! - - - When parsing Bundles, if Bundle.entry.base is set to "cid:" (for DSTU1) - or "urn:uuid:" / "urn:oid:" (for DSTU2) this is now correctly passed as - the base in resource.getId(). Conversely, when - encoding bundles, if a resource ID has a base defined, - and Bundle.entry.base is empty, it will now be - automatically set by the parser. - - - Add fluent client method for validate operation, and support the - new DSTU2 style extended operation for $validate if the client is - in DSTU2 mode. Thanks to Eric from the FHIR Skype Implementers chat for - reporting. - - - Server now supports complete Accept header content negotiation, including - q values specifying order of preference. Previously the q value was ignored. - - - Server in DSTU2 mode now indicates that whether it has support for Transaction operation or not. Thanks to - Kevin Paschke for pointing out that this wasn't working! - - - Questionnaire.title now gets correctly indexed in JPA server (it has no path, so it is a special case) - - - JPA server now supports ifNoneMatch in GET within a transaction request. - - - DateRangeParam now supports null values in the constructor for lower or upper bounds (but - still not both) - - - Generic/fluent client and JPA server now both support _lastUpdated search parameter - which was added in DSTU2 - - - JPA server now supports sorting on reference parameters. Thanks to - Vishal Kachroo for reporting that this wasn't working! - - - Prevent Last-Updated header in responses coming back to the client from - overwriting the 'lastUpdated' value in the meta element in DSTU2 - resources. This is important because 'lastUpdated' can have more - precision than the equivalent header, but the client previously - gave the header priority. - - - JPA server supports _count parameter in transaction containing search URL (nested search) - - - DSTU2 servers now indicate support for conditional create/update/delete in their - conformance statement. - - - Support for the Prefer header has been added to the server, client, and - JPA modules. - - - JPA server failed to search for deep chained parameters across multiple references, - e.g. "Location.partof.partof.organization". Thanks to Ismael Sarmento Jr for - reporting! - - - Prevent crash when encoding resources with contained resources - if the contained resources contained a circular reference to each other - - - Add $meta, $meta-add, and $meta-delete operations to generic client - - - - - Bump the version of a few dependencies to the - latest versions: - -
  • Phloc-commons (for schematron validation) 4.3.5 -> 4.3.6
  • -
  • Apache HttpClient 4.3.6 -> 4.4
  • -
  • Woodstox 4.4.0 -> 4.4.1
  • -
  • SLF4j 1.7.9 -> 1.7.10
  • -
  • Spring (used in hapi-fhir-jpaserver-base module) 4.1.3.RELEASE -> 4.1.5.RELEASE
  • - - ]]> -
    - - Add support for "profile" and "tag" elements in the resource Meta block - when parsing DSTU2 structures. - - - When a user manually creates the list of contained resources in a resource, - the encoder fails to encode any resources that don't have a '#' at the - start of their ID. This is unintuitive, so we now assume that '123' means '#123'. - Thanks to myungchoi for reporting and providing a test case! - - - Add methods for setting the default encoding (XML/JSON) and - oretty print behaviour in the Fluent Client. Thanks to Stackoverflow - user ewall for the idea. - - - JPA Server did not mark a resource as "no longer deleted" if it - was updated after being deleted. Thanks to Elliott Lavy and Lloyd - McKenzie for reporting! - - - Fix regression in 0.9 - Server responds with an HTTP 500 and a NullPointerException instead of an HTTP 400 - and a useful error message if the client requests an unknown resource type - - - Add support for - _revinclude]]> - parameter in client, server, and JPA. - - - Include constants on resources (such as - Observation.INCLUDE_VALUE_STRING]]>) - have been switched in the DSTU2 structures to use - the new syntax required in DSTU2: [resource name]:[search param NAME] - insead of the DSTU1 style [resource name].[search param PATH] - - - When encoding resources, the parser will now convert any resource - references to versionless references automatically (i.e. it will - omit the version part automatically if one is present in the reference) - since references between resources must be versionless. Additionally, - references in server responses will omit the server base URL part of the - reference if the base matches the base for the server giving - the response. - - - Narrative generator incorrectly sets the Resource.text.status to 'generated' even if the - given resource type does not have a template (and therefore no narrative is actually generated). - Thanks to Bill de Beaubien for reporting! - - - Searching in JPA server with no search parameter returns deleted resources when it should exclude them. - - - Remove Eclipse and IntelliJ artifacts (.project, *.iml, etc) from version control. Thanks - to Doug Martin for the suggestion! - - - REST server methods may now have a parameter of - type NarrativeModeEnum which will be populated with - the value of the _narrative URL parameter - if one was supplied. Annotation client methods - may also include a parameter of this type, and it - will be used to populate this parameter on the request - URL if it is not null. Thanks to Neal Acharya for the - idea! - - - Android JAR now includes servlet-API classes, as the project will not - work without them. Thanks - - - Requested _include values are preserved across paging links when the - server returns multiple pages. Thanks to Bill de Beaubien for - reporting! - - - Add new server address strategy "ApacheProxyAddressStrategy" which uses - headers "x-forwarded-host" and "x-forwarded-proto" to determine the - server's address. This is useful if you are deploying a HAPI FHIR - server behind an Apache proxy (e.g. for load balancing or other reasons). - Thanks to Bill de Beaubien for contributing! - - - Resource references between separate resources found in a single - bundle did not get populated with the actual resource when parsing a - DSTU2 style bundle. Thanks to Nick Peterson for reporting and figuring - out why none of our unit tests were actually catching the problem! - - - JSON encoder did not encode contained resources when encoding - a DSTU2 style bundle. Thanks to Mohammad Jafari and baopingle - for all of their help in tracking this issue down and developing - useful unit tests to demonstrate it. - - - Client now supports invoking transcation using a DSTU2-style - Bundle resource as the input. - - - JPA Server $everything operation could sometimes include a duplicate copy of - the main focus resource if it was referred to in a deep chain. Thanks - to David Hay for reporting! - - - JPA Server $everything operation now allows a _count parameter - - - JPA server failed to index resources containing ContactPointDt elements with - populated values (e.g. Patient.telecom). Thanks to Mohammad Jafari for reporting! - - - Add a new configuration method on the parsers, - setStripVersionsFromReferences(boolean)]]> which - configures the parser to preserve versions in resource reference links when - encoding. By default, these are removed. - - - Terser's IModelVisitor now supplies to the path to the element. This is - an API change, but I don't think there are many users of the IModelVisitor yet. - Please let us know if this is a big hardship and we can find an alternate way - of making this change. - - - Prevent server from returning a Content-Location header for search - response when using the DSTU2 bundle format - - - JPA server (uhnfhirtest.uhn.ca) sometimes included an empty - "text" element in Bundles being returned. - - - Add a framework for the Web Tester UI to allow its internal FHIR client to - be configured (e.g. to add an authorization interceptor so that it adds - credentials to client requests it makes). Thanks to Harsha Kumara for - the suggestion! - - - Fix regression in early 1.0 builds where resource type sometimes does not get - populated in a resource ID when the resource is parsed. Thanks to - Nick Peterson for reporting, and for providing a test case! - - - Allow fluent/generic client users to execute a transaction using a raw string (containing a bundle resource) - as input instead of a Bundle resource class instance. - - - Disable date validation in the web tester UI, so that it is possible to - enter partial dates, or dates without times, or even test out invalid date - options. - - - Make BaseElement#getUndeclaredExtensions() and BaseElement#getUndeclaredExtensions() return - a mutable list so that it is possible to delete extensions from a resource instance. - - - Server conformance statement check in clients (this is the check - where the first time a given FhirContext is used to access a given server - base URL, it will first check the server's Conformance statement to ensure - that it supports the correct version of FHIR) now uses any - registered client interceptors. In addition, IGenericClient now has a method - "forceConformanceCheck()" which manually triggers this check. Thanks to - Doug Martin for reporting and suggesting! - - - Rename the Spring Bean definition for the JPA server EntityManager from - "myEntityManagerFactory" to just "entityManagerFactory" as this is the - default bean name expected in other parts of the Spring framework. - Thanks to Mohammad Jafari for the suggestion! - - - Improve error message when a user tries to perform a create/update with an invalid - or missing Content-Type header. Thanks to wanghaisheng for reporting! (This was - actually a three part bug, so the following two fixes also reference this - bug number) - - - Add support for :missing qualifier in generic/fluent client. - - - Add support for :missing qualifier in JPA server. - - - Add a new configuration method on the parsers, - setStripVersionsFromReferences(boolean)]]> which - configures the parser to preserve versions in resource reference links when - encoding. By default, these are removed. - - - Add an exception for RESTful clients/servers to represent the - HTTP 403 Forbidden status code. Thanks to Joel Costigliola for - the patch! - - - Transaction server operations incorrectly used the "Accept" header instead of the "Content-Type" header to - determine the - POST request encoding. Thanks to Rene Spronk for providing a test case! - -
    - - - Support for DSTU2 features introduced: New resource definitions, Bundle resource, - encoding changes (ID in resource bodt, meta tag) - - - Fix an issue encoding extensions on primitive types in JSON. Previously the "_value" object - would be an array even if the field it was extending was not repeatable. This is not correct - according to the specification, nor can HAPI's parser parse this correctly. The encoder - has been corrected, and the parser has been adjusted to be able to handle resources with - extensions encoded in this way. Thanks to Mohammad Jafari for reporting! - - - Library now checks if custom resource types can be instantiated on startup - (e.g. because they don't have a no-argument constructor) in order to - avoid failing later - - - Bump a few dependency JARs to the latest versions in Maven POM: - -
  • SLF4j (in base module) - Bumped to 1.7.9
  • -
  • Apache HTTPClient (in base module) - Bumped to 4.3.6
  • -
  • Hibernate (in JPA module) - Bumped to 4.3.7
  • - - ]]> -
    - - IdDt failed to recognize local identifiers containing fragments that look like - real identifiers as being local identifiers even though they started with '#'. - For example, a local resource reference of "#aa/_history/aa" would be incorrectly - parsed as a non-local reference. - Thanks to Mohammad Jafari for reporting! - - - Last-Modified]]> - header in server was incorrectly using FHIR date format instead - of RFC-1123 format. - - - Server create and update methods failed with an IllegalArgumentException if - the method type was a custom resource definition type (instead of a built-in - HAPI type). Thanks to Neal Acharya for the analysis. - - - JPA server module now supports - _include]]> - value of - *]]>. Thanks to Bill de Beaubien for reporting! - - - IdDt method - - returned String (unlike all of the other "withFoo" methods on that class), - and did not work correctly if the IdDt already had a server base. This - has been corrected. Note that the return type for this method has been - changed, so code may need to be updated. - - - In previous versions of HAPI, the XML parser encoded multiple contained - resources in a single - <contained></contained>]]> - tag, even though the FHIR specification rerquires a separate - <contained></contained>]]> - tag for each resource. This has been corrected. Note that the parser will - correctly parse either form (this has always been the case) so this - change should not cause any breakage in HAPI based trading partners, but - may cause issues if other applications have been coded to depend on the - incorrect behaviour. Thanks to Mochaholic for reporting! - - - Custom/user defined resource definitions which contained more than one - child with no order defined failed to initialize properly. Thanks to - Andy Huang for reporting and figuring out where the - problem was! - - - RESTful Client now queries the server (only once per server base URL) to ensure that - the given server corresponds to the correct version of the FHIR specification, as - defined by the FhirContext. This behaviour can be disabled by setting the - appropriate configuration on the - RestfulClientConfig. Thanks to Grahame Grieve for the suggestion! - - - JPA module now supports deleting resource via transaction - - - DateClientParam#second() incorrectly used DAY precision instead - of SECOND precision. Thanks to Tom Wilson for the pull request! - - - Fix issue where HAPI failed to initialize correctly if Woodstox library was not on the classpath, even - if StAX API was configured to use a different provider. Thanks to - James Butler for reporting and figuring out where the issue was! - - - Calling BaseDateTimeDt#setValue(Date, TemporalPrecisionEnum) did not always actually respect - the given precision when the value was encoded. Thanks to jacksonjesse for - reporting! - - - Encoders (both XML and JSON) will no longer encode contained resources if they are - not referenced anywhere in the resource via a local reference. This is just a convenience - for users who have parsed a resource with contained resources and want to remove some - before re-encoding. Thanks to Alexander Kley for reporting! - - - Add support for DSTU2 style security labels in the parser and encoder. Thanks to - Mohammad Jafari for the contribution! - - - Server requests for Binary resources where the client has explicitly requested XML or JSON responses - (either with a _format]]> URL parameter, or an Accept]]> request - header) - will be responded to using the Binary FHIR resource type instead of as Binary blobs. This is - in accordance with the recommended behaviour in the FHIR specification. - - - Add new properties to RestfulServer: "DefaultResponseEncoding", which allows - users to configure a default encoding (XML/JSON) to use if none is specified in the - client request. Currently defaults to XML. Also "DefaultPrettyPrint", which specifies - whether to pretty print responses by default. Both properties can be overridden - on individual requets using the appropriate Accept header or request URL parameters. - - - Add support for quantity search params in FHIR tester UI - - - Add support for FHIR "extended operations" as defined in the FHIR DSTU2 - specification, for the Generic Client, Annotation Client, and - Server. - - - Observation.applies[x] and other similar search fields with multiple allowable - value types were not being correctly indexed in the JPA server. - - - DateClientParam.before() incorrectly placed "<=" instead of - "<" in the request URL. Thanks to Ryan for reporting! - - - Server now only automatically adds _include resources which are provided - as references if the client request actually requested that specific include. - See RestfulServer - - - User defined resource types which contain extensions that use a bound code type - (e.g. an BoundCodeDt with a custom Enum) failed to parse correctly. Thanks - to baopingle for reporting and providing a test case! - - - Sorting is now supported in the Web Testing UI (previously a button existed for sorting, but it didn't do - anything) - - - Server will no longer include stack traces in the OperationOutcome returned to the client - when an exception is thrown. A new interceptor called ExceptionHandlingInterceptor has been - created which adds this functionality back if it is needed (e.g. for DEV setups). See the - server interceptor documentation for more information. Thanks to Andy Huang for the suggestion! - -
    - - - API CHANGE:]]> The "FHIR structures" for DSTU1 (the classes which model the - resources and composite datatypes) have been moved out of the core JAR into their - own JAR, in order to allow support for DEV resources, and DSTU2 resources when thast - version is finalized. See the - DSTU2 page]]> - for more information. - - - Deprecated API Removal: The following classes (which were deprocated previously) - have now been removed: -
      -
    • ISecurityManager: If you are using this class, the same functionality - is available through the more general purpose - server interceptor - capabilities.
    • -
    • CodingListParam: This class was made redundant by the - TokenOrListParam - class, which can be used in its place.
    • -
    - ]]> -
    - - API Change: The IResource#getResourceMetadata() method has been changed - from returning - Map<ResourceMetadataKeyEnum<?>, Object> - to returning a new type called - ResourceMetadataMap. This new type implements - Map<ResourceMetadataKeyEnum<?>, Object> - itself, so this change should not break existing code, but may - require a clean build in order to run correctly. - ]]> - - - Profile generation on the server was not working due to IdDt being - incorrectly used. Thanks to Bill de Beaubien for the pull request! - - - Profiles did not generate correctly if a resource definition class had a - defined extension which was of a composite type. Thanks to Bill de Beaubien for the pull request! - - - Remove unnecessary IOException from narrative generator API. Thanks to - Petro Mykhailysyn for the pull request! - - - Introduced a new - @ProvidesResources]]> annotation which can be added to - resource provider and servers to allow them to declare additional resource - classes they are able to serve. This is useful if you have a server which can - serve up multiple classes for the same resource type (e.g. a server that sometimes - returns a default Patient, but sometimes uses a custom subclass). - Thanks to Bill de Beaubien for the pull request! - - - Introduced a new - @Destroy]]> annotation which can be added to - a resource provider method. This method will be called by the server when it - is being closed/destroyed (e.g. when the application is being undeployed, the - container is being shut down, etc.) - Thanks to Bill de Beaubien for the pull request! - - - Add a new method to the server interceptor - framework which allows interceptors to be notified of any exceptions and - runtime errors within server methods. Interceptors may optionally also - override the default error handling behaviour of the RestfulServer. - - - Add constants to BaseResource for the "_id" search parameter which all resources - should support. - - - DateRangeParam parameters on the server now return correct - getLowerBoundAsInstant()]]> - and - getUpperBoundAsInstant()]]> - values if a single unqualified value is passed in. For example, if - a query containing - &birthdate=2012-10-01]]> - is received, previously these two methods would both return the same - value, but with this fix - getUpperBoundAsInstant()]]> - now returns the instant at 23:59:59.9999. - - - Resource fields with a type of "*" (or Any) sometimes failed to parse if a - value type of "code" was used. Thanks to Bill de Beaubien for reporting! - - - Remove dependency on JAXB libraries, which were used to parse and encode - dates and times (even in the JSON parser). JAXB is built in to most JDKs - but the version bundled with IBM's JDK is flaky and resulted in a number - of problems when deploying to Websphere. - - - Primitive datatypes now preserve their original string value when parsing resources, - as well as containing the "parsed value". For instance, a DecimalDt field value of - 1.0000]]> will be parsed into the corresponding - decimal value, but will also retain the original value with the corresponding - level of precision. This allows vadliator rules to be applied to - original values as received "over the wire", such as well formatted but - invalid dates, e.g. "2001-15-01". Thanks to Joe Athman for reporting and - helping to come up with a fix! - - - When using Generic Client, if performing a - or operation using a String as the resource body, - the client will auto-detect the FHIR encoding style and send an appropriate - header. - - - JPA module (and public HAPI-FHIR test server) were unable to process resource types - where at least one search parameter has no path specified. These now correctly save - (although the server does not yet process these params, and it should). Thanks to - GitHub user shvoidlee for reporting and help with analysis! - - - Generic/Fluent Client "create" and "update" method requests were not setting a content type header - - - DateDt left precision value as in the constructor - . - - - RESTful server now doesn't overwrite resource IDs if they are absolute. In other words, if - a server's Resource Provider returns a resource with ID "Patient/123" it will be translated to - "[base url]/Patient/123" but if the RP returns ID "http://foo/Patient/123" the ID will be - returned exactly as is. Thanks to Bill de Beaubien for the suggestion! - - - JPA module Transaction operation was not correctly replacing logical IDs - beginning with "cid:" with server assigned IDs, as required by the - specification. - - - did not visit or find children in contained resources when - searching a resource. This caused server implementations to not always return contained - resources when they are included with a resource being returned. - - - Add a method which returns the name of the - resource in question (e.g. "Patient", or "Observation"). This is intended as a - convenience to users. - - - Do not strip version from resource references in resources returned - from server search methods. Thanks to Bill de Beaubien for reporting! - - - Correct an issue with the validator where changes to the underlying - OperationOutcome produced by a validation cycle cause the validation - results to be incorrect. - - - Client interceptors registered to an interface based client instance - were applied to other client instances for the same client interface as well. (Issue - did not affect generic/fluent clients) - - - DateDt, DateTimeDt and types InstantDt types now do not throw an exception - if they are used to parse a value with the wrong level of precision for - the given type but do throw an exception if the wrong level of precision - is passed into their constructors.
    ]]> - This means that HAPI FHIR can now successfully parse resources from external - sources that have the wrong level of precision, but will generate a validation - error if the resource is validated. Thanks to Alexander Kley for the suggestion! -
    - - Encoding a Binary resource without a content type set should not result in a NullPointerException. Thanks - to Alexander Kley for reporting! - - - Server gives a more helpful error message if multiple IResourceProvider implementations - are provided for the same resource type. Thanks to wanghaisheng for the idea! - - - Bring DSTU1 resource definitions up to version 0.0.82-2929]]> - Bring DEV resource definitions up to 0.4.0-3775]]> - Thanks to crinacimpian for reporting! - - - JPA server did not correctly process _include requests if included - resources were present with a non-numeric identifier. Thanks to - Bill de Beaubien for reporting! - - - Client requests which include a resource/bundle body (e.g. create, - update, transaction) were not including a charset in the content type - header, leading to servers incorrectly assuming ISO-8859/1. Thanks to - shvoidlee for reporting! - - - Clean up the way that Profile resources are automatically exported - by the server for custom resource profile classes. See the - @ResourceDef]]> - JavaDoc for information on how this works. - - - Add convenience methods to TokenOrListParam to test whether any of a set of tokens match - the given requested list. - - - Add a protected method to RestfulServer which allows developers to - implement their own method for determining which part of the request - URL is the FHIR request path (useful if you are embedding the RestulServer inside - of another web framework). Thanks to Harsha Kumara for the pull request! - -
    - - - API CHANGE:]]> The TagList class previously implemented ArrayList semantics, - but this has been replaced with LinkedHashMap semantics. This means that the list of - tags will no longer accept duplicate tags, but that tag order will still be - preserved. Thanks to Bill de Beaubien for reporting! - - - Server was incorrectly including contained resources being returned as both contained resources, and as - top-level resources in the returned bundle for search operations. - Thanks to Bill de Beaubien for reporting! This also fixes Issue #20, thanks to - lephty for reporting! - - - Documentation fixes - - - Add a collection of new methods on the generic client which support the - read, - read, - and search - ]]> - operations using an absolute URL. This allows developers to perform these operations using - URLs they obtained from other sources (or external resource references within resources). In - addition, the existing read/vread operations will now access absolute URL references if - they are passed in. Thanks to Doug Martin of the Regenstrief Center for Biomedical Informatics - for contributing this implementation! - - - Server implementation was not correctly figuring out its own FHIR Base URL when deployed - on Amazon Web Service server. Thanks to Jeffrey Ting and Bill De Beaubien of - Systems Made Simple for their help in figuring out this issue! - - - XML Parser failed to encode fields with both a resource reference child and - a primitive type child. Thanks to Jeffrey Ting and Bill De Beaubien of - Systems Made Simple for their help in figuring out this issue! - - - HAPI now runs successfully on Servlet 2.5 containers (such as Tomcat 6). Thanks to - Bernard Gitaadji for reporting and diagnosing the issue! - - - Summary (in the bundle entry) is now encoded by the XML and JSON parsers if supplied. Thanks to David Hay of - Orion Health for reporting this! - - - Conformance profiles which are automatically generated by the server were missing a few mandatory elements, - which meant that the profile did not correctly validate. Thanks to Bill de Beaubien of Systems Made Simple - for reporting this! - - - XHTML (in narratives) containing escapable characters (e.g. < or ") will now always have those - characters - escaped properly in encoded messages. - - - Resources containing entities which are not valid in basic XML (e.g. &sect;) will have those - entities converted to their equivalent unicode characters when resources are encoded, since FHIR does - not allow extended entities in resource instances. - - - Add a new client interceptor which adds HTTP Authorization Bearer Tokens (for use with OAUTH2 servers) - to client requests. - - - Add phloc-commons dependency explicitly, which resolves an issue building HAPI from source on - some platforms. Thanks to Odysseas Pentakalos for the patch! - - - HAPI now logs a single line indicating the StAX implementation being used upon the - first time an XML parser is created. - - - Update methods on the server did not return a "content-location" header, but - only a "location" header. Both are required according to the FHIR specification. - Thanks to Bill de Beaubien of Systems Made Simple for reporting this! - - - Parser failed to correctly read contained Binary resources. Thanks to Alexander Kley for - the patch! - - - Calling encode multiple times on a resource with contained resources caused the contained - resources to be re-added (and the actual message to grow) with each encode pass. Thanks to - Alexander Kley for the test case! - - - JSON-encoded contained resources with the incorrect "_id" element (which should be "id", but some - incorrect examples exist on the FHIR specification) now parse correctly. In other words, HAPI - previously only accepted the correct "id" element, but now it also accepts the incorrect - "_id" element just to be more lenient. - - - Several unit tests failed on Windows (or any platform with non UTF-8 default encoding). This may - have also caused resource validation to fail occasionally on these platforms as well. - Thanks to Bill de Beaubien for reporting! - - - toString() method on TokenParam was incorrectly showing the system as the value. - Thanks to Bill de Beaubien for reporting! - - - Documentation on contained resources contained a typo and did not actually produce contained resources. - Thanks - to David Hay of Orion Health for reporting! - - - Add a - Vagrant]]> - based environment (basically a fully built, self contained development environment) for - trying out the HAPI server modules. Thanks to Preston Lee for the pull request, and for - offering to maintain this! - - - Change validation API so that it uses a return type instead of exceptions to communicate - validation failures. Thanks to Joe Athman for the pull request! - - - Add a client interceptor which adds an HTTP cookie to each client request. Thanks to - Petro Mykhailysyn for the pull request! - - - - - - Add server interceptor framework, and new interceptor for logging incoming - requests. - - - Add server validation framework for validating resources against the FHIR schemas and schematrons - - - Tester UI created double _format and _pretty param entries in searches. Thanks to Gered King of University - Health Network for reporting! - - - Create method was incorrectly returning an HTTP 204 on sucessful completion, but - should be returning an HTTP 200 per the FHIR specification. Thanks to wanghaisheng - for reporting! - - - FHIR Tester UI now correctly sends UTF-8 charset in responses so that message payloads containing - non US-ASCII characters will correctly display in the browser - - - JSON parser was incorrectly encoding extensions on composite elements outside the element itself - (as is done correctly for non-composite elements) instead of inside of them. Thanks to David Hay of - Orion for reporting this! - - - Contained/included resource instances received by a client are now automatically - added to any ResourceReferenceDt instancea in other resources which reference them. - - - Add documentation on how to use eBay CORS Filter to support Cross Origin Resource - Sharing (CORS) to server. CORS support that was built in to the server itself has - been removed, as it did not work correctly (and was reinventing a wheel that others - have done a great job inventing). Thanks to Peter Bernhardt of Relay Health for all the assistance - in testing this! - - - IResource interface did not expose the getLanguage/setLanguage methods from BaseResource, - so the resource language was difficult to access. - - - JSON Parser now gives a more friendly error message if it tries to parse JSON with invalid use - of single quotes - - - Transaction server method is now allowed to return an OperationOutcome in addition to the - incoming resources. The public test server now does this in order to return status information - about the transaction processing. - - - Update method in the server can now flag (via a field on the MethodOutcome object being returned) - that the result was actually a creation, and Create method can indicate that it was actually an - update. This has no effect other than to switch between the HTTP 200 and HTTP 201 status codes on the - response, but this may be useful in some circumstances. - - - Annotation client search methods with a specific resource type (e.g. List<Patient>]]> search()) - won't return any resources that aren't of the correct type that are received in a response - bundle (generally these are referenced resources, so they are populated in the reference fields instead). - Thanks to Tahura Chaudhry of University Health Network for the unit test! - - - Added narrative generator template for OperationOutcome resource - - - Date/time types did not correctly parse values in the format "yyyymmdd" (although the FHIR-defined format - is "yyyy-mm-dd" anyhow, and this is correctly handled). Thanks to Jeffrey Ting of Systems Made Simple - for reporting! - - - Server search method for an unnamed query gets called if the client requests a named query - with the same parameter list. Thanks to Neal Acharya of University Health Network for reporting! - - - Category header (for tags) is correctly read in client for "read" operation - - - Transaction method in server can now have parameter type Bundle instead of - List<IBaseResource>]]> - - - HAPI parsers now use field access to get/set values instead of method accessors and mutators. - This should give a small performance boost. - - - JSON parser encodes resource references incorrectly, using the name "resource" instead - of the name "reference" for the actual reference. Thanks to - Ricky Nguyen for reporting and tracking down the issue! - - - Rename NotImpementedException to NotImplementedException (to correct typo) - - - Server setUseBrowserFriendlyContentType setting also respected for errors (e.g. OperationOutcome with - 4xx/5xx status) - - - Fix performance issue in date/time datatypes where pattern matchers were not static - - - Server now gives a more helpful error message if a @Read method has a search parameter (which is invalid, - but - previously lead to a very unhelpful error message). Thanks to Tahura Chaudhry of UHN for reporting! - - - Resource of type "List" failed to parse from a bundle correctly. Thanks to David Hay of Orion Health - for reporting! - - - QuantityParam correctly encodes approximate (~) prefix to values - - - If a server defines a method with parameter "_id", incoming search requests for that method may - get delegated to the wrong method. Thanks to Neal Acharya for reporting! - - - SecurityEvent.Object structural element has been renamed to - SecurityEvent.ObjectElement to avoid conflicting names with the - java Object class. Thanks to Laurie Macdougall-Sookraj of UHN for - reporting! - - - Text/narrative blocks that were created with a non-empty - namespace prefix (e.g. <xhtml:div xmlns:xhtml="...">...</xhtml:div>) - failed to encode correctly (prefix was missing in encoded resource) - - - Resource references previously encoded their children (display and reference) - in the wrong order so references with both would fail schema validation. - - - SecurityEvent resource's enums now use friendly enum names instead of the unfriendly - numeric code values. Thanks to Laurie MacDougall-Sookraj of UHN for the - suggestion! - - - - - HAPI has a number of RESTful method parameter types that have similar but not identical - purposes and confusing names. A cleanup has been undertaken to clean this up. - This means that a number of existing classes - have been deprocated in favour of new naming schemes. -
    ]]> - All annotation-based clients and all server search method parameters are now named - (type)Param, for example: StringParam, TokenParam, etc. -
    ]]> - All generic/fluent client method parameters are now named - (type)ClientParam, for example: StringClientParam, TokenClientParam, etc. -
    ]]> - All renamed classes have been retained and deprocated, so this change should not cause any issues - for existing applications but those applications should be refactored to use the - new parameters when possible. -
    - - Allow server methods to return wildcard generic types (e.g. List<? extends IResource>) - - - Search parameters are not properly escaped and unescaped. E.g. for a token parameter such as - "&identifier=system|codepart1\|codepart2" - - - Add support for OPTIONS verb (which returns the server conformance statement) - - - Add support for CORS headers in server - - - Bump SLF4j dependency to latest version (1.7.7) - - - Add interceptor framework for clients (annotation based and generic), and add interceptors - for configurable logging, capturing requests and responses, and HTTP basic auth. - - - Transaction client invocations with XML encoding were using the wrong content type ("application/xml+fhir" - instead - of the correct "application/atom+xml"). Thanks to David Hay of Orion Health for surfacing this one! - - - Bundle entries now support a link type of "search". Thanks to David Hay for the suggestion! - - - If a client receives a non 2xx response (e.g. HTTP 500) and the response body is a text/plain message or - an OperationOutcome resource, include the message in the exception message so that it will be - more conveniently displayed in logs and other places. Thanks to Neal Acharya for the suggestion! - - - Read invocations in the client now process the "Content-Location" header and use it to - populate the ID of the returned resource. Thanks to Neal Acharya for the suggestion! - - - Fix issue where vread invocations on server incorrectly get routed to instance history method if one is - defined. Thanks to Neal Acharya from UHN for surfacing this one! - - - Binary reads on a server not include the Content-Disposition header, to prevent HTML in binary - blobs from being used for nefarious purposes. See - FHIR Tracker Bug 3298]]> - for more information. - - - Support has been added for using an HTTP proxy for outgoing requests. - - - Fix: Primitive extensions declared against custom resource types - are encoded even if they have no value. Thanks to David Hay of Orion for - reporting this! - - - Fix: RESTful server deployed to a location where the URL to access it contained a - space (e.g. a WAR file with a space in the name) failed to work correctly. - Thanks to David Hay of Orion for reporting this! - -
    - - - BREAKING CHANGE:]]>: IdDt has been modified so that it - contains a partial or complete resource identity. Previously it contained - only the simple alphanumeric id of the resource (the part at the end of the "read" URL for - that resource) but it can now contain a complete URL or even a partial URL (e.g. "Patient/123") - and can optionally contain a version (e.g. "Patient/123/_history/456"). New methods have - been added to this datatype which provide just the numeric portion. See the JavaDoc - for more information. - - - API CHANGE:]]>: Most elements in the HAPI FHIR model contain - a getId() and setId() method. This method is confusing because it is only actually used - for IDREF elements (which are rare) but its name makes it easy to confuse with more - important identifiers. For this reason, these methods have been deprecated and replaced with - get/setElementSpecificId() methods. The old methods will be removed at some point. Resource - types are unchanged and retain their get/setId methods. - - - Allow use of QuantityDt as a service parameter to support the "quantity" type. Previously - QuantityDt did not implement IQueryParameterType so it was not valid, and there was no way to - support quantity search parameters on the server (e.g. Observation.value-quantity) - - - Introduce StringParameter type which can be used as a RESTful operation search parameter - type. StringParameter allows ":exact" matches to be specified in clients, and handled in servers. - - - Parsers (XML/JSON) now support deleted entries in bundles - - - Transaction method now supported in servers - - - Support for Binary resources added (in servers, clients, parsers, etc.) - - - Support for Query resources fixed (in parser) - - - Nested contained resources (e.g. encoding a resource with a contained resource that itself contains a - resource) - now parse and encode correctly, meaning that all contained resources are placed in the "contained" element - of the root resource, and the parser looks in the root resource for all container levels when stitching - contained resources back together. - - - Server methods with @Include parameter would sometimes fail when no _include was actually - specified in query strings. - - - Client requests for IdentifierDt types (such as Patient.identifier) did not create the correct - query string if the system is null. - - - Add support for paging responses from RESTful servers. - - - Don't fail on narrative blocks in JSON resources with only an XML declaration but no content (these are - produced by the Health Intersections server) - - - Server now automatically compresses responses if the client indicates support - - - Server failed to support optional parameters when type is String and :exact qualifier is used - - - Read method in client correctly populated resource ID in returned object - - - Support added for deleted-entry by/name, by/email, and comment from Tombstones spec - - - - - - - - - - diff --git a/src/changes/changes.xsd b/src/changes/changes.xsd deleted file mode 100644 index 9478c44f0d8..00000000000 --- a/src/changes/changes.xsd +++ /dev/null @@ -1,263 +0,0 @@ - - - - - 1.0.0 - - Record every release with their subsequent changes. - - - - - - 1.0.0 - - Record every release with their subsequent changes. - - - - - - 1.0.0 - - Contains the properties of this document. - - - - - - 1.0.0 - - Contains the releases of this project with the actions taken - for each of the releases. - - - - - - - - 1.0.0 - - - - - 1.0.0 - The list of releases for this project. - - - - - - - 1.0.0 - A single release of this project. - - - - - 1.0.0 - The list of actions taken for this release. - - - - - - 1.0.0 - - The version number associated with this release. - - - - - - 1.0.0 - - - <p>The date of this release.</p> - <p>This field can be any String, such as "in SVN" when the version isn't yet released. </p> - - - - - - - 1.0.0 - - A short description of this release. - - - - - - - 1.0.0 - - A single action done on the project, during this release. - - - - - - 1.0.0 - A list of fix issues. - - - - - 1.0.0 - A list of contibutors for this issue. - - - - - - 1.0.0 - - - <p>Name of developer who committed the change.</p> - <p>This <b>MUST</b> be the name of the developer as described in the developers section of the pom.xml file.</p> - - - - - - - 1.0.0 - - Name of the person to be credited for this change. This can be used when a patch is submitted by a non-committer. - - - - - - 1.0.0 - - Email of the person to be credited for this change. - - - - - - 1.0.0 - - - <p>Id of the issue related to this change. This is the id in your issue tracking system.</p> - <p>The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplate parameter.</p> - <p>See the <a href="changes-report.html">changes-report mojo</a> for more details.</p> - - - - - - - 1.0.0 - - - Supported action types are the following: - <ul> - <li>add : added functionnality to the project.</li> - <li>fix : bug fix for the project.</li> - <li>update : updated some part of the project.</li> - <li>remove : removed some functionnality from the project.</li> - </ul> - - - - - - - 1.0.0 - - - <p>Id of issue tracking system. If empty 'default' value will be use.</p> - <p>The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplatePerSystem parameter.</p> - <p>See the <a href="changes-report.html">changes-report mojo</a> for more details.</p> - - - - - - - 1.0.0 - fix date - - - - - - 1.0.0 - - A fixed issue. - - - - - 1.0.0 - - - <p>Id of the issue related to this change. This is the id in your issue tracking system.</p> - <p>The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplate parameter.</p> - <p>See the <a href="changes-report.html">changes-report mojo</a> for more details.</p> - - - - - - - - 1.0.0 - - Name and Email of the person to be credited for this change. This can be used when a patch is submitted by a non-committer. - - - - - 1.0.0 - Name of the person to be credited for this change. - - - - - 1.0.0 - Email of the person to be credited for this change. - - - - - - 1.0.0 - - - - - 1.0.0 - Page Title. - - - - - 1.0.0 - Page Author - - - - - - - 1.0.0 - - A description of the author page. - - - - - - 1.0.0 - - The page author email. - - - - - \ No newline at end of file diff --git a/src/checkstyle/checkstyle_config_nofixmes.xml b/src/checkstyle/checkstyle_config_nofixmes.xml new file mode 100644 index 00000000000..2fd2fc95aad --- /dev/null +++ b/src/checkstyle/checkstyle_config_nofixmes.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/site/fml/hapi-fhir-faq.fml b/src/site/fml/hapi-fhir-faq.fml deleted file mode 100644 index 36162c4b927..00000000000 --- a/src/site/fml/hapi-fhir-faq.fml +++ /dev/null @@ -1,102 +0,0 @@ - - - - Getting Help - - Where can I ask questions or get help? - -

    - Please see [this page](https://github.com/jamesagnew/hapi-fhir/wiki/Getting-Help) in the HAPI FHIR Wiki for information on getting help. -

    -
    -
    -
    - - Using HAPI - - - What JDK version does HAPI support? - - -

    - HAPI supports JDK 1.6 for the entire library, except for the CLI tool which is 1.8. -

    -

    - Note that the HAPI library itself also requires a 1.8 JDK to build, since the unit tests - have JDK 1.8 dependencies. -

    -
    -
    -
    - - JPA Server - - - I would like to connect to the Derby database using a JDBC database browser (e.g. Squirrel, Toad, DBVisualizer) - so that I can access the underlying tables. How do I do that? - - -

    - By default Derby doesn't actually open any TCP ports for you to connect externally to it. - Being an embedded database, it works a bit differently than other databases in that the - client actually is the database and there's no outside communication with it possible. -

    -

    - There are a few options available to work around this fact: -

      -
    • - The easiest thing is to just load your data using the FHIR API. E.g. you can - use HTTP/REST creates, transactions, etc to load data into your database directly. -
    • -
    • - If you want to access the underlying database, the next easiest thing is to configure - the database to use a filesystem directory, e.g. - "jdbc:derby:directory:target/jpaserver_derby_files;create=true". You can - then shut the server down and use that same URL to connect a derby client (e.g. - Squirrel or DBVisualizer) to the same path. You may need to use a fully qualified - path instead of a relative one though. -
    • -
    • - Another option is to use a different database (e.g. MySQL, Postgres, Oracle, etc.). - HAPI's JPA server is based on JPA/Hibernate so it will support any database platform - that hibernate supports. -
    • -
    • - A final option is to start up Derby in network mode. Doing this is a bit more - involved since you need to start the derby server separately, and then use a special - URL to connect to it. You can find an example of how to start network Derby - here - and - an example of setting up a datasource - here. -
    • -
    -

    -
    -
    -
    - - Contributing - - - My build is failing with the following error: - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project hapi-fhir-jpaserver-base: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? - - -

    - This typically means that your build is running out of memory. HAPI's unit tests execute by - default in multiple threads (the thread count is determined by the number of CPU cores available) - so in an environment with lots of cores but not enough RAM, you may run out. If you are getting - this error, try executing the build with the following arguments: -

    -
    mvn -P ALLMODULES,NOPARALLEL install
    -

    - See Hacking HAPI FHIR for more information on - the build process. -

    -
    -
    -
    -
    diff --git a/src/site/imgsources/hapi-1.1-structs-datatypes.xml b/src/site/imgsources/hapi-1.1-structs-datatypes.xml deleted file mode 100644 index 04e57051bef..00000000000 --- a/src/site/imgsources/hapi-1.1-structs-datatypes.xml +++ /dev/null @@ -1,2 +0,0 @@ - -7VhRb9owEP41PDaCpAnwWKC0L5sqMWnbo5s4iVXHRo5TYL++5+RMAgEadcCEtBeU+2Jf7O++O5/pedNs/aTIMv0mI8p7bj9a97xZz3UDdwC/BthUwL03rIBEsaiCcIQBFuwPRbCPaMEimu8M1FJyzZa7YCiFoKHewWLJ8RPobEkS674GFiHhbfQni3RaoSM3qPFnypLUfmYQjKs3ud5YHxGNScH1XQnBO/M6I9ZXuRDvEQhTUoIb85Stp5Qb0iwhHvViL/Djse+Ho8EwvKuWP+86fLsNRQUu9a9dIoPvhBe40YVWTCQz3WJglTJNF0sSGnsFquh5k1RnHKwBPMZS6AWOLm3G+VRyqcrZ3ng8n4/HgHfYBG70nSpNUXAlhJt6ojKjWm1giH07xH2gGgc+2qs63AMPsbQRaqsggqpLtq5rFuEBiexKql1/TWpInCIVTpwy5WQmlxzDgWIZ0+ydOl/l/CpcWvszLu8vwiWmWkugPzZLeksS9YIOErUUXl6iXotWqRIn5cNKo0zkmoiQGplWev0661dh85BID7F5GZHiQdJg87nIiPhOMnrbhdT9t4UUe4rPCmmU68J1QpktZQ7UAhRwWNfkVcFTYp5OhaNB/aHIXIXmrjXWhuO8NI+Oy/eWS+xB8V6vxGIP2b3Efpn0q5DZtcJeRKI2Qg1OaAQ9PppS6VQmUhD+WKMTJQsRUeOyv8sXXTP9y8COj9ZvHERF9KCUXIEZMZJJAbMNOAcZ28nCXmegz0PBN2xOXimfSBVRZXUvpDDL6R6lXBaqDPWpw0YTldCjjtCTIelktBXlxLSgOxelQ6HDqS+Sweq3KnFtkbIqsRcK66JaJc6qBQAkE/N5O2xpBuQtiWwX2kk1PiXxKPCGw6HrD4gfb0VfZ2BLRXlKoKPxZmGh+GaiSPhmOD14EDQEVCvrYl24TS3b4Fi7kX42KZrZNzpD9rV4bPfgL/bq0j5qZ0QTDW0iRHP/VYt9IMPgDWZzreQb3cuc5iGCEOEsEWCqausTwyyDG/8D4hmLorIIHIqkhNExL7M8hXEUJlwkiPtNqrUbMbTxOneP2ophu+G/2VzYEvRJLowvweN9i8ep7Tv/58KJIO7HMPDb7UT/WsmA94oj3QTSepX24VxNAbbwp5sCrAHnawqOBADM+m/Q6iCv/0T2Hj8A \ No newline at end of file diff --git a/src/site/imgsources/hapi-1.1-structs-resource.xml b/src/site/imgsources/hapi-1.1-structs-resource.xml deleted file mode 100644 index 86ab1ae797d..00000000000 --- a/src/site/imgsources/hapi-1.1-structs-resource.xml +++ /dev/null @@ -1,2 +0,0 @@ - -3Vnfb6M4EP5rIt09LApQ8uOxpM1upTupak+6u0cXDFh1cGScbXN//Y7xODhAu+k2Ie29RPjzD+xvvvHMkFG4WD1/lWRd/ClSykfBOH0ehVejIJgEPvxqYGuAi3BqgFyy1EA4QgP37D+K4BjRDUtptTdQCcEVW++DiShLmqg9LBMcX4GLrUlul2+A+4TwLvo3S1Vh0FkwafBvlOWFfY0/mZueSm3tGinNyIarLzUEfbp7Rexa9UbCayBMCgHL6KfV84JyTZolJKRhFk6ibB5FycyfJl/M9peHDt8dQ9ISt/reJWdmye+Eb/CcNzGp6B2txEYmtMPCU8EUvV8T6AqvnkAZozAu1IpDy4fHTJTqHkfXbcb5QnAh69nh1cW1v4wAx7dSqSgK6pCz1WPwYF+pWFEltzAHVwgmqAZUZITNp8bi/gVihWNtKyKCwst3KzdEwgNyeSCvqB+HVyFzr+BTLyuY9FhZKVIm1NMi0q7lkTXz3k+9cTNftysYycr8D5rpcwJvFomFUmK1j90hHQ70l4AX1MAQxpoeaCyLHdVY9k5yvaAxw/i3b5e3N7+PggmHTcQPEp5y/fSZnMO3BCPffp93hEN5Bwi0TXhCvE1RGu8wHqFfqp3iVx1iEBr7dNtH42l0i2HI1e1luXWle/fZhRu2Lope4Q52rfvhL93re0Y5v4o7nJ739r3ocEJTSN+wKaQqRC5Kwq8bNJZiU6ZULzne54s+M/WPhj2tSN36FwcBW3JruoK6T7d1Zz2tTC+lFE/QfOAieTTQEoS+m22T2Dq6mi3rfb7RKHBOo4PXQ5EiMqcvLVQnF13rSsqJYt/3d3RcU0WDm2r6cU2Ft+8HNRXWNs5NdQuv1EceLKOZz5fL+XygUNyb7w+X0WD1+7OMJq3UJvAkBgNvZ5IW7w7HfSYYhM/zpjbdwtSR7xBZzUnF247A5y1W/TdXqy/p9gMkM+ctJa19Th8h3xYE218HOHmgPBYypdJqvhSl3szJwiUGpFfDpSkM3xEvceqtYPVNYb822HvLasSmWXYJsymc1ZgfKCb69XbYWg+oOgLZbfQgzUSUZLNJOJ1Og8gnUWbZc7yvo6GqIGv9mGwk38aSJI+awt7Y4Min0dXJ6mHrRPYrcNf3rEe4rufPjuB7HR671XBTdLWDxU2pqMyAOGNNl2ugR49weKyUFI+05SduuECIcJaX0JTmpLHmmsFX6EvEVyxNa4fvs5uA0RmvPbqAcRQmnMRk7drPuoJjMmudY9+WHYt1q+lPq/xDpX8S5WMF3av88Q1Gb3hccFJVWvI/zZ3+507QNp51CjdnGA/lBVg6vJAyIK0D5Agni/yYy78e+eu74PiVMjSbf+RMtG7+zwyvfwA= \ No newline at end of file diff --git a/src/site/imgsources/hapi-usage.vsdx b/src/site/imgsources/hapi-usage.vsdx deleted file mode 100644 index bb803636c11..00000000000 Binary files a/src/site/imgsources/hapi-usage.vsdx and /dev/null differ diff --git a/src/site/imgsources/hapi_banner.xcf b/src/site/imgsources/hapi_banner.xcf deleted file mode 100644 index 9152a8c9dfa..00000000000 Binary files a/src/site/imgsources/hapi_banner.xcf and /dev/null differ diff --git a/src/site/imgsources/hapi_fhir_banner.xcf b/src/site/imgsources/hapi_fhir_banner.xcf deleted file mode 100644 index c44258c7335..00000000000 Binary files a/src/site/imgsources/hapi_fhir_banner.xcf and /dev/null differ diff --git a/src/site/imgsources/hapi_fhir_banner_right.xcf b/src/site/imgsources/hapi_fhir_banner_right.xcf deleted file mode 100644 index 7ec063120e0..00000000000 Binary files a/src/site/imgsources/hapi_fhir_banner_right.xcf and /dev/null differ diff --git a/src/site/imgsources/hapi_hoh_banner.xcf b/src/site/imgsources/hapi_hoh_banner.xcf deleted file mode 100644 index d6c4d3b1961..00000000000 Binary files a/src/site/imgsources/hapi_hoh_banner.xcf and /dev/null differ diff --git a/src/site/imgsources/hapi_testpanel_banner.xcf b/src/site/imgsources/hapi_testpanel_banner.xcf deleted file mode 100644 index c665ce02cec..00000000000 Binary files a/src/site/imgsources/hapi_testpanel_banner.xcf and /dev/null differ diff --git a/src/site/imgsources/restful-server-interceptors-exception.xml b/src/site/imgsources/restful-server-interceptors-exception.xml deleted file mode 100644 index d322c998c99..00000000000 --- a/src/site/imgsources/restful-server-interceptors-exception.xml +++ /dev/null @@ -1 +0,0 @@ -3VlNb9s4EP01PsaQTH/pWCd2d4EWCOoFdvfIWJRFlBa1FJU4/fUdWkN9UbEVR2m79cEwh+SIfPPmcUSPyO3h+FHRNP4sQyZGEy88jsjdaDKZz2fwbQzPhWE69QvDXvGwMNUMW/6NodFDa85DljUGaimF5mnTuJNJwna6YYukaD4ipXvrvjJsd1S41r95qOPCupzMK/sfjO9j+xh/HhQ9mX62PkIW0Vzom5MJ+kz3gVpfp12RNQCmpAQ35tfheMuEAc0CUmx980JvuUjFElzI+Qm4iEcqclzjl/X2ryiHMbAxcqQjstoy9ciUs5kspqn5mR/EJx4xwRNorVKm+IFpGE/uBJrvK9sqK6I4nZvfWsmv7FYKaUbD4zz4bGCp2GNxBlRWEReiNjIINvBxd4sAwHo1Q5qdTLj7j0zCQtQzDLG9MyQTchDx8p6qGPse2uJafMkCjRS5ti9dV3DDD0S8G33ioP9nAjDtWKpho78n4JPllYDPBwB86tKdZTIHxGHmvaA8qfH+XslHEBgIRGn6zHQsw980MlML+8+IzMKJjIMyTABlN8havDNNld5qqo2xBYsBEFbbAW0UYc8AmFkVQMgst2uQkS7EBgBs2aEdO3ngyR6sX9h/Ocu0C2EIZxo2mXiQT+vKsDoZoCOWin+Tiabw6JWBgsMp+EHwfQKdD1JreTCjk/CDUqcJMmXQZSx4Ri/Pwg5oq+d/wOiNZ7b576lJbLOWJneIVUeYMHPr/DEbfEPcugKCPu4lh8dXMtZKlgBrGesBmLlnGie1oloup1egS1LWRQvD6/HMUIsmoWCuLCmZJyHYyZ0PwD7FXLNtSk+IPUFBNgD9SdBEoTxN65phdWToDOgoXs4SPpEnWabIZMEiWMwZNs6JUdsOPoLxyHVtDrQaU6Ddj8EX6XpJe0ujYoJq/tgsVq+nsz/1xv4sqD6YX9ZjkXoOvR2/01Z5dcnvgGnjnvVDEN6S2Z6RAXqtBaqL71af3sR3lJjajorMXx9NxcglFC/X6L2V+J5q/yDk7uuZHJgujPy7OdDKvJdiUTCgGcO+qg794wWiVAVobIG7Ph2MF1zLhQy4hqn4ClmLq2I6VxBOTytjwkrlPQIb0iwuj4hLZ3qvk/iXCRrx8Q38HcTlqnLVgHl1sdorea4uXIndwA+oXDtKV3gLS2UCYJ3juVTw8rWXCRUNsrvKVHLa4GYa91SDChn0ABRveqYIKLKgLAGssnXpXDAzjrp0Dpa0gfiiu+YLXGWpBXmzOQW5lyS+stCFVXveJAiWE8/3FgFpJtqNj1cQP6vOIGQx9ur1QCvr+9YZ8/Y1jr1bvJD7jqMbJGcJEOaF9SOjKINYvFE+UJheJx87IXNw0FHIk1WsD5ZvQ1yKtfS4jH6NJhbwodXB+qhho2OT38D5969zhjkO+yYnmTlHn78gQ9Qrtv1a+rfrdcfRcGUPcd9rX+BpB8b9C3TLpx9QoMPLX3tHqWJwjbhjWfb/LdJbbG6eRzaK/SPUVe8RbwjSgxe4Da0+KOXvQF334r6s2JPcTLuyYu939fYqkaoYAAhXFKhOCie89WL+VwrvbKi7AmhW/7AVw6v/J8n6Ow== \ No newline at end of file diff --git a/src/site/imgsources/restful-server-interceptors.xml b/src/site/imgsources/restful-server-interceptors.xml deleted file mode 100644 index 530869baeba..00000000000 --- a/src/site/imgsources/restful-server-interceptors.xml +++ /dev/null @@ -1 +0,0 @@ -3Vpdb+I6E/41vdwq4JDC5dKW7SudldBS6Zxz6RIHrDUxr2P6sb9+x2RMPuzQFALLKReIjJ2J/cwzj8cOV+R29fpN0fXyu4yZuOoH8esVubvq96NoAN/G8JYbwrCXGxaKx7mpZJjxXwyNAVo3PGZZpaOWUmi+rhrnMk3ZXFdsiRTVR6zpwrovDLM5Fa71bx7rZW4d9qPC/sD4Ymkf04tGeUum36yPmCV0I/SXrQnaTPOKWl/bWZF7AExJCW7Mr9XrLRMGNAtIPvVJQ+tukIqlOJD9N+AgnqnY4Bh/3M8ekw30gYmRV3pFxjOmnplyJpMt6dr83KzEXzxhgqdwNV4zxVdMQ39yJ9A8LWzjLI9iGJnfWsmf7FYKaXrD4wL4TGCo2GJxBlTGCRei1HM0msDHnS0CAOPVDGm2NeHsvzEJA1Fv0MW2DpBMyEHEK3gpYtwL0LYsxTccopEi1xY71wXc8AMR96NPHPT/lwJMc7bWMNHPCXjfAvcnAA9durNMbgBxuHMqKE9LvJ8q+QwCA4HYmb4zvZTxJ41MaGH/aGRGHUTmxomMgzLcAMpukLV4Z5oqPdNUG2MNFgMgjNYDbZJgSweY3VQhsxwtQUY8iFnbMYANHcAeHh+nYPnB/r9hmXbhi2E9w0smnuTLfWEYbw3QsJSK/5KppvDYsYGBwwr4VfBFCo1PUmu5Mr3T+KtS2xvkmkGTseD6PNwLOSCt3v4BY3A9sJf/bi+JvSylyB3i5AkRZm2ZO2aCR8TMFwz0MZUcHl9IWC1RRljHWA/AygXTeFMtorvhtAqyrXSctDiKtMRmNo6/Zx9Toq3tUqatBfoY2vbsaIsZ8XQuVzxdIHGnioHyzlmWMVdpW5HY8rYlhZ+EnP80pleuS9SEq5yZ4Y3htLmuUpOMKXoVLMF888QlZ0M1nm2pCu3XN8iuIljX/RrhPk5Z4wVWjuKDcmI95unVCYXdElMxvVGw0gZaGRPq8CmiHNNsCSwid70WqtVKay4ngqSWjR2qjq9MwkUl4JnZUQmaZTzhngxVcpPGO8xfllyz2Zpu4XuBXWAXJXtYQyLyFCo+/epi2e1h4E6ryL7a62SKjDvYPYosjSp/VknGgB6R0BCaDhLaeDmTJLvF9n9aki8mguHJJHknKY2SvKRpLP6IHhO7/0MYiC2wz6HHnhOsvdxN5XZvXpGJfduSiJgtt2dj0ixOeIsjTk1Iv8vb9zbgO6Nigmr+XD2xPJzPJCLXvUFJkWr0blAkx29YO2N7z2+HaeOesB3CjoZAD2Hp9K9CzXzCe3x8KinjxVOlHtIwGF4HN6WQHsaUOgPfcdshUdyS9wRlXUhwjTlDWWeXs9KM5EYvACso67K1TOEk7ZOVcjaIRxQCEKEOCgHjBcfSffVm3zh9kurtcoIWYcqfQF0OOt02YB58tt0qeQ4+5w4jXFjPcNC976S7hY5JBa9sFjKlosJ5V6B21LZr8ZRqECMDImAThHuqxjwZdmu8FTif3I0GxpG/ZognEGZ0V33tU1hKsZ5MtrFulWQesfzgqTmULhUKfMHLc1Ucg3rFYRfOj9YYUb0arTtqyPvCke0okyQDOI/UBqxp9mkDKEK85arhQUPqejjQui4h9sTvDHUJafMC4KFhM3vKAqWW3B7Ma6nyEcRh2vVVi/SiDlYt8HJYGrgcqDnqbvmD/XBDxXIxpUrH0XZrFEixLqJt/yHVWquaol131F19St59ewBA+g6SW51UHaV79TcHsBac7KQKLou/ceUwFn+CI/e/AQ== \ No newline at end of file diff --git a/src/site/imgsources/what_are_these.txt b/src/site/imgsources/what_are_these.txt deleted file mode 100644 index 236ddd9361e..00000000000 --- a/src/site/imgsources/what_are_these.txt +++ /dev/null @@ -1,4 +0,0 @@ -In this directory: - -* XCF files are opened in The GIMP -* XML files are opened in draw.io diff --git a/src/site/imgsources/who_uses_hapi.xcf b/src/site/imgsources/who_uses_hapi.xcf deleted file mode 100644 index e11ffc1de15..00000000000 Binary files a/src/site/imgsources/who_uses_hapi.xcf and /dev/null differ diff --git a/src/site/markdown/doc_jdk9_guide.md b/src/site/markdown/doc_jdk9_guide.md deleted file mode 100644 index 7e5994d2f13..00000000000 --- a/src/site/markdown/doc_jdk9_guide.md +++ /dev/null @@ -1,3 +0,0 @@ -# Using HAPI FHIR with JDK9 / JDK10+ - - diff --git a/src/site/markdown/doc_vagrant.md b/src/site/markdown/doc_vagrant.md deleted file mode 100644 index cdf2e9ee8d6..00000000000 --- a/src/site/markdown/doc_vagrant.md +++ /dev/null @@ -1,54 +0,0 @@ -Creating your own demo server with Vagrant -======== -This source code repository includes configuration files to materialize an _entire_ server implementation off all project build artifacts in a single virtual machine (VM) image from scratch, allowing you to quickly bootstrap your own local copy of the project. The server will be completely encapsulated within the created VM image. The process _should_ run on OSX, Linux and Windows, but YMMV. The built-in settings support creation of a *VirtualBox*-based image on Ubuntu Linux, though with tuning of the base image you should be able to create images suitable for other hypervisors and cloud-based IaaS providers such as VMware and Amazon Web Services (AWS), respectively. - -Dependencies ----- - -Prior to running, please ensure you have all .war files built, and the following installed and functioning propertly. - - * All normal Java development dependencies. (Java SDK and Maven 3, specifically.) - * VirtualBox - * Vagrant - - -Creating Your VM ----- - - cd hapi-fhir-root/ - mvn install # Creates web application .war files. Make sure they're built before proceeding! - cd vagrant - vagrant up # Will take a few minutes to boot up. - -Your new server environment should now be running in a headless virtual machine on your local computer. The following step are performed automatically for you within the VM sandbox environment: - - * A complete Ubuntu 14.04 Server VM is launched in headless mode, bridged to whatever host network interface you've selected. - * An IPv4 address is assigned via DHCP. - * MySQL Server (Community Edition) is installed from the official 10gen repository. (See the [Vagrantfile](https://github.com/preston/hapi-fhir/blob/master/vagrant/Vagrantfile) for the default root password.) - * Oracle Java 8 is installed. - * Tomcat 7 is installed and configured as a system service. - * All compiled *.war applications are deployed automatically and started. - * A "fhir" user is added to tomcat-users.xml. See [fhir.json](https://github.com/preston/hapi-fhir/blob/master/vagrant/chef/data_bags/tomcat_users/fhir.json) for the default password. - -Tomcat will now be running on the VM on port 8080 with the management GUI available. For example, you can now visit: - - * *Tomcat Manager*: assigned_ip:8080/manager/html - * *HAPI FHIR* JPA Server: assigned_ip:8080/hapi-fhir-jpaserver/ - -Screenshots ----- -![Tomcat Manager](https://raw.githubusercontent.com/preston/hapi-fhir/master/vagrant/screenshots/tomcat.png) - -![Demo Server](https://raw.githubusercontent.com/preston/hapi-fhir/master/vagrant/screenshots/hapi-fhir-jpaserver.png) - -Advanced Configuration ----- -The Vagrant documentation is the best place to start, but a few more commands of note are: - - vagrant ssh # Command-line access to the VM. - vagrant destoy # Shuts down and completely destroys the VM. - - -Credits ----- -Vagrant and Chef configuration by Preston Lee diff --git a/src/site/resources/CNAME b/src/site/resources/CNAME deleted file mode 100644 index 507c033b8e4..00000000000 --- a/src/site/resources/CNAME +++ /dev/null @@ -1 +0,0 @@ -hapifhir.io diff --git a/src/site/resources/css/bootstrap-responsive.min.css b/src/site/resources/css/bootstrap-responsive.min.css deleted file mode 100644 index 291c98f54b6..00000000000 --- a/src/site/resources/css/bootstrap-responsive.min.css +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * Bootstrap Responsive v2.3.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;} -.clearfix:after{clear:both;} -.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} -.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} -@-ms-viewport{width:device-width;}.hidden{display:none;visibility:hidden;} -.visible-phone{display:none !important;} -.visible-tablet{display:none !important;} -.hidden-desktop{display:none !important;} -.visible-desktop{display:inherit !important;} -@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}.visible-print{display:none !important;} -@media print{.visible-print{display:inherit !important;} .hidden-print{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .row-fluid [class*="offset"]:first-child{margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .controls-row [class*="span"]+[class*="span"]{margin-left:0;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade{top:-100px;} .modal.fade.in{top:20px;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px;} .media-object{margin-right:0;margin-left:0;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12,textarea.span12,.uneditable-input.span12{width:710px;} input.span11,textarea.span11,.uneditable-input.span11{width:648px;} input.span10,textarea.span10,.uneditable-input.span10{width:586px;} input.span9,textarea.span9,.uneditable-input.span9{width:524px;} input.span8,textarea.span8,.uneditable-input.span8{width:462px;} input.span7,textarea.span7,.uneditable-input.span7{width:400px;} input.span6,textarea.span6,.uneditable-input.span6{width:338px;} input.span5,textarea.span5,.uneditable-input.span5{width:276px;} input.span4,textarea.span4,.uneditable-input.span4{width:214px;} input.span3,textarea.span3,.uneditable-input.span3{width:152px;} input.span2,textarea.span2,.uneditable-input.span2{width:90px;} input.span1,textarea.span1,.uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12,textarea.span12,.uneditable-input.span12{width:1156px;} input.span11,textarea.span11,.uneditable-input.span11{width:1056px;} input.span10,textarea.span10,.uneditable-input.span10{width:956px;} input.span9,textarea.span9,.uneditable-input.span9{width:856px;} input.span8,textarea.span8,.uneditable-input.span8{width:756px;} input.span7,textarea.span7,.uneditable-input.span7{width:656px;} input.span6,textarea.span6,.uneditable-input.span6{width:556px;} input.span5,textarea.span5,.uneditable-input.span5{width:456px;} input.span4,textarea.span4,.uneditable-input.span4{width:356px;} input.span3,textarea.span3,.uneditable-input.span3{width:256px;} input.span2,textarea.span2,.uneditable-input.span2{width:156px;} input.span1,textarea.span1,.uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#777777;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999999;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .open>.dropdown-menu{display:block;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111111;border-bottom-color:#111111;} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}} diff --git a/src/site/resources/hapi.css b/src/site/resources/hapi.css deleted file mode 100644 index 63fcf963adf..00000000000 --- a/src/site/resources/hapi.css +++ /dev/null @@ -1,232 +0,0 @@ -/* -#bodyColumn { - width: 78.5% !important; -} - -#breadcrumbs { - background: white; - padding: 0px; - height: 40px; -} - -#search-form { - width: 140px; -} - -#navcolumn { - background-color: white !important; -} - -#leftColumn { - border: none !important; - width: 19% !important; - margin: 0px; -} - -#navcolumn h5 { - color: #806020; - background-color: #FFF0C0; - border-bottom: 1px solid #E3701A; -} - -#navcolumn li.expanded { - background: url("") !important; -} - -.nobr { - white-space: nowrap; -} - -.section { - padding: 0px; -} - -*/ - -.doc_info_bubble { - border: 1px dashed #808080; - border-radius: 6px; - padding: 8px; - margin: 8px; - background: #EEE; -} - -TABLE.pagenavlinks { - border: 0px; -} -A.pagenavlinks { - background: #CCC; - border-style: solid; - border-width: 1px; - border-color: #888; - border-radius: 7px; - padding: 7px; -} - -.navbar .brand { - color: #FF8; -} - -.well { - padding: 5px; -} - -.nav-list { - padding-right: 0px; - font-size: 12px; -} - -.nav-list LI { - line-height: 15px; -} - -/* -.nav-list .divider { - display: none; -} -*/ - -@media (min-width: 980px) { /* 768 980 */ - body { - padding-top: 40px; - } -} - -body { - padding-bottom: 10px; -} - -pre { - padding: 3px; - margin: 0 0 10px; - font-size: 0.8em; - line-height: 1.0em; -} - -.page-header { - padding-bottom: 2px; - margin: 0px 0 0px; - border-bottom: none; -} -h1[id]:before, -h2[id]:before, -h3[id]:before, -h4[id]:before, -h5[id]:before, -h6[id]:before, -a[name]:before { - height: auto; - margin: auto; -} - -DIV.main-body DIV.row DIV.span8 DIV.body-content { - top: -8px; - position: relative; -} - -.section h2 { - border-bottom: 2px solid #CF4711; - background-color: #FF7741; - color: #FFA; - font-size: 1.5em; - line-height: 1.4em; - border-radius: 6px; - padding-left: 5px; - padding-right: 5px; -} - -.section h3 { - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #993300; - width: 66%; - background-image: url('images/littlehapiface.png'); - background-repeat: no-repeat; - padding-left: 25px; - font-size: 1.3em; - line-height: 1.3em; -} - -.syntaxhighlighter { - font-size: 0.85em !important; -} - -.syntaxhighlighter .line.alt1, -.syntaxhighlighter .line.alt2 -{ - background-color: #F8F8F8 !important; -} - -.syntaxhighlighter .code .container:before { - display: block; -} - -.table th, .table td { - padding: 2px; -} - -tt { - white-space: pre; - color: #846; - margin-bottom: 5px; - margin-top: 10px; - padding: 2px; - border: 1px solid #AAA; - background-color: #F0F0F0; -} - -h1,h2,h3,h4,h5 { - color: #E3701A; - font-weight: bold; -} - -h4 { - font-size: 1.2em; - padding: 0px; - margin-bottom: 0px; - margin-top: 20px; -} - -li.expanded ul { - border-left: 2px solid #C0FFC0; - margin: 0px 0px 4px 0px !important; -} - -li.expanded ul li { - padding-left: 2px !important; -} - -dfn { - color: #008000; - background-color: #E0FFE0; - border-bottom: 1px dotted #40A040; -} - -/* -a,a.externalLink,a:active,a:hover,a:link,a:visited { - color: #993300; -} - -DIV.sidebar-nav UL LI UL LI { - font-size: 0.9em; -} -*/ - -.pull-left { - float: left; - display: inline-block; -} - -.pull-right { - float: right; - display: inline-block; -} - -.span12 { - width: 100%; -} - -.container-fluid { - padding-right: 0px; - padding-left: 0px; -} diff --git a/src/site/resources/images/favicon.png b/src/site/resources/images/favicon.png deleted file mode 100644 index f96cc5a3e6a..00000000000 Binary files a/src/site/resources/images/favicon.png and /dev/null differ diff --git a/src/site/resources/images/github-logo-mini.png b/src/site/resources/images/github-logo-mini.png deleted file mode 100644 index 815160af4cb..00000000000 Binary files a/src/site/resources/images/github-logo-mini.png and /dev/null differ diff --git a/src/site/resources/images/hacking_import.png b/src/site/resources/images/hacking_import.png deleted file mode 100644 index 1ec8496616f..00000000000 Binary files a/src/site/resources/images/hacking_import.png and /dev/null differ diff --git a/src/site/resources/images/hacking_import_step2.png b/src/site/resources/images/hacking_import_step2.png deleted file mode 100644 index 71c52ea430c..00000000000 Binary files a/src/site/resources/images/hacking_import_step2.png and /dev/null differ diff --git a/src/site/resources/images/hapi-1.1-structs-datatypes.svg b/src/site/resources/images/hapi-1.1-structs-datatypes.svg deleted file mode 100644 index 8ae16122ad2..00000000000 --- a/src/site/resources/images/hapi-1.1-structs-datatypes.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    StringDt
    [Not supported by viewer]
    ca.uhn.fhir.model. primitive.StringDt
    [Not supported by viewer]
    StringType
    [Not supported by viewer]
    org.hl7.fhir.dstu3. model.StringType
    [Not supported by viewer]
    HumanNameDt
    [Not supported by viewer]
    ca.uhn.fhir.model. dstu2.composite.
    HumanNameDt
    [Not supported by viewer]
    HumanName
    [Not supported by viewer]
    org.hl7.fhir.dstu3. model.HumanName
    [Not supported by viewer]
    Primitive
    Datatypes
    [Not supported by viewer]
    Composite
    Datatypes
    [Not supported by viewer]
    diff --git a/src/site/resources/images/hapi-1.1-structs-resource.svg b/src/site/resources/images/hapi-1.1-structs-resource.svg deleted file mode 100644 index a737fe63e9f..00000000000 --- a/src/site/resources/images/hapi-1.1-structs-resource.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    IBaseResource
    [Not supported by viewer]
    org.hl7.fhir.instance. model.api.IBaseResource
    [Not supported by viewer]
    IResource (HAPI)
    [Not supported by viewer]
    ca.uhn.fhir.model. api.IResource
    [Not supported by viewer]
    IAnyResource (RI)
    [Not supported by viewer]
    org.hl7.fhir.instance. model.api.IAnyResource
    [Not supported by viewer]
    Patient (HAPI)
    [Not supported by viewer]
    ca.uhn.fhir.model. dstu2.resource.Patient
    [Not supported by viewer]
    Patient (RI)
    [Not supported by viewer]
    org.hl7.fhir.dstu3. model.Patient
    [Not supported by viewer]
    Resource
    Interfaces
    [Not supported by viewer]
    Resource Instance Classes
    [Not supported by viewer]
    diff --git a/src/site/resources/images/hapi-fhir-cli-run-server.png b/src/site/resources/images/hapi-fhir-cli-run-server.png deleted file mode 100644 index a84018df579..00000000000 Binary files a/src/site/resources/images/hapi-fhir-cli-run-server.png and /dev/null differ diff --git a/src/site/resources/images/hapi-fhir-cli.png b/src/site/resources/images/hapi-fhir-cli.png deleted file mode 100644 index d503f80ed09..00000000000 Binary files a/src/site/resources/images/hapi-fhir-cli.png and /dev/null differ diff --git a/src/site/resources/images/hapi-usage.png b/src/site/resources/images/hapi-usage.png deleted file mode 100644 index b6109c12694..00000000000 Binary files a/src/site/resources/images/hapi-usage.png and /dev/null differ diff --git a/src/site/resources/images/hapi_authorizationinterceptor_read_normal.svg b/src/site/resources/images/hapi_authorizationinterceptor_read_normal.svg deleted file mode 100644 index 5a4bac103c1..00000000000 --- a/src/site/resources/images/hapi_authorizationinterceptor_read_normal.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    RestfulServer
    RestfulServer
    Authorization
    Interceptor
    [Not supported by viewer]
    ResourceProvider
    (user code)
    ResourceProvider<div>(user code)</div>
    read/search/etc
    read/search/etc
    authorize?
    authorize?
    invoke
    invoke
    return
    return
    200 OK
    200 OK
    authorize?
    authorize?
    invoke
    invoke
    return
    return
    Successful
    Read
    [Not supported by viewer]
    Denied
    Read
    [Not supported by viewer]
    Return value is 
    checked before
    actually returning
    [Not supported by viewer]
    Client
    Client
    read/search/etc
    read/search/etc
    403 FORBIDDEN
    403 FORBIDDEN
    \ No newline at end of file diff --git a/src/site/resources/images/hapi_authorizationinterceptor_write_normal.svg b/src/site/resources/images/hapi_authorizationinterceptor_write_normal.svg deleted file mode 100644 index cb9aee69a3d..00000000000 --- a/src/site/resources/images/hapi_authorizationinterceptor_write_normal.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    RestfulServer
    RestfulServer
    Client
    Client
    write
    write
    Authorization
    Interceptor
    [Not supported by viewer]
    authorize?
    authorize?
    ResourceProvider
    (user code)
    ResourceProvider<div>(user code)</div>
    return
    return
    authorize?
    authorize?
    invoke
    invoke
    return
    return
    200 OK
    200 OK
    write
    write
    403 FORBIDDEN
    403 FORBIDDEN
    Successful
    Write
    [Not supported by viewer]
    Denied
    Write
    [Not supported by viewer]
    Operation is checked
    before passing
    to ResourceProvider
    [Not supported by viewer]
    \ No newline at end of file diff --git a/src/site/resources/images/hapi_fhir_banner.png b/src/site/resources/images/hapi_fhir_banner.png deleted file mode 100644 index c264336271e..00000000000 Binary files a/src/site/resources/images/hapi_fhir_banner.png and /dev/null differ diff --git a/src/site/resources/images/hapi_fhir_banner_right.png b/src/site/resources/images/hapi_fhir_banner_right.png deleted file mode 100644 index f40e438546a..00000000000 Binary files a/src/site/resources/images/hapi_fhir_banner_right.png and /dev/null differ diff --git a/src/site/resources/images/jpa_architecture.png b/src/site/resources/images/jpa_architecture.png deleted file mode 100644 index 9e82adfc7c1..00000000000 Binary files a/src/site/resources/images/jpa_architecture.png and /dev/null differ diff --git a/src/site/resources/images/littlehapiface.png b/src/site/resources/images/littlehapiface.png deleted file mode 100644 index 4215aecdf96..00000000000 Binary files a/src/site/resources/images/littlehapiface.png and /dev/null differ diff --git a/src/site/resources/images/littlehapiface2020.png b/src/site/resources/images/littlehapiface2020.png deleted file mode 100644 index e9f02033c3b..00000000000 Binary files a/src/site/resources/images/littlehapiface2020.png and /dev/null differ diff --git a/src/site/resources/images/logos/maven-feather.png b/src/site/resources/images/logos/maven-feather.png deleted file mode 100644 index b5ada836e9e..00000000000 Binary files a/src/site/resources/images/logos/maven-feather.png and /dev/null differ diff --git a/src/site/resources/images/maven-logo-mini.png b/src/site/resources/images/maven-logo-mini.png deleted file mode 100644 index aa47bd5226e..00000000000 Binary files a/src/site/resources/images/maven-logo-mini.png and /dev/null differ diff --git a/src/site/resources/svg/hapi-fhir-logging-complete.svg b/src/site/resources/svg/hapi-fhir-logging-complete.svg deleted file mode 100644 index ae06998393d..00000000000 --- a/src/site/resources/svg/hapi-fhir-logging-complete.svg +++ /dev/null @@ -1 +0,0 @@ -hapi-fhir
    slf4j-api
    [Not supported by viewer]
    commons-httpclient
    jcl-over-slf4j
    [Not supported by viewer]
    Underlying LoggingFramework(logback, log4j, etc.)
    \ No newline at end of file diff --git a/src/site/resources/svg/hapi-fhir-logging.svg b/src/site/resources/svg/hapi-fhir-logging.svg deleted file mode 100644 index ff4bc79aa79..00000000000 --- a/src/site/resources/svg/hapi-fhir-logging.svg +++ /dev/null @@ -1 +0,0 @@ -hapi-fhir
    slf4j-api
    [Not supported by viewer]
    logback-classic
    [Not supported by viewer]
    slf4j-log4j
    [Not supported by viewer]
    log4j
    [Not supported by viewer]
    slf4j-jdk14
    [Not supported by viewer]
    JDK Logging
    (built in to Java)
    [Not supported by viewer]
    disk
    [Not supported by viewer]
    disk
    [Not supported by viewer]
    disk
    [Not supported by viewer]
    Chosen by
    searching
    classpath
    [Not supported by viewer]
    \ No newline at end of file diff --git a/src/site/resources/svg/hapi_usage_patterns.svg b/src/site/resources/svg/hapi_usage_patterns.svg deleted file mode 100644 index 730b07d8e95..00000000000 --- a/src/site/resources/svg/hapi_usage_patterns.svg +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - External FHIR Clients -
    -
    - [Not supported by viewer] -
    -
    - - - -
    - Your -
    -
    Application
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI FHIR -
    - Client -
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI -
    - Model -
    - Objects -
    - [Not supported by viewer] -
    -
    - - - - -
    - External -
    - FHIR -
    - Server -
    -
    - [Not supported by viewer] -
    -
    - - - -
    HTTP
    - [Not supported by viewer] -
    -
    - - - - -
    - Use the HAPI FHIR client in an application to fetch from or store - resources to an external server. -
    - Learn Mode -
    - [Not supported by viewer] -
    -
    - - - -
    - Your -
    -
    Application
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI -
    - Model -
    - Objects -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI FHIR -
    - Server -
    - [Not supported by viewer] -
    -
    - - - -
    HTTP
    - [Not supported by viewer] -
    -
    - - - - -
    - Use the HAPI FHIR server in an application to allow external - applications to access or modify your application's data. -
    - Learn More -
    -
    - [Not supported by viewer] -
    -
    - - - -
    - HAPI JPA Database Server -
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI FHIR Server -
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - JPA Persistence Module -
    -
    - [Not supported by viewer] -
    -
    - - - -
    - Your -
    -
    Application
    -
    - [Not supported by viewer] -
    -
    - - - -
    HTTP
    - [Not supported by viewer] -
    -
    - - - - -
    - Use the HAPI JPA/Database Server to deploy a fully functional FHIR - server you can develop applications against. -
    - Learn More -
    - [Not supported by viewer] -
    -
    - - - -
    - Your -
    -
    Application
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI -
    - Model -
    - Objects -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI FHIR -
    - Parser (Xml/Json) -
    -
    - [Not supported by viewer] -
    -
    - - - -

    - [Not supported by viewer] -
    -
    - - - -
    - Raw FHIR Resources -
    -
    - [Not supported by viewer] -
    -
    - - - - - - - -
    - HAPI FHIR -
    - Parser (Xml/Json) -
    -
    - [Not supported by viewer] -
    -
    - - - - - -
    - HAPI -
    - Model -
    - Objects -
    - [Not supported by viewer] -
    -
    - - - -

    - [Not supported by viewer] -
    -
    - - - - -
    - Use the HAPI FHIR parser and encoder to convert between FHIR and - your application's data model. -
    - Learn More -
    - [Not supported by viewer] -
    -
    - - - - -
    -
    diff --git a/src/site/resources/svg/restful-server-interceptors-exception.svg b/src/site/resources/svg/restful-server-interceptors-exception.svg deleted file mode 100644 index b6e67f3c7df..00000000000 --- a/src/site/resources/svg/restful-server-interceptors-exception.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -RESTfulServerInterceptorResource/PlainProviderMethodIncoming Request
    Request is handled
    [Not supported by viewer]
    handleExceptionreturn true;Responsethrow exceptionpreProcessExceptionreturn null;
    \ No newline at end of file diff --git a/src/site/resources/svg/restful-server-interceptors.svg b/src/site/resources/svg/restful-server-interceptors.svg deleted file mode 100644 index 0f874ea368a..00000000000 --- a/src/site/resources/svg/restful-server-interceptors.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -RESTfulServerInterceptorResource/PlainProviderMethodHTTP RequestincomingRequestPreProcessedreturn true;
    Request is classified
    [Not supported by viewer]
    incomingRequestPostProcessedreturn true;
    Request is handled
    [Not supported by viewer]
    outgoingResponsereturn true;HTTP ResponseincomingRequestPreHandledreturn;
    Request is parsed
    [Not supported by viewer]
    \ No newline at end of file diff --git a/src/site/resources/syntaxhighlighter/shAutoloader.js b/src/site/resources/syntaxhighlighter/shAutoloader.js deleted file mode 100644 index 4e29bddecbb..00000000000 --- a/src/site/resources/syntaxhighlighter/shAutoloader.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/g, - css: 'color2' }, - - { regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g, - css: 'keyword' }, - - { regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals - css: 'keyword' }, - - { regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g, - css: 'color3' }, - - { regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g, - css: 'color3' }, - - { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' }, - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, - { regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['applescript']; - - SyntaxHighlighter.brushes.AppleScript = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushBash.js b/src/site/resources/syntaxhighlighter/shBrushBash.js deleted file mode 100644 index 8c296969ff4..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushBash.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le'; - var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' + - 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' + - 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + - 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + - 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' + - 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + - 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + - 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' + - 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + - 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + - 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' + - 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + - 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + - 'vi watch wc whereis which who whoami Wget xargs yes' - ; - - this.regexList = [ - { regex: /^#!.*$/gm, css: 'preprocessor bold' }, - { regex: /\/[\w-\/]+/gm, css: 'plain' }, - { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords - { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands - ]; - } - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['bash', 'shell']; - - SyntaxHighlighter.brushes.Bash = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushCSharp.js b/src/site/resources/syntaxhighlighter/shBrushCSharp.js deleted file mode 100644 index 079214efe11..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushCSharp.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'abstract as base bool break byte case catch char checked class const ' + - 'continue decimal default delegate do double else enum event explicit ' + - 'extern false finally fixed float for foreach get goto if implicit in int ' + - 'interface internal is lock long namespace new null object operator out ' + - 'override params private protected public readonly ref return sbyte sealed set ' + - 'short sizeof stackalloc static string struct switch this throw true try ' + - 'typeof uint ulong unchecked unsafe ushort using virtual void while'; - - function fixComments(match, regexInfo) - { - var css = (match[0].indexOf("///") == 0) - ? 'color1' - : 'comments' - ; - - return [new SyntaxHighlighter.Match(match[0], match.index, css)]; - } - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword - { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial' - { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield' - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['c#', 'c-sharp', 'csharp']; - - SyntaxHighlighter.brushes.CSharp = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); - diff --git a/src/site/resources/syntaxhighlighter/shBrushColdFusion.js b/src/site/resources/syntaxhighlighter/shBrushColdFusion.js deleted file mode 100644 index 627dbb9b76e..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushColdFusion.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Jen - // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus - - var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' + - 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' + - 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' + - 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' + - 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' + - 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' + - 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' + - 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' + - 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' + - 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' + - 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' + - 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' + - 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' + - 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' + - 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' + - 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' + - 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' + - 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' + - 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' + - 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' + - 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' + - 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' + - 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' + - 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' + - 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' + - 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' + - 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' + - 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' + - 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' + - 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' + - 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' + - 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' + - 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' + - 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' + - 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' + - 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' + - 'XmlValidate Year YesNoFormat'; - - var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' + - 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' + - 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' + - 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' + - 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' + - 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' + - 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' + - 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' + - 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' + - 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' + - 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' + - 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' + - 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' + - 'cfwindow cfxml cfzip cfzipparam'; - - var operators = 'all and any between cross in join like not null or outer some'; - - this.regexList = [ - { regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments - { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings - { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions - { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such - { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword - ]; - } - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['coldfusion','cf']; - - SyntaxHighlighter.brushes.ColdFusion = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushCpp.js b/src/site/resources/syntaxhighlighter/shBrushCpp.js deleted file mode 100644 index 9f70d3aed60..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushCpp.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Copyright 2006 Shin, YoungJin - - var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' + - 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' + - 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' + - 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' + - 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' + - 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' + - 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' + - 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' + - 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' + - 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' + - 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' + - 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' + - 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' + - 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' + - 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' + - 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' + - 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' + - 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' + - 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' + - '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' + - 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' + - 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' + - 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' + - 'va_list wchar_t wctrans_t wctype_t wint_t signed'; - - var keywords = 'break case catch class const __finally __exception __try ' + - 'const_cast continue private public protected __declspec ' + - 'default delete deprecated dllexport dllimport do dynamic_cast ' + - 'else enum explicit extern if for friend goto inline ' + - 'mutable naked namespace new noinline noreturn nothrow ' + - 'register reinterpret_cast return selectany ' + - 'sizeof static static_cast struct switch template this ' + - 'thread throw true false try typedef typeid typename union ' + - 'using uuid virtual void volatile whcar_t while'; - - var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' + - 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' + - 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' + - 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' + - 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' + - 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' + - 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' + - 'fwrite getc getchar gets perror printf putc putchar puts remove ' + - 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' + - 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' + - 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' + - 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' + - 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' + - 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' + - 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' + - 'clock ctime difftime gmtime localtime mktime strftime time'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /^ *#.*/gm, css: 'preprocessor' }, - { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' }, - { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' }, - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['cpp', 'c']; - - SyntaxHighlighter.brushes.Cpp = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushCss.js b/src/site/resources/syntaxhighlighter/shBrushCss.js deleted file mode 100644 index 4297a9a6486..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushCss.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - function getKeywordsCSS(str) - { - return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; - }; - - function getValuesCSS(str) - { - return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; - }; - - var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + - 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + - 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + - 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + - 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + - 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + - 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + - 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + - 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + - 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + - 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + - 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + - 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + - 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index'; - - var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+ - 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+ - 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+ - 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+ - 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+ - 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+ - 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+ - 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+ - 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+ - 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+ - 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+ - 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+ - 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+ - 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; - - var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings - { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors - { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes - { regex: /!important/g, css: 'color3' }, // !important - { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords - { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values - { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts - ]; - - this.forHtmlScript({ - left: /(<|<)\s*style.*?(>|>)/gi, - right: /(<|<)\/\s*style\s*(>|>)/gi - }); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['css']; - - SyntaxHighlighter.brushes.CSS = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushDelphi.js b/src/site/resources/syntaxhighlighter/shBrushDelphi.js deleted file mode 100644 index e1060d44688..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushDelphi.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' + - 'case char class comp const constructor currency destructor div do double ' + - 'downto else end except exports extended false file finalization finally ' + - 'for function goto if implementation in inherited int64 initialization ' + - 'integer interface is label library longint longword mod nil not object ' + - 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' + - 'pint64 pointer private procedure program property pshortstring pstring ' + - 'pvariant pwidechar pwidestring protected public published raise real real48 ' + - 'record repeat set shl shortint shortstring shr single smallint string then ' + - 'threadvar to true try type unit until uses val var varirnt while widechar ' + - 'widestring with word write writeln xor'; - - this.regexList = [ - { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *) - { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { } - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags - { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345 - { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3 - { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['delphi', 'pascal', 'pas']; - - SyntaxHighlighter.brushes.Delphi = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushDiff.js b/src/site/resources/syntaxhighlighter/shBrushDiff.js deleted file mode 100644 index e9b14fc580a..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushDiff.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - this.regexList = [ - { regex: /^\+\+\+.*$/gm, css: 'color2' }, - { regex: /^\-\-\-.*$/gm, css: 'color2' }, - { regex: /^\s.*$/gm, css: 'color1' }, - { regex: /^@@.*@@$/gm, css: 'variable' }, - { regex: /^\+[^\+]{1}.*$/gm, css: 'string' }, - { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['diff', 'patch']; - - SyntaxHighlighter.brushes.Diff = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushErlang.js b/src/site/resources/syntaxhighlighter/shBrushErlang.js deleted file mode 100644 index 6ba7d9da871..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushErlang.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Jean-Lou Dupont - // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html - - // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5 - var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+ - 'case catch cond div end fun if let not of or orelse '+ - 'query receive rem try when xor'+ - // additional - ' module export import define'; - - this.regexList = [ - { regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' }, - { regex: new RegExp("\\%.+", 'gm'), css: 'comments' }, - { regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' }, - { regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' }, - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['erl', 'erlang']; - - SyntaxHighlighter.brushes.Erland = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushGroovy.js b/src/site/resources/syntaxhighlighter/shBrushGroovy.js deleted file mode 100644 index 6ec5c18521a..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushGroovy.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Andres Almiray - // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter - - var keywords = 'as assert break case catch class continue def default do else extends finally ' + - 'if in implements import instanceof interface new package property return switch ' + - 'throw throws try while public protected private static'; - var types = 'void boolean byte char short int long float double'; - var constants = 'null'; - var methods = 'allProperties count get size '+ - 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' + - 'findIndexOf grep inject max min reverseEach sort ' + - 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' + - 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' + - 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' + - 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' + - 'transformChar transformLine withOutputStream withPrintWriter withStream ' + - 'withStreams withWriter withWriterAppend write writeLine '+ - 'dump inspect invokeMethod print println step times upto use waitForOrKill '+ - 'getText'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /""".*"""/g, css: 'string' }, // GStrings - { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword - { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type - { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants - { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - } - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['groovy']; - - SyntaxHighlighter.brushes.Groovy = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushJScript.js b/src/site/resources/syntaxhighlighter/shBrushJScript.js deleted file mode 100644 index ff98daba16e..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushJScript.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'break case catch continue ' + - 'default delete do else false ' + - 'for function if in instanceof ' + - 'new null return super switch ' + - 'this throw true try typeof var while with' - ; - - var r = SyntaxHighlighter.regexLib; - - this.regexList = [ - { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings - { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings - { regex: r.singleLineCComments, css: 'comments' }, // one line comments - { regex: r.multiLineCComments, css: 'comments' }, // multiline comments - { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords - ]; - - this.forHtmlScript(r.scriptScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['js', 'jscript', 'javascript']; - - SyntaxHighlighter.brushes.JScript = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushJava.js b/src/site/resources/syntaxhighlighter/shBrushJava.js deleted file mode 100644 index d692fd63828..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushJava.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'abstract assert boolean break byte case catch char class const ' + - 'continue default do double else enum extends ' + - 'false final finally float for goto if implements import ' + - 'instanceof int interface long native new null ' + - 'package private protected public return ' + - 'short static strictfp super switch synchronized this throw throws true ' + - 'transient try void volatile while'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments - { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments - { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers - { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno - { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword - ]; - - this.forHtmlScript({ - left : /(<|<)%[@!=]?/g, - right : /%(>|>)/g - }); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['java']; - - SyntaxHighlighter.brushes.Java = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushJavaFX.js b/src/site/resources/syntaxhighlighter/shBrushJavaFX.js deleted file mode 100644 index 1a150a6ad33..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushJavaFX.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Patrick Webster - // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html - var datatypes = 'Boolean Byte Character Double Duration ' - + 'Float Integer Long Number Short String Void' - ; - - var keywords = 'abstract after and as assert at before bind bound break catch class ' - + 'continue def delete else exclusive extends false finally first for from ' - + 'function if import in indexof init insert instanceof into inverse last ' - + 'lazy mixin mod nativearray new not null on or override package postinit ' - + 'protected public public-init public-read replace return reverse sizeof ' - + 'step super then this throw true try tween typeof var where while with ' - + 'attribute let private readonly static trigger' - ; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, - { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers - { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } - ]; - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['jfx', 'javafx']; - - SyntaxHighlighter.brushes.JavaFX = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushPerl.js b/src/site/resources/syntaxhighlighter/shBrushPerl.js deleted file mode 100644 index d94a2e0ec52..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushPerl.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by David Simmons-Duffin and Marty Kube - - var funcs = - 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' + - 'chroot close closedir connect cos crypt defined delete each endgrent ' + - 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' + - 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' + - 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' + - 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' + - 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' + - 'getservbyname getservbyport getservent getsockname getsockopt glob ' + - 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' + - 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' + - 'oct open opendir ord pack pipe pop pos print printf prototype push ' + - 'quotemeta rand read readdir readline readlink readpipe recv rename ' + - 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' + - 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' + - 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' + - 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' + - 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' + - 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' + - 'undef unlink unpack unshift utime values vec wait waitpid warn write'; - - var keywords = - 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' + - 'for foreach goto if import last local my next no our package redo ref ' + - 'require return sub tie tied unless untie until use wantarray while'; - - this.regexList = [ - { regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' }, - { regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, - { regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' }, - { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags); - } - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['perl', 'Perl', 'pl']; - - SyntaxHighlighter.brushes.Perl = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushPhp.js b/src/site/resources/syntaxhighlighter/shBrushPhp.js deleted file mode 100644 index 95e6e4325bb..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushPhp.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var funcs = 'abs acos acosh addcslashes addslashes ' + - 'array_change_key_case array_chunk array_combine array_count_values array_diff '+ - 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+ - 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+ - 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+ - 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+ - 'array_push array_rand array_reduce array_reverse array_search array_shift '+ - 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+ - 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+ - 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+ - 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+ - 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+ - 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+ - 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+ - 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+ - 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+ - 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+ - 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+ - 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+ - 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+ - 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+ - 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+ - 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+ - 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+ - 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+ - 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+ - 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+ - 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+ - 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+ - 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+ - 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+ - 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+ - 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+ - 'strtoupper strtr strval substr substr_compare'; - - var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' + - 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' + - 'function include include_once global goto if implements interface instanceof namespace new ' + - 'old_function or private protected public return require require_once static switch ' + - 'throw try use var while xor '; - - var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings - { regex: /\$\w+/g, css: 'variable' }, // variables - { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions - { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['php']; - - SyntaxHighlighter.brushes.Php = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushPlain.js b/src/site/resources/syntaxhighlighter/shBrushPlain.js deleted file mode 100644 index 9f7d9e90c32..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushPlain.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['text', 'plain']; - - SyntaxHighlighter.brushes.Plain = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushPowerShell.js b/src/site/resources/syntaxhighlighter/shBrushPowerShell.js deleted file mode 100644 index 0be17529689..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushPowerShell.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributes by B.v.Zanten, Getronics - // http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro - - var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' + - 'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' + - 'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' + - 'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' + - 'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' + - 'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' + - 'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' + - 'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' + - 'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' + - 'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' + - 'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' + - 'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' + - 'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' + - 'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' + - 'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' + - 'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' + - 'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' + - 'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' + - 'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' + - 'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' + - 'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning'; - var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' + - 'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' + - 'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' + - 'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' + - 'spps spsv sv tee cat cd cp h history kill lp ls ' + - 'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' + - 'erase rd ren type % \\?'; - - this.regexList = [ - { regex: /#.*$/gm, css: 'comments' }, // one line comments - { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1 - { regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' }, - { regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['powershell', 'ps']; - - SyntaxHighlighter.brushes.PowerShell = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushPython.js b/src/site/resources/syntaxhighlighter/shBrushPython.js deleted file mode 100644 index ce77462975f..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushPython.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Gheorghe Milas and Ahmad Sherif - - var keywords = 'and assert break class continue def del elif else ' + - 'except exec finally for from global if import in is ' + - 'lambda not or pass print raise return try yield while'; - - var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' + - 'chr classmethod cmp coerce compile complex delattr dict dir ' + - 'divmod enumerate eval execfile file filter float format frozenset ' + - 'getattr globals hasattr hash help hex id input int intern ' + - 'isinstance issubclass iter len list locals long map max min next ' + - 'object oct open ord pow print property range raw_input reduce ' + - 'reload repr reversed round set setattr slice sorted staticmethod ' + - 'str sum super tuple type type unichr unicode vars xrange zip'; - - var special = 'None True False self cls class_'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, - { regex: /^\s*@\w+/gm, css: 'decorator' }, - { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' }, - { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' }, - { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' }, - { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' }, - { regex: /\b\d+\.?\w*/g, css: 'value' }, - { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, - { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' } - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['py', 'python']; - - SyntaxHighlighter.brushes.Python = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushRuby.js b/src/site/resources/syntaxhighlighter/shBrushRuby.js deleted file mode 100644 index ff82130a7af..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushRuby.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Erik Peterson. - - var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' + - 'END end ensure false for if in module new next nil not or raise redo rescue retry return ' + - 'self super then throw true undef unless until when while yield'; - - var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' + - 'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' + - 'ThreadGroup Thread Time TrueClass'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings - { regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants - { regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols - { regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords - { regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['ruby', 'rails', 'ror', 'rb']; - - SyntaxHighlighter.brushes.Ruby = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushSass.js b/src/site/resources/syntaxhighlighter/shBrushSass.js deleted file mode 100644 index aa04da0996b..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushSass.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - function getKeywordsCSS(str) - { - return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; - }; - - function getValuesCSS(str) - { - return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; - }; - - var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + - 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + - 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + - 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + - 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + - 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + - 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + - 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + - 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + - 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + - 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + - 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + - 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + - 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index'; - - var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+ - 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+ - 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero digits disc dotted double '+ - 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+ - 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+ - 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+ - 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+ - 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+ - 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+ - 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+ - 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+ - 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+ - 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+ - 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; - - var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; - - var statements = '!important !default'; - var preprocessor = '@import @extend @debug @warn @if @for @while @mixin @include'; - - var r = SyntaxHighlighter.regexLib; - - this.regexList = [ - { regex: r.multiLineCComments, css: 'comments' }, // multiline comments - { regex: r.singleLineCComments, css: 'comments' }, // singleline comments - { regex: r.doubleQuotedString, css: 'string' }, // double quoted strings - { regex: r.singleQuotedString, css: 'string' }, // single quoted strings - { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors - { regex: /\b(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)\b/g, css: 'value' }, // sizes - { regex: /\$\w+/g, css: 'variable' }, // variables - { regex: new RegExp(this.getKeywords(statements), 'g'), css: 'color3' }, // statements - { regex: new RegExp(this.getKeywords(preprocessor), 'g'), css: 'preprocessor' }, // preprocessor - { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords - { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values - { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['sass', 'scss']; - - SyntaxHighlighter.brushes.Sass = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushScala.js b/src/site/resources/syntaxhighlighter/shBrushScala.js deleted file mode 100644 index 4b0b6f04d29..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushScala.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - // Contributed by Yegor Jbanov and David Bernard. - - var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' + - 'override try lazy for var catch throw type extends class while with new final yield abstract ' + - 'else do if return protected private this package false'; - - var keyops = '[_:=><%#@]+'; - - this.regexList = [ - { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments - { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings - { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings - { regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords - { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword - ]; - } - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['scala']; - - SyntaxHighlighter.brushes.Scala = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushSql.js b/src/site/resources/syntaxhighlighter/shBrushSql.js deleted file mode 100644 index 5c2cd8806ff..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushSql.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var funcs = 'abs avg case cast coalesce convert count current_timestamp ' + - 'current_user day isnull left lower month nullif replace right ' + - 'session_user space substring sum system_user upper user year'; - - var keywords = 'absolute action add after alter as asc at authorization begin bigint ' + - 'binary bit by cascade char character check checkpoint close collate ' + - 'column commit committed connect connection constraint contains continue ' + - 'create cube current current_date current_time cursor database date ' + - 'deallocate dec decimal declare default delete desc distinct double drop ' + - 'dynamic else end end-exec escape except exec execute false fetch first ' + - 'float for force foreign forward free from full function global goto grant ' + - 'group grouping having hour ignore index inner insensitive insert instead ' + - 'int integer intersect into is isolation key last level load local max min ' + - 'minute modify move name national nchar next no numeric of off on only ' + - 'open option order out output partial password precision prepare primary ' + - 'prior privileges procedure public read real references relative repeatable ' + - 'restrict return returns revoke rollback rollup rows rule schema scroll ' + - 'second section select sequence serializable set size smallint static ' + - 'statistics table temp temporary then time timestamp to top transaction ' + - 'translation trigger true truncate uncommitted union unique update values ' + - 'varchar varying view when where with work'; - - var operators = 'all and any between cross in join like not null or outer some'; - - this.regexList = [ - { regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments - { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings - { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings - { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions - { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such - { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['sql']; - - SyntaxHighlighter.brushes.Sql = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); - diff --git a/src/site/resources/syntaxhighlighter/shBrushVb.js b/src/site/resources/syntaxhighlighter/shBrushVb.js deleted file mode 100644 index be845dc0b30..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushVb.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' + - 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' + - 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' + - 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' + - 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' + - 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' + - 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' + - 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' + - 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' + - 'Overloads Overridable Overrides ParamArray Preserve Private Property ' + - 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' + - 'Return Select Set Shadows Shared Short Single Static Step Stop String ' + - 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' + - 'Variant When While With WithEvents WriteOnly Xor'; - - this.regexList = [ - { regex: /'.*$/gm, css: 'comments' }, // one line comments - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings - { regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword - ]; - - this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['vb', 'vbnet']; - - SyntaxHighlighter.brushes.Vb = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shBrushXml.js b/src/site/resources/syntaxhighlighter/shBrushXml.js deleted file mode 100644 index 69d9fd0b1f4..00000000000 --- a/src/site/resources/syntaxhighlighter/shBrushXml.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -;(function() -{ - // CommonJS - typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; - - function Brush() - { - function process(match, regexInfo) - { - var constructor = SyntaxHighlighter.Match, - code = match[0], - tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code), - result = [] - ; - - if (match.attributes != null) - { - var attributes, - regex = new XRegExp('(? [\\w:\\-\\.]+)' + - '\\s*=\\s*' + - '(? ".*?"|\'.*?\'|\\w+)', - 'xg'); - - while ((attributes = regex.exec(code)) != null) - { - result.push(new constructor(attributes.name, match.index + attributes.index, 'color1')); - result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); - } - } - - if (tag != null) - result.push( - new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword') - ); - - return result; - } - - this.regexList = [ - { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // - { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // - { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process } - ]; - }; - - Brush.prototype = new SyntaxHighlighter.Highlighter(); - Brush.aliases = ['xml', 'xhtml', 'xslt', 'html']; - - SyntaxHighlighter.brushes.Xml = Brush; - - // CommonJS - typeof(exports) != 'undefined' ? exports.Brush = Brush : null; -})(); diff --git a/src/site/resources/syntaxhighlighter/shCore.css b/src/site/resources/syntaxhighlighter/shCore.css deleted file mode 100644 index 34f6864a155..00000000000 --- a/src/site/resources/syntaxhighlighter/shCore.css +++ /dev/null @@ -1,226 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCore.js b/src/site/resources/syntaxhighlighter/shCore.js deleted file mode 100644 index b47b6454721..00000000000 --- a/src/site/resources/syntaxhighlighter/shCore.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a-1},3d:6(g){e+=g}};c1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;be.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;dd.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a\'+c+""});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.Pb.P)H 1;Y I(a.Lb.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'\'+c+""+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v<3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;">1v3v 3.0.76 (72 73 3x)1Z://3u.2w/1v70 17 6U 71.6T 6X-3x 6Y 6D.6t 61 60 J 1k, 5Z 5R 5V <2R/>5U 5T 5S!\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'\',d=e.16.2x,h=d.2X,g=0;g";H c},2o:6(a,b,c){H\'<2W>\'+c+""},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;md)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P\'+c+""},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i\'+j+"":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"":"")+\'<2d 1g="17">\'+b+"
    "},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{})) diff --git a/src/site/resources/syntaxhighlighter/shCoreDefault.css b/src/site/resources/syntaxhighlighter/shCoreDefault.css deleted file mode 100644 index 08f9e10e4ea..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreDefault.css +++ /dev/null @@ -1,328 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: white !important; -} -.syntaxhighlighter .line.alt1 { - background-color: white !important; -} -.syntaxhighlighter .line.alt2 { - background-color: white !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #e0e0e0 !important; -} -.syntaxhighlighter .line.highlighted.number { - color: black !important; -} -.syntaxhighlighter table caption { - color: black !important; -} -.syntaxhighlighter .gutter { - color: #afafaf !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #6ce26c !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #6ce26c !important; - color: white !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: blue !important; - background: white !important; - border: 1px solid #6ce26c !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: blue !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: red !important; -} -.syntaxhighlighter .toolbar { - color: white !important; - background: #6ce26c !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: white !important; -} -.syntaxhighlighter .toolbar a:hover { - color: black !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: black !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #008200 !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: blue !important; -} -.syntaxhighlighter .keyword { - color: #006699 !important; -} -.syntaxhighlighter .preprocessor { - color: gray !important; -} -.syntaxhighlighter .variable { - color: #aa7700 !important; -} -.syntaxhighlighter .value { - color: #009900 !important; -} -.syntaxhighlighter .functions { - color: #ff1493 !important; -} -.syntaxhighlighter .constants { - color: #0066cc !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #006699 !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: gray !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: red !important; -} - -.syntaxhighlighter .keyword { - font-weight: bold !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreDjango.css b/src/site/resources/syntaxhighlighter/shCoreDjango.css deleted file mode 100644 index 1db1f70cb0d..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreDjango.css +++ /dev/null @@ -1,331 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: #0a2b1d !important; -} -.syntaxhighlighter .line.alt1 { - background-color: #0a2b1d !important; -} -.syntaxhighlighter .line.alt2 { - background-color: #0a2b1d !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #233729 !important; -} -.syntaxhighlighter .line.highlighted.number { - color: white !important; -} -.syntaxhighlighter table caption { - color: #f8f8f8 !important; -} -.syntaxhighlighter .gutter { - color: #497958 !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #41a83e !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #41a83e !important; - color: #0a2b1d !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #96dd3b !important; - background: black !important; - border: 1px solid #41a83e !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #96dd3b !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: white !important; -} -.syntaxhighlighter .toolbar { - color: white !important; - background: #41a83e !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: white !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #ffe862 !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: #f8f8f8 !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #336442 !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #9df39f !important; -} -.syntaxhighlighter .keyword { - color: #96dd3b !important; -} -.syntaxhighlighter .preprocessor { - color: #91bb9e !important; -} -.syntaxhighlighter .variable { - color: #ffaa3e !important; -} -.syntaxhighlighter .value { - color: #f7e741 !important; -} -.syntaxhighlighter .functions { - color: #ffaa3e !important; -} -.syntaxhighlighter .constants { - color: #e0e8ff !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #96dd3b !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: #eb939a !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: #91bb9e !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #edef7d !important; -} - -.syntaxhighlighter .comments { - font-style: italic !important; -} -.syntaxhighlighter .keyword { - font-weight: bold !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreEclipse.css b/src/site/resources/syntaxhighlighter/shCoreEclipse.css deleted file mode 100644 index a45de9fd8e3..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreEclipse.css +++ /dev/null @@ -1,339 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: white !important; -} -.syntaxhighlighter .line.alt1 { - background-color: white !important; -} -.syntaxhighlighter .line.alt2 { - background-color: white !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #c3defe !important; -} -.syntaxhighlighter .line.highlighted.number { - color: white !important; -} -.syntaxhighlighter table caption { - color: black !important; -} -.syntaxhighlighter .gutter { - color: #787878 !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #d4d0c8 !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #d4d0c8 !important; - color: white !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #3f5fbf !important; - background: white !important; - border: 1px solid #d4d0c8 !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #3f5fbf !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: #aa7700 !important; -} -.syntaxhighlighter .toolbar { - color: #a0a0a0 !important; - background: #d4d0c8 !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: #a0a0a0 !important; -} -.syntaxhighlighter .toolbar a:hover { - color: red !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: black !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #3f5fbf !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #2a00ff !important; -} -.syntaxhighlighter .keyword { - color: #7f0055 !important; -} -.syntaxhighlighter .preprocessor { - color: #646464 !important; -} -.syntaxhighlighter .variable { - color: #aa7700 !important; -} -.syntaxhighlighter .value { - color: #009900 !important; -} -.syntaxhighlighter .functions { - color: #ff1493 !important; -} -.syntaxhighlighter .constants { - color: #0066cc !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #7f0055 !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: gray !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: red !important; -} - -.syntaxhighlighter .keyword { - font-weight: bold !important; -} -.syntaxhighlighter .xml .keyword { - color: #3f7f7f !important; - font-weight: normal !important; -} -.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a { - color: #7f007f !important; -} -.syntaxhighlighter .xml .string { - font-style: italic !important; - color: #2a00ff !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreEmacs.css b/src/site/resources/syntaxhighlighter/shCoreEmacs.css deleted file mode 100644 index 706c77a0a85..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreEmacs.css +++ /dev/null @@ -1,324 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: black !important; -} -.syntaxhighlighter .line.alt1 { - background-color: black !important; -} -.syntaxhighlighter .line.alt2 { - background-color: black !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #2a3133 !important; -} -.syntaxhighlighter .line.highlighted.number { - color: white !important; -} -.syntaxhighlighter table caption { - color: #d3d3d3 !important; -} -.syntaxhighlighter .gutter { - color: #d3d3d3 !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #990000 !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #990000 !important; - color: black !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #ebdb8d !important; - background: black !important; - border: 1px solid #990000 !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #ebdb8d !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: #ff7d27 !important; -} -.syntaxhighlighter .toolbar { - color: white !important; - background: #990000 !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: white !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #9ccff4 !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: #d3d3d3 !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #ff7d27 !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #ff9e7b !important; -} -.syntaxhighlighter .keyword { - color: aqua !important; -} -.syntaxhighlighter .preprocessor { - color: #aec4de !important; -} -.syntaxhighlighter .variable { - color: #ffaa3e !important; -} -.syntaxhighlighter .value { - color: #009900 !important; -} -.syntaxhighlighter .functions { - color: #81cef9 !important; -} -.syntaxhighlighter .constants { - color: #ff9e7b !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: aqua !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: #ebdb8d !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: #ff7d27 !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #aec4de !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreFadeToGrey.css b/src/site/resources/syntaxhighlighter/shCoreFadeToGrey.css deleted file mode 100644 index 6101eba51f0..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreFadeToGrey.css +++ /dev/null @@ -1,328 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: #121212 !important; -} -.syntaxhighlighter .line.alt1 { - background-color: #121212 !important; -} -.syntaxhighlighter .line.alt2 { - background-color: #121212 !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #2c2c29 !important; -} -.syntaxhighlighter .line.highlighted.number { - color: white !important; -} -.syntaxhighlighter table caption { - color: white !important; -} -.syntaxhighlighter .gutter { - color: #afafaf !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #3185b9 !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #3185b9 !important; - color: #121212 !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #3185b9 !important; - background: black !important; - border: 1px solid #3185b9 !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #3185b9 !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: #d01d33 !important; -} -.syntaxhighlighter .toolbar { - color: white !important; - background: #3185b9 !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: white !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #96daff !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: white !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #696854 !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #e3e658 !important; -} -.syntaxhighlighter .keyword { - color: #d01d33 !important; -} -.syntaxhighlighter .preprocessor { - color: #435a5f !important; -} -.syntaxhighlighter .variable { - color: #898989 !important; -} -.syntaxhighlighter .value { - color: #009900 !important; -} -.syntaxhighlighter .functions { - color: #aaaaaa !important; -} -.syntaxhighlighter .constants { - color: #96daff !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #d01d33 !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: #ffc074 !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: #4a8cdb !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #96daff !important; -} - -.syntaxhighlighter .functions { - font-weight: bold !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreMDUltra.css b/src/site/resources/syntaxhighlighter/shCoreMDUltra.css deleted file mode 100644 index 2923ce7367b..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreMDUltra.css +++ /dev/null @@ -1,324 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: #222222 !important; -} -.syntaxhighlighter .line.alt1 { - background-color: #222222 !important; -} -.syntaxhighlighter .line.alt2 { - background-color: #222222 !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #253e5a !important; -} -.syntaxhighlighter .line.highlighted.number { - color: white !important; -} -.syntaxhighlighter table caption { - color: lime !important; -} -.syntaxhighlighter .gutter { - color: #38566f !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #435a5f !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #435a5f !important; - color: #222222 !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #428bdd !important; - background: black !important; - border: 1px solid #435a5f !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #428bdd !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: lime !important; -} -.syntaxhighlighter .toolbar { - color: #aaaaff !important; - background: #435a5f !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: #aaaaff !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #9ccff4 !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: lime !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #428bdd !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: lime !important; -} -.syntaxhighlighter .keyword { - color: #aaaaff !important; -} -.syntaxhighlighter .preprocessor { - color: #8aa6c1 !important; -} -.syntaxhighlighter .variable { - color: aqua !important; -} -.syntaxhighlighter .value { - color: #f7e741 !important; -} -.syntaxhighlighter .functions { - color: #ff8000 !important; -} -.syntaxhighlighter .constants { - color: yellow !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #aaaaff !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: red !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: yellow !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #ffaa3e !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreMidnight.css b/src/site/resources/syntaxhighlighter/shCoreMidnight.css deleted file mode 100644 index e3733eed566..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreMidnight.css +++ /dev/null @@ -1,324 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: #0f192a !important; -} -.syntaxhighlighter .line.alt1 { - background-color: #0f192a !important; -} -.syntaxhighlighter .line.alt2 { - background-color: #0f192a !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #253e5a !important; -} -.syntaxhighlighter .line.highlighted.number { - color: #38566f !important; -} -.syntaxhighlighter table caption { - color: #d1edff !important; -} -.syntaxhighlighter .gutter { - color: #afafaf !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #435a5f !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #435a5f !important; - color: #0f192a !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #428bdd !important; - background: black !important; - border: 1px solid #435a5f !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #428bdd !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: #1dc116 !important; -} -.syntaxhighlighter .toolbar { - color: #d1edff !important; - background: #435a5f !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: #d1edff !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #8aa6c1 !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: #d1edff !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #428bdd !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #1dc116 !important; -} -.syntaxhighlighter .keyword { - color: #b43d3d !important; -} -.syntaxhighlighter .preprocessor { - color: #8aa6c1 !important; -} -.syntaxhighlighter .variable { - color: #ffaa3e !important; -} -.syntaxhighlighter .value { - color: #f7e741 !important; -} -.syntaxhighlighter .functions { - color: #ffaa3e !important; -} -.syntaxhighlighter .constants { - color: #e0e8ff !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #b43d3d !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: #f8bb00 !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: white !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #ffaa3e !important; -} diff --git a/src/site/resources/syntaxhighlighter/shCoreRDark.css b/src/site/resources/syntaxhighlighter/shCoreRDark.css deleted file mode 100644 index d09368384da..00000000000 --- a/src/site/resources/syntaxhighlighter/shCoreRDark.css +++ /dev/null @@ -1,324 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -.syntaxhighlighter a, -.syntaxhighlighter div, -.syntaxhighlighter code, -.syntaxhighlighter table, -.syntaxhighlighter table td, -.syntaxhighlighter table tr, -.syntaxhighlighter table tbody, -.syntaxhighlighter table thead, -.syntaxhighlighter table caption, -.syntaxhighlighter textarea { - -moz-border-radius: 0 0 0 0 !important; - -webkit-border-radius: 0 0 0 0 !important; - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - font-weight: normal !important; - font-style: normal !important; - font-size: 1em !important; - min-height: inherit !important; - min-height: auto !important; -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - position: relative !important; - overflow: auto !important; - font-size: 1em !important; -} -.syntaxhighlighter.source { - overflow: hidden !important; -} -.syntaxhighlighter .bold { - font-weight: bold !important; -} -.syntaxhighlighter .italic { - font-style: italic !important; -} -.syntaxhighlighter .line { - white-space: pre !important; -} -.syntaxhighlighter table { - width: 100% !important; -} -.syntaxhighlighter table caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; -} -.syntaxhighlighter table td.code { - width: 100% !important; -} -.syntaxhighlighter table td.code .container { - position: relative !important; -} -.syntaxhighlighter table td.code .container textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; -} -.syntaxhighlighter table td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; -} -.syntaxhighlighter table td.code .line { - padding: 0 1em !important; -} -.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { - padding-left: 0em !important; -} -.syntaxhighlighter.show { - display: block !important; -} -.syntaxhighlighter.collapsed table { - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; -} -.syntaxhighlighter.collapsed .toolbar span { - display: inline !important; - margin-right: 1em !important; -} -.syntaxhighlighter.collapsed .toolbar span a { - padding: 0 !important; - display: none !important; -} -.syntaxhighlighter.collapsed .toolbar span a.expandSource { - display: inline !important; -} -.syntaxhighlighter .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; -} -.syntaxhighlighter .toolbar span.title { - display: inline !important; -} -.syntaxhighlighter .toolbar a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; -} -.syntaxhighlighter .toolbar a.expandSource { - display: none !important; -} -.syntaxhighlighter.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; -} -.syntaxhighlighter.ie .toolbar { - line-height: 8px !important; -} -.syntaxhighlighter.ie .toolbar a { - padding-top: 0px !important; -} -.syntaxhighlighter.printing .line.alt1 .content, -.syntaxhighlighter.printing .line.alt2 .content, -.syntaxhighlighter.printing .line.highlighted .number, -.syntaxhighlighter.printing .line.highlighted.alt1 .content, -.syntaxhighlighter.printing .line.highlighted.alt2 .content { - background: none !important; -} -.syntaxhighlighter.printing .line .number { - color: #bbbbbb !important; -} -.syntaxhighlighter.printing .line .content { - color: black !important; -} -.syntaxhighlighter.printing .toolbar { - display: none !important; -} -.syntaxhighlighter.printing a { - text-decoration: none !important; -} -.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { - color: black !important; -} -.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { - color: #008200 !important; -} -.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { - color: blue !important; -} -.syntaxhighlighter.printing .keyword { - color: #006699 !important; - font-weight: bold !important; -} -.syntaxhighlighter.printing .preprocessor { - color: gray !important; -} -.syntaxhighlighter.printing .variable { - color: #aa7700 !important; -} -.syntaxhighlighter.printing .value { - color: #009900 !important; -} -.syntaxhighlighter.printing .functions { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .constants { - color: #0066cc !important; -} -.syntaxhighlighter.printing .script { - font-weight: bold !important; -} -.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { - color: gray !important; -} -.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { - color: #ff1493 !important; -} -.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { - color: red !important; -} -.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { - color: black !important; -} - -.syntaxhighlighter { - background-color: #1b2426 !important; -} -.syntaxhighlighter .line.alt1 { - background-color: #1b2426 !important; -} -.syntaxhighlighter .line.alt2 { - background-color: #1b2426 !important; -} -.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { - background-color: #323e41 !important; -} -.syntaxhighlighter .line.highlighted.number { - color: #b9bdb6 !important; -} -.syntaxhighlighter table caption { - color: #b9bdb6 !important; -} -.syntaxhighlighter .gutter { - color: #afafaf !important; -} -.syntaxhighlighter .gutter .line { - border-right: 3px solid #435a5f !important; -} -.syntaxhighlighter .gutter .line.highlighted { - background-color: #435a5f !important; - color: #1b2426 !important; -} -.syntaxhighlighter.printing .line .content { - border: none !important; -} -.syntaxhighlighter.collapsed { - overflow: visible !important; -} -.syntaxhighlighter.collapsed .toolbar { - color: #5ba1cf !important; - background: black !important; - border: 1px solid #435a5f !important; -} -.syntaxhighlighter.collapsed .toolbar a { - color: #5ba1cf !important; -} -.syntaxhighlighter.collapsed .toolbar a:hover { - color: #5ce638 !important; -} -.syntaxhighlighter .toolbar { - color: white !important; - background: #435a5f !important; - border: none !important; -} -.syntaxhighlighter .toolbar a { - color: white !important; -} -.syntaxhighlighter .toolbar a:hover { - color: #e0e8ff !important; -} -.syntaxhighlighter .plain, .syntaxhighlighter .plain a { - color: #b9bdb6 !important; -} -.syntaxhighlighter .comments, .syntaxhighlighter .comments a { - color: #878a85 !important; -} -.syntaxhighlighter .string, .syntaxhighlighter .string a { - color: #5ce638 !important; -} -.syntaxhighlighter .keyword { - color: #5ba1cf !important; -} -.syntaxhighlighter .preprocessor { - color: #435a5f !important; -} -.syntaxhighlighter .variable { - color: #ffaa3e !important; -} -.syntaxhighlighter .value { - color: #009900 !important; -} -.syntaxhighlighter .functions { - color: #ffaa3e !important; -} -.syntaxhighlighter .constants { - color: #e0e8ff !important; -} -.syntaxhighlighter .script { - font-weight: bold !important; - color: #5ba1cf !important; - background-color: none !important; -} -.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { - color: #e0e8ff !important; -} -.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { - color: white !important; -} -.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { - color: #ffaa3e !important; -} diff --git a/src/site/resources/syntaxhighlighter/shLegacy.js b/src/site/resources/syntaxhighlighter/shLegacy.js deleted file mode 100644 index 6d9fd4d19f6..00000000000 --- a/src/site/resources/syntaxhighlighter/shLegacy.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SyntaxHighlighter - * http://alexgorbatchev.com/SyntaxHighlighter - * - * SyntaxHighlighter is donationware. If you are using it, please donate. - * http://alexgorbatchev.com/SyntaxHighlighter/donate.html - * - * @version - * 3.0.83 (July 02 2010) - * - * @copyright - * Copyright (C) 2004-2010 Alex Gorbatchev. - * - * @license - * Dual licensed under the MIT and GPL licenses. - */ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 u={8:{}};u.8={A:4(c,k,l,m,n,o){4 d(a,b){2 a!=1?a:b}4 f(a){2 a!=1?a.E():1}c=c.I(":");3 g=c[0],e={};t={"r":K};M=1;5=8.5;9(3 j R c)e[c[j]]="r";k=f(d(k,5.C));l=f(d(l,5.D));m=f(d(m,5.s));o=f(d(o,5.Q));n=f(d(n,5["x-y"]));2{P:g,C:d(t[e.O],k),D:d(t[e.N],l),s:d({"r":r}[e.s],m),"x-y":d(4(a,b){9(3 h=T S("^"+b+"\\\\[(?\\\\w+)\\\\]$","U"),i=1,p=0;p - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - io.github.devacfr.maven.skins - reflow-maven-skin - 2.0.0-beta2 - - - - - - - HAPI FHIR - The Open Source FHIR API for Java - false - false - - - CORS - - - false - - - - 2 - - - - - - bootswatch-lumen - sidebar - - - - HAPI FHIR|Test Server - Using HAPI|Contribute - JavaDocs|JXR - Get Help|Maven Reports - - -
    - Hosted on GitHub -
    - Star us and we will love you!
    - - ]]>
    - - HAPI FHIR - ]]> - http://hapifhir.io/ - - %2$s - HAPI FHIR -
    - - - - - -
    - -
    - diff --git a/src/site/xdoc/doc_android.xml.vm b/src/site/xdoc/doc_android.xml.vm deleted file mode 100644 index 1b9096581e3..00000000000 --- a/src/site/xdoc/doc_android.xml.vm +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - Android Support - James Agnew - - - - -
    - -

    - HAPI now has a specially built module for use on Android. Android developers - may use this JAR to take advantage of the FHIR model classes, and the FHIR client (running a FHIR server - on Android is not yet supported. Get in touch if this is something you are interested in working on!) -

    - -

    - As of HAPI FHIR 3.1.0, the hapi-fhir-android module has been streamlined in order - to reduce its footprint. Previous versions of the library included both an XML and a JSON parser - but this has been streamlined to only include JSON support in order to reduce the number of - libraries required in an Android build. -

    - -

    - When using the HAPI FHIR Android client, the client will request only JSON responses - (via the HTTP Accept header) and will not be able to communicate - with FHIR servers that support only XML encoding (few, if any, servers actually exist - with this limitation that we are aware of). -

    - -

    - The Android client also uses the hapi-fhir-client-okhttp module, - which is an HTTP client based on the OkHttp library. This library has proven to be - more powerful and less likely to cause issues on Android than the Apache HttpClient - implementation which is bundled by default. -

    - -

    - Note that the Android JAR is still new and hasn't received as much testing as other - parts of the library. We would greatly appreciate feedback, testing, etc. Also note that - because mobile apps run on less powerful hardware compared to desktop and server applications, - it is all the more important to keep a single instance of the FhirContext - around for good performance, since this object is expensive to create. We are hoping to - improve performance of the creation of this object in a future release. If you are an - Android developer and would like to help with this, please get in touch! -

    - - - -

    - To add the HAPI library via Gradle, you should add the - hapi-fhir-android - library to your Gradle file, as well as a structures library for the appropriate - version of FHIR that you want to support, e.g. - hapi-fhir-structures-dstu3. -

    - - -

    - Uou will also need to manually exclude the Woodstox StAX library from - inclusion, as this library uses namespaces which are prohibited on Android. You should also - exclude -

    - - -

    - To see a sample Gradle file for a working Android project - using HAPI FHIR, see the - Android Integration Test - project. -

    -
    -
    - -
    -

    - On mobile devices, performance problems are particularly noticeable. This - is made worse by the fact that some economy Android devices have much slower performance - than modern desktop computers. See the - Client Configuration Performance - page for some tips on how to improve client performance. -

    -
    - -
    - -

    - The following is intended to be a selection of publicly available open source - Android applications which use HAPI FHIR and might be useful as a reference. -

    -

    - If you know of others, please let us know! -

    - - -
    - - - -
    - diff --git a/src/site/xdoc/doc_cli.xml b/src/site/xdoc/doc_cli.xml deleted file mode 100644 index 7e8b488ff9f..00000000000 --- a/src/site/xdoc/doc_cli.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - Command Line Tool - James Agnew - - - - -
    -

    - hapi-fhir-cli is the HAPI FHIR Command Line tool. It features a number of HAPI's - built-in features as easy to use command line options. -

    - - -

    - You can get the tool by downloading it from our - GitHub Releases page - (look for the archive named hapi-fhir-[version]-cli.tar.bz2 on OSX/Linux or hapi-fhir-[version]-cli.zip on Windows). -

    -

    - When you have downloaded the archive (either ZIP or tar.bz2), expand it into a directory - where you will keep it, and add this directory to your path. -

    -

    - You can now try the tool out by executing the following command: hapi-fhir-cli -

    -

    - This command should show a help screen, as shown in the screeenshot below. -

    - Basic screen shot -
    - - - -

    - hapi-fhir-cli is available as a Homebrew package - for Mac. It can be installed using the following command: -

    - brew install hapi-fhir-cli - -
    - - -

    - Note on Java version support: The HAPI library is designed to - work in Java 6+, but the Command Line Tool required a minimum of Java 8. This - is because the Jetty Web Server that is used within the tool has this requirement. -

    -

    - The tool should work correctly on any system that has Java 8 (or newer) installed. If - it is not working correctly, first try the following command to test if Java is installed:
    - $ java -version -

    -

    - If this command does not produce output similar to the following, you should install/reinstall - Java.
    -

    -

    -

    - If this does not help, please post a question on our - Google Group. -

    -
    - -
    - -
    -

    - The CLI tool can be used to start a local, fully functional FHIR server which you can use - for testing. To start this server, simply issue the command hapi-fhir-cli run-server - as shown in the example below: -

    - Run Server -

    - Once the server has started, you can access the testing webpage by pointing your - browser at http://localhost:8080/. The FHIR - server base URL will be http://localhost:8080/baseDstu2/. -

    -

    - Note that by default this server will not be populated with any resources at all. You can - easily populate it with the FHIR example resources by leaving it running and opening - a second terminal window, then using the hapi-fhir-cli upload-examples command - (see the section below). -

    -

    - The server uses a local Derby database instance for storage. You may want to execute - this command in an empty directory, which you can clear if you want to reset the server. -

    -
    - -
    -

    - The upload-examples command downloads the complete set of FHIR example resources from - the HL7 website, and uploads them to a server of your choice. This can be useful to - populate a server with test data. -

    -

    - To execute this command, uploading test resources to a local CLI server, issue - the following: hapi-fhir-cli upload-examples -t http://localhost:8080/baseDstu2 -

    -

    - Note that this command may take a surprisingly long time to complete because of the - large number of examples. -

    -
    - -
    - -

    - The HAPI FHIR JPA server has a terminology server, and has the ability to - be populated with "external" code systems. These code systems are systems - that contain large numbers of codes, so the codes are not stored directly - inside the resource body. -

    -

    - HAPI has methods for uploading several popular code systems into its tables - using the distribution files produced by the respective code systems. This - is done using the upload-terminology command. The following - examples show how to do this for several popular code systems. -

    -

    - Note that the path and exact filename of the terminology files will likely - need to be adjusted for your local disk structure. -

    -

    - SNOMED CT -

    -
    ./hapi-fhir-cli upload-terminology -d Downloads/SnomedCT_RF2Release_INT_20160131.zip -f dstu3 -t http://localhost:8080/baseDstu3 -u http://snomed.info/sct
    - -

    LOINC

    -
    ./hapi-fhir-cli upload-terminology -d Downloads/LOINC_2.54_MULTI-AXIAL_HIERARCHY.zip -d Downloads/LOINC_2.54_Text.zip -f dstu3 -t http://localhost:8080/baseDstu3 -u http://loinc.org
    - -
    - - -
    - -

    - The migrate-database command may be used to Migrate a database - schema when upgrading a - HAPI FHIR JPA project from one version of HAPI - FHIR to another version. -

    - -

    - See Upgrading HAPI FHIR JPA - for information on how to use this command. -

    - -
    - - - -
    diff --git a/src/site/xdoc/doc_converter.xml.vm b/src/site/xdoc/doc_converter.xml.vm deleted file mode 100644 index 173d14cf7cf..00000000000 --- a/src/site/xdoc/doc_converter.xml.vm +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - HL7 FHIR Converter - James Agnew - - - - -
    - - - - -

    - Beginning in HAPI FHIR 2.3, a new experimental feature called - hapi-fhir-converter has been added to the project. This - is an experimental feature so use it with caution! -

    - -

    - This feature allows automated conversion from earlier versions - of the FHIR structures to a later version. -

    - -

    - The following page shows some basic examples. Please get in touch - if you are able to contribute better examples! -

    - - -

    - To use the hapi-fhir-converter module, import the following - dependency into your project pom.xml (or equivalent) -

    - - ca.uhn.hapi.fhir - hapi-fhir-converter - ${project.version} -]]> -
    - - -

    - The following example shows a conversion from a - hapi-fhir-structures-hl7org-dstu2 - structure to a - hapi-fhir-structures-dstu3 structure. -

    - - - - -
    - - -

    - The following example shows a conversion from a - hapi-fhir-structures-dstu2.1 - structure to a - hapi-fhir-structures-dstu3 structure. -

    - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_cors.xml.vm b/src/site/xdoc/doc_cors.xml.vm deleted file mode 100644 index 55e18ad86e0..00000000000 --- a/src/site/xdoc/doc_cors.xml.vm +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - CORS - James Agnew - - - - -
    - -

    - Note that in previous revisions of this document we recommended using the - eBay CORS Filter, but - as of 2016 the eBay filter is no longer being maintained and contains known bugs. - We now recommend against using this filter. -

    - -

    - If you are intending to support JavaScript clients in your server application, - you will generally need to enable Cross Origin Resource Sharing (CORS). There are - a number of ways of supporting this, so two are shown here: -

    -
      -
    • An approach using a HAPI FHIR Server Interceptor (Requires SpringFramework)
    • -
    • An approach using a servlet Filter (Container Specific)
    • -
    - - - -

    - The HAPI FHIR server framework includes an interceptor that can be - used to provide CORS functionality on your server. This mechanism is - nice because it relies purely on Java configuration (no messing around with - web.xml files). HAPI's interceptor is a thin wrapper around Spring Framework's - CorsProcessor class, so it requires Spring to be present on your classpath. -

    - -

    - Spring is generally unlikely to conflict with other libraries so it is usually - safe to add it to your classpath, but it is a fairly large library so if size is - a concern you might opt to use a filter instead. -

    - -

    - The following steps outline how to enable HAPI's CorsInterceptor: -

    - -

    - Add the following dependency to your POM. Note the exclusion of - commons-logging, as we are using SLF4j without commons-logging in - most of our examples. If your application uses commons-logging you don't need - to exclude that dependency. -

    - - org.springframework - spring-web - ${spring_version} - - - commons-logging - commons-logging - - -]]> - -

    - In your server's initialization method, create and register - a CorsInterceptor: -

    - - - - - -
    - - - -

    - The following examples show how to use the Apache Tomcat CorsFilter to enable - CORS support. The filter being used - (org.apache.catalina.filters.CorsFilter) is bundled with Apache - Tomcat so if you are deploying to that server you can use the filter. -

    - -

    - Other containers have similar filters you can use, so consult the documentation - for the given container you are using for more information. (If you have - an example for how to configure a different CORS filter, please send it - our way! Examples are always useful!) -

    - -

    - In your web.xml file (within the WEB-INF directory in your WAR file), - the following filter definition adds the CORS filter, including support - for the X-FHIR-Starter header defined by SMART Platforms. -

    - - - CORS Filter - org.apache.catalina.filters.CorsFilter - - A comma separated list of allowed origins. Note: An '*' cannot be used for an allowed origin when using credentials. - cors.allowed.origins - * - - - A comma separated list of HTTP verbs, using which a CORS request can be made. - cors.allowed.methods - GET,POST,PUT,DELETE,OPTIONS - - - A comma separated list of allowed headers when making a non simple CORS request. - cors.allowed.headers - X-FHIR-Starter,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization - - - A comma separated list non-standard response headers that will be exposed to XHR2 object. - cors.exposed.headers - Location,Content-Location - - - A flag that suggests if CORS is supported with cookies - cors.support.credentials - true - - - A flag to control logging - cors.logging.enabled - true - - - Indicates how long (in seconds) the results of a preflight request can be cached in a preflight result cache. - cors.preflight.maxage - 300 - - - - CORS Filter - /* -]]> - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_custom_structures.xml b/src/site/xdoc/doc_custom_structures.xml deleted file mode 100644 index b2bd745f523..00000000000 --- a/src/site/xdoc/doc_custom_structures.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - Custom Structures - - - - -
    - -

    - Typically, when working with FHIR the right way to provide your - own extensions is to work with existing resource types and simply - add your own extensions and/or constrain out fields you don't - need. -

    -

    - This process is described on the - Profiles & Extensions - page. -

    -

    - There are situations however when you might want to create an - entirely custom resource type. This feature should be used - only if there is no other option, since it means you are creating - a resource type that will not be interoperable with other FHIR - implementations. -

    -

    - This is an advanced features and isn't needed for most uses of - HAPI-FHIR. Feel free to skip this page. -

    - - - -

    - The following example shows a custom resource structure - class: -

    - - - - - -
    - - - -

    - The following example shows a custom datatype structure - class: -

    - - - - - -
    - - - -

    - And now let's try the custom structure out: -

    - - - - - -

    - This produces the following output (some spacing has been added for readability): -

    - - - - - - - - - - - - - -]]> - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_dstu2.xml b/src/site/xdoc/doc_dstu2.xml deleted file mode 100644 index da86a725d4f..00000000000 --- a/src/site/xdoc/doc_dstu2.xml +++ /dev/null @@ -1,229 +0,0 @@ - - - - - FHIR DSTU3 Support - James Agnew - - - - -
    - -

    - Although DSTU3 has not yet been balloted and finalized by HL7, - there are several proposed changes which have been incorporated - into the current - Continuous Integration Builds - of the FHIR specification itself and many of these changes are used - as a part of testing scenarios in FHIR Connectathons. -

    -

    - HAPI has support for DSTU3 definitions, based on the snapshot - of the resource definitions available at the time that - a given version of HAPI is released. These structures are found - in the hapi-fhir-structures-dstu3-[version].jar - library, with the associated Schemas, ValueSets, and other - textual resources being found in - hapi-fhir-validation-resources-dstu3-[version].jar. - For information on where to find these libraries, see the - Download page. -

    -

    - Migrating to DSTU3 does require some effort, as the resource - definitions have been migrated to use the "Reference Implementation" - structures. These are the resource definitions supplied by HL7, - meaning that the process to merge these two libraries has now - begun. -

    - - -

    - Since the early days of the FHIR project, there have been two parallel - Java implementations of the FHIR Specification: HAPI and the Reference - Implementation (RI). The two libraries both had separate data models and parsers, - but had little overlap in features other than that. HAPI has a server, - database, and rich fluent client that the RI did not have. The RI had - profile validation, snapshot generation, and a set other of great utilities that - HAPI did not have. -

    -

    - Over the last year, we have been working to bring the two projects - together, in order to reduce duplication of effort and let all - Java users take advantage of the entire set of available tools. -

    -

    - The biggest change to HAPI users coming from this merging is the adoption - of the new RI data structure classes. For users of FHIR DSTU2, we provided - a parallel set of structures so that users could choose which library to - use (hapi-fhir-structures-dstu2 for HAPI structures, - or hapi-fhir-structures-hl7org-dstu2 for RI structures). For - DSTU3 we will be using the RI structures only, so users will need to migrate - to use these. -

    -
    - -

    - The reference implementation (RI) structures have been added as a new - maven dependency library called hapi-fhir-structures-dstu3. - See - the download page for information on the Maven - dependencies for this version of the structures. -

    -

    - A new interface has been added which serves as a master interface - for all resource classes: org.hl7.fhir.instance.model.api.IBaseResource. - All RI resource classes will be in the package org.hl7.fhir.dstu3.model, - as shown below. -

    - Structures - -

    - Datatypes will also be found inthe same package. Unlike HAPI datatype structures, - which all end with "Dt", the RI primitive structure names end with "Type" and the - RI composite structures have no suffix, as shown below. -

    - Structures - -
    - - - -

    - Using these structures is similar to using other structures: -

    - - - - - - -
    - -
    - -
    - -

    - If you have an existing application built using a version of previous - version of HAPI FHIR, there is one change that may affect you. As shown above, - a new interface called IBaseResource has been introduced, and the - IResource interface extends from it. Many methods in the API which - previously returned IResource now return IBaseResource. -

    -

    - For these methods, you may cast the IBaseResource to - IResource if you are using DSTU2 structures, or to - IAnyResource if you are using DSTU3 structures. -

    - -

    - Please post any problems you might encounter trying to upgrade on the - Google Group. Chances are - if it's happening to you, it's happening to others. We're happy to help. -

    - - - -

    - The following is a list of things that have changed in the DSTU3 - structures which you will need to accomodate in your code as you - upgrade: -

    - -

    Package Structure

    -
      -
    • - Structures are all found in the - org.hl7.fhir.dstu3.model package, - instead of the ca.uhn.fhir.model.dstu2.resource, - ca.uhn.fhir.model.dstu2.composite, and - ca.uhn.fhir.model.dstu2.valueset packages. -
    • -
    - -

    Datatypes

    -
      -
    • - Primitive Types are renamed from - [foo]Dt to [foo]Type, - e.g. StringType and DecimalType -
    • -
    • - Composite Types are renamed from - [foo]Dt to [foo], - e.g. CodeableConcept and HumanName -
    • -
    • - ResourceReferenceDt is renamed to - Reference -
    • - Reference#getReference() returns the reference text, where - Reference#getReferenceElement() returns the IdType - representing the reference. -
    • - -
    - -

    Setter Names

    -
      -
    • - Names for some component setters/mutators have changed - in the new structures. In the old structures if the field - type was a primitive (e.g. a string) there would be two - setters: setName(String) and - setName(StringDt). In the new structures, - the setters are called setName(String) and - setNameElement(StringType). This is more - consistent with the way the getters are named. -
    • -
    - -

    Resource Metadata

    -
      -
    • - Resource#getId() returns the string ID (e.g. http://example.com/Patient/1) -
    • -
    • - Resource#getIdElement() returns the IdType previously returned by Resource#getId() -
    • -
    • - Resource metadata (e.g. last update time, tags, etc.) lives in a - Meta object accessed using Resource#getMeta() - instead of using the #getResourceMetadata() hashmap. -
    • Resource#getMeta()#getLastUpdate() returns the resource's last update time
    • -
    • Resource#getMeta()#getTag() returns the resource's tag list
    • -
    • Resource#getMeta()#getProfile() returns the resource's profile list
    • - -
    - -

    Contained Resources

    -
      -
    • Resource#getContained() returns the list of contained resources (previously it returned a useless ContainedDt object which held the list of contained resources)
    • -
    - -

    Enums for ValueSets

    -
      -
    • Enums are named [EnumName] instead of [EnumName]Enum. For example, ConditionVerificationStatusEnum is now called ConditionVerificationStatus
    • -
    - -

    - Resource/Datatype Components -

    -
      -
    • - The Java model classes representing sub-elements within a resource - now have a longer name reflecting the containing element name and - ending in "Component". For example, the Java structure representing - the "Bundle.entry" component was called Entry in the HAPI structures - but is called BundleEntryComponent in the RI structures. -
    • -
    - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_extensions.xml b/src/site/xdoc/doc_extensions.xml deleted file mode 100644 index 7c408dcb650..00000000000 --- a/src/site/xdoc/doc_extensions.xml +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - Profiles and Extensions - James Agnew - - - - -
    - -

    - Note on FHIR Versions: Because of the differences in the way the structures - work between DSTU2 and DSTU3, we have provided two versions of many of the - examples on this page. See the download page - for more information on FHIR versions. -

    - -

    - Extensions are a key part of the FHIR specification, providing a standardized - way of placing additional data in a resource. -

    - -

    - The simplest way to interact with extensions (i.e. to add them to resources you are creating, or - to read them from resources you are consuming) is to treat them as "undeclared extensions". - Undeclared extensions can be added to any of the built in FHIR resource types that come with HAPI-FHIR. -

    - -

    - DSTU2 -

    - - - - - -

    - DSTU3 -

    - - - - - -

    - Undeclared extensions can also be added to datatypes (composite or primitive). -

    - -

    - DSTU2 -

    - - - - - -

    - DSTU3 -

    - - - - - - - -

    - Extensions may also have child extensions as their content, instead - of a datatype. This is done by adding a child undeclared extension to the - parent extension. -

    - -

    - DSTU2 -

    - - - - - -

    - DSTU3 -

    - - - - - -
    - - - -

    - HAPI provides a few ways of accessing extension values in resources - which are received from other sources (i.e. downloaded by a client). -

    - -

    - DSTU2 -

    - - - - - -

    - DSTU3 -

    - - - - - -
    - -
    - -
    - -

    - The most elegant way of adding extensions to a resource is through the - use of custom fields. The following example shows a custom type which - extends the FHIR Patient resource definition through two extensions. -

    - - - - - - -

    - Using this custom type is as simple as instantiating the type - and working with the new fields. -

    - - - - - - -

    - This example produces the following output: -

    - - - - - - - - - - - - - - - - - -]]> - -

    - Parsing messages using your new custom type is equally simple. - These types can also be used as method return types in clients - and servers. -

    - - - - - - - - -

    - If you are using a client and wish to use a specific custom structure, - you may simply use the custom structure as you would a build in - HAPI type. -

    - - - - - -

    - You may also explicitly use custom types in searches and other - operations which return resources. -

    - - - - - -

    - You can also explicitly declare a preferred response resource custom - type. This is useful for some operations that do not otherwise - declare their resource types in the method signature. -

    - - - - - -
    - - - -

    - Sometimes you may not know in advance exactly which - type you will be receiving. For example, there are Patient resources - which conform to several different profiles on a server and you - aren't sure which profile you will get back for a specific read, - you can declare the "primary" type for a given profile. -

    -

    - This is declared at the FhirContext level, and will apply to any - clients created from this context (including clients created before - the default was set). -

    - - - - - -
    - - - -

    - If you are using a client and wish to use a specific custom structure, - you may simply use the custom structure as you would a build in - HAPI type. -

    - - - - - -
    - - - -

    - The following example shows a resource containing a composite - extension. -

    - - - - - - -

    - This could be used to create a resource such as the - following: -

    - - - - - - - - - - -]]> - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_fhirobjects.xml b/src/site/xdoc/doc_fhirobjects.xml deleted file mode 100644 index 10130c0671c..00000000000 --- a/src/site/xdoc/doc_fhirobjects.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - Data Model - James Agnew - - - - - -
    - -

    - Every resource type defined by FHIR has a corresponding - class, which contains a number of getters and setters for - the basic properties of that resource. -

    - -

    - HAPI tries to make populating objects easier, by providing lots of - convenience methods. For example, the Observation resource has an - "issued" property which is of the FHIR "instant" type (a system time with - either seconds or milliseconds precision). There are methods to - use the actual FHIR datatype, but also convenience methods which - use built-in Java types. -

    - - - - - - - - -

    - Most HAPI structures provide getters that automatically create - child objects on access. This means it is simple to navigate - complex structures without needing to worry about instantiating - child objects. -

    - - - - - - -
    - - - -

    - There are many places in the FHIR specification where a "coded" string is - used. This means that a code must be chosen from a list of allowable values. -

    - -

    Closed Valuesets / Codes

    - -

    - The FHIR specification defines a number of "closed" ValueSets, such as - the one used for - - Patient.gender - (note that this field was not a closed ValueSet in DSTU1 but is as of DSTU2). - These valuesets must either be empty, or be populated with a value drawn from - the list of allowable values defined by FHIR. HAPI provides special typesafe - Enums to help in dealing with these fields. -

    - - - - - - -

    Open Valusets / CodeableConcepts

    - -

    - The FHIR specification also defines a number of "open" ValueSets, such as - the one used for - Patient.maritalStatus. - These fields may define a set of allowable codes, but also allow you to - use your own codes instead if none of the given codes matches your needs. This - is called an incomplete binding. - Some fields may even define a set of codes that serve as nothing more than - an example as to the type of codes that would be used there. This is known as - an example binding. -

    - -

    - For these fields, a CodeableConcept datatype is generally used by the - FHIR specification. This datatype allows multiple "codings", which - are a code and codesystem pair, optionally with a display name as well. - The following example shows how to interact with this type. -

    - - - - - - -

    - HAPI also provides typesafe enums to help in working with CodeableConcept - fields. -

    - - - - - - -
    - - - -

    - The FHIR data model is rich enough to meet common use cases, but sometimes - that richness adds complexity. For example, a Patient may have multiple names - (a preferred name, a nickname, etc.) and each of those names may have multiple - last names, multiple prefixes, etc. -

    - -

    - The example below shows populating a name entry for a Patient. Note the - use of the StringDt type, which encapsulates a regular String, but allows for - extensions to be added. -

    - - - - - - -

    - HAPI also provides for simple setters that use Java primitive types - and can be chained, leading to much simpler code. -

    - - - - - - -
    - -
    - -
    - - - -

    - The following example shows how to create an observation resource containing - a numeric datatype. -

    - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_interceptors.xml b/src/site/xdoc/doc_interceptors.xml deleted file mode 100644 index fad0c1bd1a6..00000000000 --- a/src/site/xdoc/doc_interceptors.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Interceptors - James Agnew - - - - -
    - -

    - HAPI FHIR 3.8.0 introduced a new interceptor framework that is used across the entire - library. In previous versions of HAPI FHIR, a "Server Interceptor" framework existed and a - separate "Client Interceptor" framework existed. These have now been combined into a single - unified (and very powerful) framework. -

    - -

    - Interceptor classes may "hook into" various points in the processing chain in both - the client and the erver. -

    - - - - - - -
    - - - -
    diff --git a/src/site/xdoc/doc_intro.xml b/src/site/xdoc/doc_intro.xml deleted file mode 100644 index 400f61e11e8..00000000000 --- a/src/site/xdoc/doc_intro.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - Introduction - James Agnew - - - - - - - -
    - -

    - The HAPI FHIR library is an implementation of the - HL7 FHIR specification - for Java. Explaining what FHIR is would be beyond the scope of this documentation, - so if you have not previously worked with FHIR, the specification is a good place to - start. This is often not actually the case when discussing messaging protocols, but - in this case it is so: The FHIR specification is designed to be readable and - implementable, and is filled with good information. -

    - -

    - Part of the key to why FHIR is a good specification is the fact that its design - is based on the design of other successful APIs (in particular, the FHIR designers - often reference the Highrise API as a key influence in the design of the spec.) -

    - -

    - HAPI FHIR is based on the same principle, but applied to the Java implementation: We - have based the design of this API on the JAXB and JAX-WS APIs, which we consider to be - very well thought-out, and very usable APIs. This does not mean that HAPI-FHIR - actually uses these two APIs however, or that HAPI-FHIR is in any way compliant with - JAXB (JSR222) or JAX-WS - (JSR224), only that we have tried - to emluate the easy-to-use, but flexible design of these specifications. -

    - -
    - -
    - -

    - To get started with HAPI FHIR, first download a copy and add it - to your project. See the Download Page - for instructions. -

    - - - -

    - Before discussing HAPI itself, a quick word about FHIR versions. FHIR - is not yet a finalized "1.0" standard. It is currently in the DSTU phase, - which means that it is changing in subtle and non-subtle ways between releases. - Before trying to use FHIR, you will need to determine which version of FHIR - you want to support in your application. Typically this would be the - latest version, but if you are looking to interact with an application which - already exists, you will probably want to implement the same version implemented - by that application. -

    -

    - See the - note on DSTU2 support - for more information on supporting multiple versions of FHIR. -

    - -
    - - - -

    - HAPI defines model classes for every resource type and datatype defined by the FHIR specification. - For example, here is the Patient - resource specification. If you browse the JavaDoc you will see getters and setters for the - various properties that make up a Patient resource. -

    - -

    - We will come back to how to interact with these objects in a moment, but first - we need to create a - FhirContext. - FhirContext is the starting point to using HAPI, and acts as a factory for most - other parts of the API as well as a runtime cache of information that HAPI needs - to operate. Users of the JAXB API may find this class to be similar in purpose to - the - JAXBContext - class from that API. -

    - -

    - Creating a FhirContext is as simple as instantiating one. A FhirContext instance is - specific to a given version of the FHIR specification, so it is recommended that you - use one of the factory methods indicating the FHIR version you wish to support in your - application, as shown in the following snippet: -

    - - - - - - -
    - - - -

    - This - Parser instance - can then be used to parse messages. Note that you may use the context to - create as many parsers are you want. -

    - -

    - Performance tip: - The FhirContext is an expensive object to create, so you should try to create - it once and keep it around during the life of your application. Parsers, on - the other hand, are very lightweight and do not need to be reused. -

    - - - - - - -
    - - - -

    - The parser can also be used to encode a resource (which you can populate - with your own values) just as easily. -

    - - - - - - - - -

    - This code gives the following output: -

    - - - - - - - - - - - - -]]> - -
    - - - -

    - Much of the HAPI FHIR API is designed using a fluent style, - where method calls can be chained in a natural way. This - leads to tighter and easier-to-read code. -

    - -

    - The following snippet is functionally identical to the - example above: -

    - - - - - - -
    - - - -

    - JSON parsing/encoding is also supported. -

    - - - - - - -

    - This code gives the following output: -

    - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_jpa.xml b/src/site/xdoc/doc_jpa.xml deleted file mode 100644 index 49892a661f2..00000000000 --- a/src/site/xdoc/doc_jpa.xml +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - - JPA Server - James Agnew - - - - -
    - -

    - The HAPI FHIR - RestfulServer - module can be used to create a FHIR server endpoint against an arbitrary - data source, which could be a database of your own design, an existing - clinical system, a set of files, or anything else you come up with. -

    -

    - HAPI also provides a persistence module which can be used to - provide a complete RESTful server implementation, backed by a database of - your choosing. This module uses the - JPA 2.0 - API to store data in a database without depending on any specific database technology. -

    -

    - Important Note: - This implementation uses a fairly simple table design, with a - single table being used to hold resource bodies (which are stored as - CLOBs, optionally GZipped to save space) and a set of tables to hold search indexes, tags, - history details, etc. This design is only one of many possible ways - of designing a FHIR server so it is worth considering whether it - is appropriate for the problem you are trying to solve. -

    - - - -

    - The easiest way to get started with HAPI's JPA server module is - to begin with the example project. There is a complete sample project - found in our GitHub repo here: - - hapi-fhir-jpaserver-example - -

    - -

    - This example is a fully contained FHIR server, supporting all standard operations - (read/create/delete/etc). - It bundles an embedded instance of the Apache Derby Java - database - so that the server can run without depending on any external database, but it can also be - configured to use an installation of Oracle, Postgres, etc. -

    - -

    - To take this project for a spin, check out the sources from GitHib (or download a snapshot), - and then build the project: -

    - - - -

    - You now have two options for starting the server: -

    -
      -
    • - Deploy to Tomcat/JBoss/Websphere/etc: - You will now have a file - in your target directory called hapi-fhir-jpaserver-example.war. - This WAR file can be deployed to any Servlet container, at which point you could - access the server by pointing your browser at a URL similar to the following - (you may need to adjust the - port depending on which port your container is configured to listen on): - - http://localhost:8080/hapi-fhir-jpaserver-example/ - -
    • -
    • - Run with Maven and Embedded Jetty: - To start the server - directly within Maven, you can execute the following command: -
      - $ mvn jetty:run - You can then access the server by pointing your browser at the following URL: - - http://localhost:8080/hapi-fhir-jpaserver-example/ - -
    • -
    -
    -
    - -
    - -

    - The JPA server is configured through a series of configuration files, most - of which are documented inline. -

    - - -
    - -
    - -

    - The Spring confguration contains a definition for a bean called daoConfig, - which will look something like the following: -

    - - -

    - You can use this method to change various configuration settings on the DaoConfig bean - which define the way that the JPA server will behave. - See the - DaoConfig JavaDoc - for information about the available settings. -

    - - - -

    - Clients may sometimes post resources to your server that contain - absolute resource references. For example, consider the following resource: -

    - - - - - - - - - - -]]> - -

    - By default, the server will reject this reference, as only - local references are permitted by the server. This can be changed - however. -

    -

    - If you want the server to recognize that this URL is actually a local - reference (i.e. because the server will be deployed to the base URL - http://example.com/fhir/) you can - configure the server to recognize this URL via the following DaoConfig - setting: -

    - - -

    - On the other hand, if you want the server to be configurable to - allow remote references, you can set this with the confguration below. - Using the setAllowExternalReferences means that - it will be possible to search for references that refer to these - external references. -

    - - -
    - - - -

    - In some cases, you may have references which are Logical References, - which means that they act as an identifier and not necessarily as a literal - web address. -

    -

    - A common use for logical references is in references to conformance - resources, such as ValueSets, StructureDefinitions, etc. For example, - you might refer to the ValueSet - http://hl7.org/fhir/ValueSet/quantity-comparator - from your own resources. In this case, you are not neccesarily telling - the server that this is a real address that it should resolve, but - rather that this is an identifier for a ValueSet where - ValueSet.url - has the given URI/URL. -

    -

    - HAPI can be configured to treat certain URI/URL patterns as - logical by using the DaoConfig#setTreatReferencesAsLogical property - (see - JavaDoc). - For example: -

    -
    -
    -						// Treat specific URL as logical
    -						myDaoConfig.getTreatReferencesAsLogical().add("http://mysystem.com/ValueSet/cats-and-dogs");
    -
    -						// Treat all references with given prefix as logical
    -						myDaoConfig.getTreatReferencesAsLogical().add("http://mysystem.com/mysystem-vs-*");
    -					
    -
    - -
    - - - -

    - By default, search results will be cached for one minute. This means that - if a client performs a search for Patient?name=smith and gets back - 500 results, if a client performs the same search within 60000 milliseconds the - previously loaded search results will be returned again. This also means that - any new Patient resources named "Smith" within the last minute will not be - reflected in the results. -

    -

    - Under many normal scenarios this is a n acceptable performance tradeoff, - but in some cases it is not. If you want to disable caching, you have two - options: -

    -

    - Globally Disable / Change Caching Timeout -

    -

    - You can change the global cache using the following setting: -

    -
    -
    -						myDaoConfig.setReuseCachedSearchResultsForMillis(null);
    -					
    -
    -

    - Disable Cache at the Request Level -

    -

    - Clients can selectively disable caching for an individual request - using the Cache-Control header: -

    -
    -
    -						Cache-Control: no-cache
    -					
    -
    -

    - Disable Paging at the Request Level -

    -

    - If the client knows that they will only want a small number of results - (for example, a UI containing 20 results is being shown and the client - knows that they will never load the next page of results) the client - may also use the no-store directive along with a HAPI FHIR - extension called max-results in order to specify that - only the given number of results should be fetched. This directive - disabled paging entirely for the request and causes the request to - return immediately when the given number of results is found. This - can cause a noticeable performance improvement in some cases. -

    -
    -
    -						Cache-Control: no-store, max-results=20
    -					
    -
    - -
    - -
    - -
    - - Architecture - -

    - The HAPI JPA Server has the following components: -

    - -
      -
    • - Resource Providers: - A RESTful server Resource Provider is - provided for each resource type in a given release of FHIR. Each resource provider implements - a - @Search - method implementing the complete set of search parameters defined in the FHIR - specification for the given resource type. -
      -
      - The resource providers also extend a superclass which implements all of the - other FHIR methods, such as Read, Create, Delete, etc. -
      -
      - Note that these resource providers are generated as a part of the HAPI build process, - so they are not checked into Git. You can see their source - in the JXR Report, - for example the - - PatientResourceProvider. -
      -
      - The resource providers do not actually implement any of the logic - in searching, updating, etc. They simply receive the incoming HTTP calls (via the RestfulServer) - and pass along the incoming requests to the DAOs. -
      -
      -
    • -
    • - HAPI DAOs: - The DAOs actually implement all of the database business logic relating to - the storage, indexing, and retrieval of FHIR resources, using the underlying JPA - API. -
      -
      -
    • -
    • - Hibernate: - The HAPI JPA Server uses the JPA library, implemented by Hibernate. No Hibernate - specific features are used, so the library should also work with other - providers (e.g. Eclipselink) but it is not tested regularly with them. -
      -
      -
    • -
    • - Database: - The RESTful server uses an embedded Derby database, but can be configured to - talk to - any database supported by - Hibernate. -
    • - -
    - -
    - -
    - -
      -
    • - This page - has information on loading national editions (UK specifically) of SNOMED CT files into - the database. -
    • -
    - -
    - - - - -
    - -

    - HAPI FHIR JPA is a constantly evolving product, with new features being added to each - new version of the library. As a result, it is generally necessary to execute a database - migration as a part of an upgrade to HAPI FHIR. -

    - -

    - When upgrading the JPA server from one version of HAPI FHIR to a newer version, - often there will be changes to the database schema. The - Migrate Database - command can be used to perform a migration from one version to the next. -

    - -

    - Note that this feature was added in HAPI FHIR 3.5.0. It is not able to migrate - from versions prior to HAPI FHIR 3.4.0. - Please make a backup of your - database before running this command! - -

    -

    - The following example shows how to use the migrator utility to migrate between two versions. -

    -
    ./hapi-fhir-cli migrate-database -d DERBY_EMBEDDED -u
    -				"jdbc:derby:directory:target/jpaserver_derby_files;create=true" -n "" -p "" -f V3_4_0 -t V3_5_0
    -			
    - -

    - You may use the following command to get detailed help on the options: -

    -
    ./hapi-fhir-cli help migrate-database
    - -

    - Note the arguments: -

      -
    • - -d [dialect] - - This indicates the database dialect to use. See the detailed help for a list of options -
    • -
    • - -f [version] - - The version to migrate from -
    • -
    • - -t [version] - - The version to migrate to -
    • -
    -

    - - -

    - Note that the Oracle JDBC drivers are not distributed in the Maven Central repository, - so they are not included in HAPI FHIR. In order to use this command with an Oracle database, - you will need to invoke the CLI as follows: -

    -
    java -cp hapi-fhir-cli.jar ca.uhn.fhir.cli.App migrate-database -d ORACLE_12C -u "[url]" -n
    -					"[username]" -p "[password]" -f V3_4_0 -t V3_5_0
    -				
    -
    - - -

    - As of HAPI FHIR 3.5.0 a new mechanism for creating the JPA index tables (HFJ_SPIDX_xxx) - has been implemented. This new mechanism uses hashes in place of large multi-column - indexes. This improves both lookup times as well as required storage space. This change - also paves the way for future ability to provide efficient multi-tenant searches (which - is not yet implemented but is planned as an incremental improvement). -

    -

    - This change is not a lightweight change however, as it requires a rebuild of the - index tables in order to generate the hashes. This can take a long time on databases - that already have a large amount of data. -

    -

    - As a result, in HAPI FHIR JPA 3.6.0, an efficient way of upgrading existing databases - was added. Under this new scheme, columns for the hashes are added but values are not - calculated initially, database indexes are not modified on the HFJ_SPIDX_xxx tables, - and the previous columns are still used for searching as was the case in HAPI FHIR - JPA 3.4.0. -

    -

    - In order to perform a migration using this functionality, the following steps should - be followed: -

    -
      -
    • - Stop your running HAPI FHIR JPA instance (and remember to make a backup of your - database before proceeding with any changes!) -
    • -
    • - Modify your DaoConfig to specify that hash-based searches should not be used, using - the following setting: -
      -
      myDaoConfig.setDisableHashBasedSearches(true);
      -
    • -
    • - Make sure that you have your JPA settings configured to not automatically - create database indexes and columns using the following setting - in your JPA Properties: -
      -
      extraProperties.put("hibernate.hbm2ddl.auto", "none");
      -
    • -
    • - Run the database migrator command, including the entry - -x no-migrate-350-hashes - on the command line. For example: -
      -
      ./hapi-fhir-cli migrate-database -d DERBY_EMBEDDED -u
      -							"jdbc:derby:directory:target/jpaserver_derby_files;create=true" -n "" -p "" -f V3_4_0 -t V3_6_0 -x
      -							no-migrate-350-hashes
      -						
      -
    • -
    • - Rebuild and start your HAPI FHIR JPA server. At this point you should have a working - HAPI FHIR JPA 3.6.0 server that is is still using HAPI FHIR 3.4.0 search indexes. Search hashes - will be generated for any newly created or updated data but existing data will have null - hashes. -
    • -
    • - With the system running, request a complete reindex of the data in the database using - an HTTP request such as the following: -
      -
      GET /$mark-all-resources-for-reindexing
      - Note that this is a custom operation built into the HAPI FHIR JPA server. It should - be secured in a real deployment, so Authentication is likely required for this - call. -
    • -
    • - You can track the reindexing process by watching your server logs, - but also by using the following SQL executed directly against your database: -
      -
      SELECT * FROM HFJ_RES_REINDEX_JOB
      - When this query no longer returns any rows, the reindexing process is complete. -
    • -
    • - At this time, HAPI FHIR should be stopped once again in order to convert it - to using the hash based indexes. -
    • -
    • - Modify your DaoConfig to specify that hash-based searches are used, using - the following setting (this is the default setting, so it could also simply - be omitted): -
      -
      myDaoConfig.setDisableHashBasedSearches(false);
      -
    • -
    • - Execute the migrator tool again, this time omitting the flag option, e.g. -
      -
      ./hapi-fhir-cli migrate-database -d DERBY_EMBEDDED -u
      -							"jdbc:derby:directory:target/jpaserver_derby_files;create=true" -n "" -p "" -f V3_4_0 -t V3_6_0
      -						
      -
    • -
    • - Rebuild, and start HAPI FHIR JPA again. -
    • -
    -
    - -
    - -
    -

    - An interceptor called - CascadingDeleteInterceptor - may be registered against the Server. When this interceptor is enabled, - cascading deletes may be performed using either of the following: -

    -
      -
    • The request may include the following parameter: - _cascade=delete -
    • -
    • The request may include the following header: - X-Cascade: delete -
    • -
    -
    - - - -
    diff --git a/src/site/xdoc/doc_logging.xml b/src/site/xdoc/doc_logging.xml deleted file mode 100644 index 9d8cac2dee3..00000000000 --- a/src/site/xdoc/doc_logging.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - Logging - James Agnew - - - - -
    - -

    - Java has an abundance of logging frameworks, none of which are perfect. Many libraries - depend on one or more of these frameworks but also have dependencies who depend on a - different one. These dependencies can cause conflicts and be very irritating to solve. -

    - - - -

    - If you don't want to spend much time worrying about logging, it's probably - easiest to just include the Logback - JAR along with your application. -

    -

    - Logback is a powerful and flexible framework. To configure it, simply - include a "logback.xml" file on your classpath. The following contents - may be placed in this file to simply log at a suitable level - to the console: -

    - - - - - INFO - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%file:%line] %msg%n - - - - - - - -]]> - -

    - For more detail on how logging can be configured, see the - following section. -

    - - - - - - Logging arch diagram - -

    - HAPI uses - SLF4j - for all internal logging. SLF4j is a "logging facade" framework, meaning - that it doesn't actually handle log output (i.e. it isn't actually writing log lines - to disk) but rather it is able to delegate that task to any of a number of - underlying frameworks (e.g. log4j, logback, JDK logging, etc.) -

    - -

    - This means that in order to successfully log anything, you will need to - add two (or three) dependency JARs to your application: -

    -
      -
    • slf4j-api-vXX.jar: This is the SLF4j API and is neccesary for HAPI to function
    • -
    • - An actual logging implementation, as well as its SLF4j binding. For example: -
        -
      • - The recommended logging framework to use is Logback. Logback is absolutely - not neccesary for HAPI to function correctly, but it has a number of nice features - and is a good default choice. To use logback, you would include - logback-vXX.jar. -
      • -
      • - If you wanted to use log4j you would include log4j-vXX.jar - as well as slf4j-log4j-vXX.jar. Log4j is a mature - framework that is very widely used. -
      • -
      • - If you wanted to use JDK logging (aka java.util.Logging) you would include - slf4j-jdk14-vXX.jar. JDK logging is included with - Java but is not particularly full featured compared to many other frameworks. -
      • -
      -
    • -
    - -
    - - - - Logging arch diagram - -

    - Note that HAPI's client uses Apache HttpComponents Client internally, and that - library uses Apache Commons Logging as a logging facade. The recommended approach to - using HAPI is to not include any commons-logging JAR in your application, but rather to - include a copy of jcl-over-slf4j-vXX.jar. This JAR will simulate commons-logging, - but will redirect its logging statements to the same target as SLF4j has been - configured to. -

    - -

    - The diagram at the right shows the chain of command for logging under this scheme. -

    - -

    - Note that some popular libraries (e.g. Spring Framework) also use commons-logging - for logging. As such they may include a commons-logging JAR automatically as - a transitive dependency in Maven. If you are using jcl-over-slf4j and it isn't - working correctly, it is often worth checking the list of JARs included in your - application to see whether commons-logging has also been added. It can then be specifically - excluded in Maven. -

    - -
    - -
    - -
    - -
    - -

    - To enable detailed logging of client requests and responses (what URL is being requested, what headers and payload - are being received, etc.), an interceptor may be added to the client which logs each transaction. See - Logging Requests and Responses for more information. -

    - -
    - -
    - -

    - To enable detailed logging of server requests and responses, - an interceptor may be added to the server which logs each transaction. See - Logging Server Requests for more information. -

    - -
    - - - - diff --git a/src/site/xdoc/doc_narrative.xml b/src/site/xdoc/doc_narrative.xml deleted file mode 100644 index 782ba00f1b7..00000000000 --- a/src/site/xdoc/doc_narrative.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - Narrative Generation - James Agnew - - - - -
    - -

    - HAPI provides a several ways to add - Narrative Text - to your encoded messages. -

    - -

    - The simplest way is to simply place the narrative text directly in the resource - via the - getText() - method. -

    - - - - - - -
    - -
    - -

    - HAPI also comes with a built-in mechanism for automatically generating - narratives based on your resources. -

    - -

    - Warning: This built-in capability is a work in progress, and does not cover - every type of resource or even every attribute in any resource. You should test it - and configure it for your particular use cases. -

    - -

    - HAPI's built-in narrative generation uses the - Thymeleaf library - for templating narrative texts. Thymeleaf provides a simple - XHTML-based syntax which is easy to use and - meshes well with the HAPI-FHIR model objects. -

    - - - -

    - Activating HAPI's built-in narrative generator is as simple - as calling - setNarrativeGenerator. -

    - - - - - - -

    - ...which produces the following output: -

    - - - - -
    -
    John Edward SMITH
    - - - - - -
    Identifier7000135
    Address742 Evergreen Terrace
    Springfield ZZ
    -
    -
    - -]]> - -
    - - - -

    - HAPI currently only comes with built-in support for - a few resource types. Our intention is that people enhance these - templates and create new ones, and share these back with us so that - we can continue to build out the library. To see the current - template library, see the source repository - here. -

    - -

    - Note that these templates expect a few specific CSS definitions - to be present in your site's CSS file. See the - narrative CSS - to see these. -

    - -
    - -
    - -
    - -

    - To use your own templates for narrative generation, - simply create one or more templates, using the Thymeleaf - HTML based syntax. -

    - - - - - -

    - Then create a properties file which describes your - templates. In this properties file, each resource to - be defined has a pair or properties. -

    - -

    - The first (name.class) defines the class name of the resource to define a - template for. The second (name.narrative) defines the path/classpath to the - template file. The format of this path is file:/path/foo.html or classpath:/com/classpath/foo.html -

    - - - -

    - You may also override/define behaviour for datatypes. These datatype narrative - definitions will be used as content within th:narrative blocks - in resource templates. See the example resource template above for an example. -

    - - - -

    - Finally, use the - CustomThymeleafNarrativeGenerator - and provide it - to the FhirContext. -

    - - - - - - -
    - - - -
    diff --git a/src/site/xdoc/doc_resource_references.xml b/src/site/xdoc/doc_resource_references.xml deleted file mode 100644 index 6e4b3f5e220..00000000000 --- a/src/site/xdoc/doc_resource_references.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - Resource References - James Agnew - - - - - -
    - -

    - Resource references are a key part of the HAPI FHIR model, - since almost any resource will have references to other resources - within it. -

    - -

    - The ResourceReferenceDt - type is the datatype for references. This datatype has a number of properties which help - make working with FHIR simple. -

    - -

    - The getReference() method returns an IdDt instance which contains the identity of the - resource being referenced. This is the item which is most commonly populated when - interacting with FHIR. For example, consider the following Patient resource, which - contains a reference to an Organization resource: -

    - - - - - - - - -]]> - -

    - Given a Patient resource obtained by invoking a client operation, a call to - IdDt ref = patient.getManagingOrganization().getReference(); - returns an instance of IdDt which contains the "Organization/112" reference. -

    - -

    - ResourceReferenceDt also has a field for storing actual resource instances however, - and this can be very useful. -

    - - -
    - -
    - -

    - In client code, if a resource reference refers to a resource which was received as a - part of the same response, getResource() will be populated with the - actual resource. This can happen because either the resource was received as a - contained resource, or the resource was received as a separate resource in a bundle. -

    - -
    - -
    - -

    - In server code, you will often want to return a resource which contains - a link to another resource. Generally these "linked" resources are - not actually included in the response, but rather a link to the - resource is included and the client may request that resource directly - (by ID) if it is needed. -

    - -

    - The following example shows a Patient resource being created which will have a - link to its managing organization when encoded from a server: -

    - - - - -

    - Your server code may also wish to add additional resource to a bundle - being returned (e.g. because of an _include directive in the client's request). -

    - -

    - To do this, you can implement your server method to simply return - List<IResource> and then simply add your extra resources to - the list. Another technique however, is to populate the reference as shown - in the example below, but ensure that the referenced resource has an ID set. -

    - -

    - In the following example, the Organization resource has an ID set, so it will not - be contained but will rather appear as a distinct entry in any returned - bundles. Both resources are added to a bundle, which will then have - two entries: -

    - - - - - -

    - This will give the following output: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - -
    - - - -

    - On the other hand, if the linked resource - does not have an ID set, the linked resource will - be included in the returned bundle as a "contained" resource. In this - case, HAPI itself will define a local reference ID (e.g. "#1"). -

    - - -

    - This will give the following output: -

    - - - - - - - - - - - - - -]]> - -
    - -

    - Note that you may also "contain" resources manually in your own code if you - prefer. The following example show how to do this: -

    - - - - - - - -
    - -
    - -

    - By default, HAPI will strip resource versions from references between resources. - For example, if you set a reference to Patient.managingOrganization - to the value Patient/123/_history/2, HAPI will encode this - reference as Patient/123. -

    -

    - This is because in most circumstances, references between resources should be - versionless (e.g. the reference just points to the latest version, whatever - version that might be). -

    -

    - There are valid circumstances however for wanting versioned references. If you - need HAPI to emit versionned references, you have a few options: -

    -

    - You can force the parser to never strip versions: -

    - - - - -

    - You can also disable this behaviour entirely on the context (so that it - will apply to all parsers): -

    - - - - -

    - You can also configure HAPI to not strip versions only on certain fields. This - is desirable if you want versionless references in most places but need them - in some places: -

    - - - - -
    - - -
    diff --git a/src/site/xdoc/doc_rest_client.xml b/src/site/xdoc/doc_rest_client.xml deleted file mode 100644 index a55ee31fba8..00000000000 --- a/src/site/xdoc/doc_rest_client.xml +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - RESTful Client - James Agnew - - - - - -
    - - - -

    - HAPI provides a built-in mechanism for connecting to FHIR RESTful - servers. - The HAPI RESTful client is designed to be easy to set up and - to allow strong - compile-time type checking wherever possible. -

    - -

    - There are two types of RESTful clients provided by HAPI: - The Fluent/Generic client (described below) and - the Annotation - client. - The generic client is simpler to use - and generally provides the faster way to get started. The annotation-driven - client relies on static binding to specific operations to - give better compile-time checking against servers with a specific set of capabilities - exposed. This second model takes more effort to use, but can be useful - if the person defining the specific methods to invoke is not the same person - who is using those methods. -

    - -
    - -
    - -

    - Creating a generic client simply requires you to create an instance of - FhirContext and use that to instantiate a client. -

    -

    - The following example shows how to create a client, and a few operations which - can be performed. -

    - - - - - - -

    - Performance Tip: Note that FhirContext is an expensive object to create, - so you should try to keep an instance around for the lifetime of your application. It - is thread-safe so it can be passed as needed. Client instances, on the other hand, - are very inexpensive to create so you can create a new one for each request if needed - (although there is no requirement to do so, clients are reusable and thread-safe as well). -

    - - -

    - The generic client supports queries using a fluent interface - which is inspired by the fantastic - .NET FHIR API. - The fluent interface allows you to construct powerful queries by chaining - method calls together, leading to highly readable code. It also allows - you to take advantage of intellisense/code completion in your favourite - IDE. -

    -

    - Note that most fluent operations end with an execute() - statement which actually performs the invocation. You may also invoke - several configuration operations just prior to the execute() statement, - such as encodedJson() or encodedXml(). -

    -
    - - - -

    - Searching for resources is probably the most common initial scenario for - client applications, so we'll start the demonstration there. The FHIR search - operation generally uses a URL with a set of predefined search parameters, - and returns a Bundle containing zero-or-more resources which matched the - given search criteria. -

    -

    - Search is a very powerful mechanism, with advanced features such as paging, - including linked resources, etc. See the FHIR - search specification - for more information. -

    - -

    - Note on Bundle types: As of DSTU2, FHIR defines Bundle as a resource - instead of an Atom feed as it was in DSTU1. In code that was written for - DSTU1 you would typically use the ca.uhn.fhir.model.api.Bundle - class to represent a bundle, and that is that default return type for search - methods. If you are implemeting a DSTU2+ server, is recommended to use a - Bundle resource class instead (e.g. ca.uhn.fhir.model.dstu2.resource.Bundle - or org.hl7.fhir.dstu2.model.Bundle). Many of the examples below include - a chained invocation similar to - .returnBundle(ca.uhn.fhir.model.dstu2.resource.Bundle.class), which - instructs the search method which bundle type should be returned. -

    - -

    - The following example shows how to query using the generic client: -

    - - - - - -

    Search - Multi-valued Parameters (ANY/OR)

    -

    - To search for a set of possible values where ANY should be matched, - you can provide multiple values to a parameter, as shown in the example below. - This leads to a URL resembling ?family=Smith,Smyth -

    - - - - - -

    Search - Multi-valued Parameters (ALL/AND)

    -

    - To search for a set of possible values where ALL should be matched, - you can provide multiple instances of a parameter, as shown in the example below. - This leads to a URL resembling ?address=Toronto&address=Ontario&address=Canada -

    - - - - - -

    Search - Paging

    -

    - If the server supports paging results, the client has a page method - which can be used to load subsequent pages. -

    - - - - - -

    Search - Composite Parameters

    -

    - If a composite parameter is being searched on, the parameter - takes a "left" and "right" operand, each of which is - a parameter from the resource being seached. The following example shows the - syntax. -

    - - - - - -

    Search - By plain URL

    -

    - You can also perform a search using a String URL, instead - of using the fluent method calls to build the URL. This - can be useful if you have a URL you retrieved from - somewhere else that you want to use as a search. -

    - - - - - -

    Search - Other Query Options

    -

    - The fluent search also has methods for sorting, limiting, specifying - JSON encoding, _include, _revinclude, _lastUpdated, _tag, etc. -

    - - - - - -

    Search - Using HTTP POST

    -

    - The FHIR specification allows the use of an HTTP POST to transmit a search to a server instead of - using - an HTTP GET. With this style of search, the search parameters are included in the request body - instead - of the request URL, which can be useful if you need to transmit a search with a large number - of parameters. -

    -

    - The usingStyle() method controls which style to use. By default, GET style is used - unless the client detects that the request would result in a very long URL (over 8000 chars) in which - case the client automatically switches to POST. -

    -

    - An alternate form of the search URL (using a URL ending with_search) was also - supported in FHIR DSTU1. This form is no longer valid in FHIR DSTU2, but HAPI retains support - for using this form in order to interoperate with servers which use it. -

    - - - - - -

    Search - Compartments

    -

    - To search a - resource compartment, - simply use the withIdAndCompartment - method in your search. -

    - - - - - -

    Search - Subsetting (_summary and _elements)

    -

    - Sometimes you may want to only ask the server to include some parts of returned - resources (instead of the whole resource). Typically this is for performance or - optimization reasons, but there may also be privacy reasons for doing this. -

    -

    - To request that the server return only "summary" elements (those elements - defined in the specification with the "Σ" flag), you can use the - summaryMode(SummaryEnum) qualifier: -

    - - - - -

    - To request that the server return only elements from a custom list - provided by the client, you can use the elementsSubset(String...) - qualifier: -

    - - - - - -
    - - -

    - The following example shows how to perform a create - operation using the generic client: -

    - - - - - -

    Conditional Creates

    -

    - FHIR also specifies a type of update called "conditional create", where - a set of search parameters are provided and a new resource is only - created if no existing resource matches those parameters. See the - FHIR specification for more information on conditional creation. -

    - - - - -
    - - -

    - Given a resource name and ID, it is simple to retrieve - the latest version of that resource (a 'read') -

    - - - - -

    - By adding a version string, it is also possible to retrieve a - specific version (a 'vread') -

    - - - - -

    - It is also possible to retrieve a resource given its absolute - URL (this will override the base URL set on the client) -

    - - - - - -

    - See also the page on - ETag Support - for information on specifying a matching version in the - client request. -

    - -
    - - -

    - The following example shows how to perform a delete - operation using the generic client: -

    - - - - -

    Conditional Deletes

    -

    - Conditional deletions are also possible, which is a form where - instead of deleting a resource using its logical ID, you specify - a set of search criteria and a single resource is deleted if - it matches that criteria. Note that this is not a mechanism - for bulk deletion; see the FHIR specification for information - on conditional deletes and how they are used. -

    - - - - -
    - - -

    - Updating a resource is similar to creating one, except that - an ID must be supplied since you are updating a previously - existing resource instance. -

    -

    - The following example shows how to perform an update - operation using the generic client: -

    - - - - - -

    Conditional Updates

    -

    - FHIR also specifies a type of update called "conditional updates", where - insetad of using the logical ID of a resource to update, a set of - search parameters is provided. If a single resource matches that set of - parameters, that resource is updated. See the FHIR specification for - information on how conditional updates work. -

    - - - - - -

    ETags and Resource Contention

    -

    - See also the page on - ETag Support - for information on specifying a matching version in the - client request. -

    - -
    - - -

    - To retrieve the version history of all resources, or all resources of a given type, or - of a specific instance of a resource, you call the history() - method. -

    - - - - - -

    - If you are using a DSTU2 compliant server, you should instead use the - Bundle resource which is found in the DSTU2 structures JAR, as shown - in the syntax below. Note that in both cases, the class name is Bundle, - but the DSTU2 bundle is found in the .resources. package. -

    - - - - - -

    - You can also optionally request that only resource versions - later than a given date, and/or only up to a given count (number) - of resource versions be returned. -

    - - - - -
    - - -

    - The following example shows how to execute a transaction using the generic client: -

    - - - - -
    - - -

    - To retrieve the server's conformance statement, simply call the conformance() - method as shown below. -

    - - - - -
    -
    - -
    -

    - In the FHIR DSTU2 version, operations (referred to as "extended operations") - were added. These operations are an RPC style of invocation, with a set of - named input parameters passed to the server and a set of named output - parameters returned back. -

    -

    - To invoke an operation using the client, you simply need to create the - input - Parameters - resource, then pass that to the operation() fluent method. -

    -

    - The example below shows a simple operation call. -

    - - - - - -

    - Note that if the operation does not require any input parameters, - you may also invoke the operation using the following form. Note that - the withNoParameters still requires you to provide the - type of the Parameters resource so that it can return the correct type in - the response. -

    - - - - - - -

    - By default, the client will invoke operations using the HTTP POST form. - The FHIR specification also allows requests to use the HTTP GET verb - if the operation is idempotent and has no composite/resource parameters. - Use the following form to invoke operation with HTTP GET. -

    - - - - -
    - - -

    - The $validate operation asks the server to test a given resource - to see if it would be acceptable as a create/update on that server. - The client has built-in support for this operation. -

    -

    - If the client is in DSTU1 mode, the method below will invoke the - DSTU1 validation style instead. -

    - - - - - - -
    - - -

    - The $process-message operation asks the server to accept a fhir - message bundle for processing. -

    - - - - - - -
    - -
    - -
    - -

    - This section contains ways of customizing the request sent by the client -

    - - - -

    - The Cache-Control header can be used by the client in a request - to signal to the server (or any cache in front of it) that the client wants specific - behaviour from the cache, or wants the cache to not act on the request altogether. - Naturally, not all servers will honour this header. -

    - -

    - To add a cache control directive in a request: -

    - - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_client_alternate_provider.xml b/src/site/xdoc/doc_rest_client_alternate_provider.xml deleted file mode 100644 index 78fe5e1b712..00000000000 --- a/src/site/xdoc/doc_rest_client_alternate_provider.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - JAX-RS & Alternate HTTP Client Providers - James Agnew - - - - -
    - -

    - By default, the HAPI FHIR client uses the - Apache HTTP Client (HC) - as it's underlying HTTP provider. HC is a very powerful and efficient provider, - so it is generally a good choice. -

    -

    - It can be replaced however by providing an alternate implementation of - IRestfulClientFactory - to the FhirContext. -

    - - - -

    - If you are using HAPI FHIR's client in an environment where other - JAX-RS clients are being used, you may want to use the JAX-RS provider - instead of the Apache HC provider. -

    -

    - Using this provider is as simple as creating an instance and providing it - to the context: -

    - - - - - -

    - Note that this provider is defined in the JAX-RS Server module, so you need - to add the following dependency to your project in order for this to work: -

    -
    
    -	ca.uhn.hapi.fhir
    -	hapi-fhir-jaxrsserver-base
    -	[version]
    -]]>
    - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_client_annotation.xml b/src/site/xdoc/doc_rest_client_annotation.xml deleted file mode 100644 index db1582d7bf4..00000000000 --- a/src/site/xdoc/doc_rest_client_annotation.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - Annotation Client - James Agnew - - - - -
    - -

    - HAPI also provides a second style of client, called the annotation-driven client. - If you are using the - Fluent/Generic Client - do not need to read this page. -

    - -

    - The design of the annotation-driven client - is intended to be similar to that of - JAX-WS, so users of that - specification should be comfortable with - this one. It uses a user-defined interface containing special - annotated methods which HAPI binds to calls against a server. -

    - -

    - The annotation-driven client is particularly useful if you have a server that - exposes a set of specific operations (search parameter combinations, named queries, etc.) - and you want to let developers have a stongly/statically typed interface to that - server. -

    -

    - There is no difference in terms of capability between the two styles of - client. There is simply a difference in programming style and complexity. It - is probably safe to say that the generic client is easier to use and leads to - more readable code, at the expense of not giving any visibility into the - specific capabilities of the server you are interacting with. -

    - - - -

    - The first step in creating an annotation-driven client is to define a - restful client interface. -

    - -

    - A restful client interface class must extend the - IRestfulClient - interface, - and will contain one or more methods which have been - annotated with special annotations indicating which RESTful - operation - that method supports. Below is a simple example of a - resource provider - which supports the - read - operation (i.e. retrieve a single resource by ID) as well as the - search - operation (i.e. find any resources matching a given criteria) for a - specific - search criteria. -

    - -

    - You may notice that this interface looks a lot like the Resource - Provider - which is defined for use by the RESTful server. In fact, it - supports all - of the same annotations and is essentially identical, - other than the - fact that for a client you must use an interface but for a server you - must use a concrete class with method implementations. -

    - - - - - - -

    - You will probably want to add more methods - to your client interface. - See - RESTful Operations - for - lots more examples of how to add methods for various operations. -

    - -
    - - - -

    - Once your client interface is created, all that is left is to - create a FhirContext and instantiate the client and you are - ready to - start using it. -

    - - - - - - -
    - - - -

    - Restful client interfaces that you create will also extend - the interface - IRestfulClient, - which comes with some helpful methods for configuring the way that - the client will interact with the server. -

    -

    - The following snippet shows how to configure the cliet to explicitly - request JSON or XML responses, and how to request "pretty printed" responses - on servers that support this (HAPI based servers currently). -

    - - - - - - -
    - - - -

    - The following is a complete example showing a RESTful client - using - HAPI FHIR. -

    - - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_client_examples.xml b/src/site/xdoc/doc_rest_client_examples.xml deleted file mode 100644 index e3bc069e57d..00000000000 --- a/src/site/xdoc/doc_rest_client_examples.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - RESTful Client Examples - James Agnew - - - - - - -
    - -

    - This page contains examples of how to use the client to perform - complete tasks. If you have an example you could contribute, we'd - love to hear from you! -

    - - - -

    - The following example shows how to post a transaction with two resources, - where one resource contains a reference to the other. A temporary ID (a UUID) - is used as an ID to refer to, and this ID will be replaced by the server by - a permanent ID. -

    - - - - - - -

    - This code creates the following transaction bundle:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> -

    - -

    - The server responds with the following response. Note that - the ID of the already existing patient is returned, and the - ID of the newly created Observation is too.
    - - - - - - - - - - - - - - - - - - - - - - - - -]]> -

    - -
    - - - -

    - This example - shows how to load all pages of a bundle by fetching each page one-after-the-other and then - joining the resuts. -

    - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_client_http_config.xml.vm b/src/site/xdoc/doc_rest_client_http_config.xml.vm deleted file mode 100644 index b34df1be3ac..00000000000 --- a/src/site/xdoc/doc_rest_client_http_config.xml.vm +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - Client Configuration - James Agnew - - - -
    - -

    - This page outlines ways that the client can be configured - for specific behaviour. -

    - -
    - - - -
    - - -

    - By default, the client will query the server before the very first - operation to download the server's conformance/metadata statement - and verify that the server is appropriate for the given client. - This check is only done once per server endpoint for a given - FhirContext. -

    -

    - This check is useful to prevent bugs or unexpected behaviour - when talking to servers. It may introduce unneccesary overhead - however in circumstances where the client and server are known - to be compatible. The following example shows how to disable this - check. -

    - - - - -
    - - - -

    - By default, HAPI will scan each model type it encounters - as soon as it encounters it. This scan includes a check for - all fields within the type, and makes use of reflection to do this. -

    -

    - While this process is not particularly significant on reasonably - performant machines (one benchmark showed that this takes - roughly 0.6 seconds to scan all types on one developer workstation), on some devices - (e.g. Android phones where every millisecond counts) - it may be desirable to defer this scan. -

    -

    - When the scan is deferred, objects will only be scanned when they - are actually accessed, meaning that only types that are - actually used in an application get scanned. -

    -

    - The following example shows how to defer model scanning: -

    - - - - - -
    - -
    - -
    - -

    - RESTful clients (both Generic and Annotation-Driven) use - Apache HTTP Client - as a provider by default (except on Android, where - OkHttp - is the default). -

    -

    - The Apache HTTP Client is very powerful and extremely - flexible, - but can be confusing at first to configure, because of the low-level - approach that - the library uses. -

    - -

    - In many cases, the default configuration should suffice. HAPI FHIR - also encapsulates some of the more common configuration settings you - might want to use (socket timesouts, proxy settings, etc.) so that these - can be configured through HAPI's API without needing to understand the - underlying HTTP Client library. -

    - -

    - This configuration is provided by accessing the - IRestfulClientFactory - class from the FhirContext. -

    - -

    - Note that individual requests and responses - can be tweaked using - Client Interceptors. - This approach is generally useful for configuration involving - tweaking the HTTP request/response, such as adding authorization headers - or logging. -

    - - -

    - The following example shows how to configure low level - socket timeouts for client operations. -

    - - - - -
    - - - -

    - The following example shows how to configure the use of an HTTP - proxy in the client. -

    - - - - - - -
    - - - -

    - As of HAPI FHIR 2.0, an alternate client implementation - is available. This client replaces the low-level - Apache HttpClient implementation with the - Square - OkHttp - library. -

    -

    - Changing HTTP implementations should be mostly - transparent (it has no effect on the actual FHIR - semantics which are transmitted over the wire) but - might be useful if you have an application that - uses OkHttp in other parts of the application and - has specific configuration for that library. -

    -

    - Note that as of HAPI FHIR 2.1, OkHttp is the default - provider on Android, and will be used without any - configuration being required. This is done because - HttpClient is deprecated on Android and has caused - problems in the past. -

    -

    - To use OkHttp, first add the library as a dependency to your project POM: -

    - - ca.uhn.hapi.fhir - hapi-fhir-client-okhttp - ${hapi_stable_version} -]]> - -

    - Then, set the client factory to use OkHttp. -

    - - - - -
    -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_client_interceptor.xml b/src/site/xdoc/doc_rest_client_interceptor.xml deleted file mode 100644 index d762a959cb3..00000000000 --- a/src/site/xdoc/doc_rest_client_interceptor.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - RESTful Client - James Agnew - - - - -
    - -

    - Both generic clients and annotation-driven clients support - Client Interceptors, - which may be registered in order to provide specific behaviour to each - client request. -

    - -

    - The following section shows some sample interceptors which may be used. -

    - - - -

    - The following example shows how to configure your client to - use a specific username and password in every request. -

    - - - - - - -
    - - - -

    - The following example shows how to configure your client to - inject a bearer token authorization header into every request. This - is used to satisfy servers which are protected using OAUTH2. -

    - - - - - - -
    - - - - -

    - The LoggingInterceptor can be used to - log every transaction. The interceptor is flexible and can be configured to be extremely - verbose (logging entire transactions including HTTP headers and payload bodies) - or simply to log request URLs, or some combination in between. -

    - - - - - - -
    - - - -

    - The CookieInterceptor can be used to - add an HTTP Cookie header to each request created by the client. -

    - - - - - - -
    - - - -

    - The GZipContentInterceptor compresses outgoing contents. - With this interceptor, if the client is transmitting resources to the server - (e.g. for a create, update, transaction, etc.) the content will be GZipped - before transmission to the server. -

    - - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_etag.xml b/src/site/xdoc/doc_rest_etag.xml deleted file mode 100644 index 4d8def62cc6..00000000000 --- a/src/site/xdoc/doc_rest_etag.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - ETags - James Agnew - - - - - -
    - -

    - HAPI provides support for - HTTP ETags, which are - a standard way of providing faster reads when content has not changed and - optimistic locking for updates. -

    - -
    - - - -
    - -

    - ETag support is automatically enabled in the RESTful server. - This has the following effects: -

    -
      -
    • - Read/VRead - method responses will include an - ETag header, noting the version - being returned. -
    • -
    • - If an incoming Read method includes an If-None-Match header with - the same version as the latest version being returned, the server will automatically - return an HTTP 304 Not Modified instead of returning the - resource body. -
    • -
    - - - -

    - To disable ETag support, simply invoke the - setETagSupport method, as in the following example. -

    - - - - - -
    - - - -
    - - - - diff --git a/src/site/xdoc/doc_rest_operations.xml b/src/site/xdoc/doc_rest_operations.xml deleted file mode 100644 index 56275a79c47..00000000000 --- a/src/site/xdoc/doc_rest_operations.xml +++ /dev/null @@ -1,1870 +0,0 @@ - - - - - - - RESTful Operations - James Agnew - - - -
    - - -

    - This page shows the operations which can be implemented on - HAPI - RESTful Servers, as well as - Annotation Clients. - Most of the examples shown here show how to implement a server - method, but to perform an equivalent call on an annotation - client you simply put a method with the same signature in your - client interface. -

    - - -
    - - - - - -
    - -

    - The - - read - - operation retrieves a resource by ID. It is annotated with the - @Read - annotation, and has a single parameter annotated with the - @IdParam - annotation. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient/111 -

    - -

    - The following snippet shows how to define a client interface - to handle a read method. -

    - - - - - - - -
    - - - - - -
    - -

    - The - - vread - - operation retrieves a specific version of a resource with a given ID. - To support vread, simply add "version=true" to your @Read annotation. This - means that the read method will support both "Read" and "VRead". The IdDt - may or may not have the version populated depending on the client request. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient/111/_history/2 -

    - - -
    - - - - - -
    - -

    - The - - update - - operation updates a specific resource instance (using its ID), and optionally - accepts a version ID as well (which can be used to detect version conflicts). -

    -

    - Update methods must be annotated with the - @Update - annotation, and have a parameter annotated with the - @ResourceParam - annotation. This parameter contains the resource instance to be created. - See the @ResourceParam for information on the types allowed for this parameter (resource types, String, byte[]). -

    -

    - In addition, the method may optionally have a parameter annotated with the - @IdParam - annotation, or they may obtain the ID of the resource being updated from - the resource itself. Either way, this ID comes from the URL passed in. -

    -

    - Update methods must return an object of type - MethodOutcome - . This - object contains the identity of the created resource. -

    -

    - The following snippet shows how to define an update method on a server: -

    - - - - - - -

    - Example URL to invoke this method (this would be invoked using an HTTP PUT, - with the resource in the PUT body): -
    - http://fhir.example.com/Patient -

    - -

    - The following snippet shows how the corresponding client interface - would look: -

    - - - - - - -

    Conditional Updates

    -

    - If you wish to suport conditional updates, you can add a parameter - tagged with a - @ConditionalOperationParam - annotation. If the request URL contains search parameters instead of a - resource ID, then this parameter will be populated. -

    - - - - - - -

    - Example URL to invoke this method (this would be invoked using an HTTP PUT, - with the resource in the PUT body): -
    - http://fhir.example.com/Patient?identifier=system%7C00001 -

    - - -

    Accessing The Raw Resource Payload

    -

    - If you wish to have access to the raw resource payload as well as the parsed value - for any reason, you may also add parameters which have been annotated - with the @ResourceParam of type - String (to access the raw resource body) and/or - EncodingEnum (to determine which encoding was used) -

    -

    - The following example shows how to use these additonal data elements. -

    - - - - - - -
    -

    Prefer Header / Returning the resource body

    -

    - If you want to allow clients to request that the server return - the resource body as a result of the transaction, you may wish to - return the updated resource in the returned MethodOutcome. -

    -

    - In this type of request, the client adds a header containing - Prefer: return=representation which indicates to the server - that the client would like the resource returned in the response. -

    -

    - In order for the server to be able to honour this request, the - server method should add the updated resource to the MethodOutcome object - being returned, as shown in the example below. -

    - - - - - - -

    Contention Aware Updating

    - -

    - As of FHIR DSTU2, FHIR uses the ETag header to - provide "conention aware updating". Under this scheme, a client - may create a request that contains an ETag specifying the version, - and the server will fail if the given version is not the latest - version. -

    -

    - Such a request is shown below. In the following example, the update will - only be applied if resource "Patient/123" is currently at version "3". - Otherwise, -

    -
    - -

    - If a client performs a contention aware update, the ETag version will be - placed in the version part of the IdDt/IdType that is passed into the - method. For example: -

    - - - - - - -
    -
    - - - - - -
    - -

    - The - - delete - - operation retrieves a specific version of a resource with a given ID. It takes a single - ID parameter annotated with an - @IdParam - annotation, which supplies the ID of the resource to delete. -

    - - - - - - -

    - Delete methods are allowed to return the following types: -

    -
      -
    • - void - : This method may return - void - , in which case - the server will return an empty response and the client will ignore - any successful response from the server (failure responses will still throw - an exception) -
    • -
    • - - MethodOutcome - - : - This method may return - MethodOutcome - , - which is a wrapper for the FHIR OperationOutcome resource, which may optionally be returned - by the server according to the FHIR specification. -
    • -
    - -

    - Example URL to invoke this method (HTTP DELETE): -
    - http://fhir.example.com/Patient/111 -

    - -

    Conditional Deletes

    - -

    - The FHIR specification also allows "conditional deletes". A conditional - delete uses a search style URL instead of a read style URL, and - deletes a single resource if it matches the given search parameters. - The following example shows how to -

    - - - - - - -

    - Example URL to perform a conditional delete (HTTP DELETE): -
    - http://fhir.example.com/Patient?identifier=system%7C0001 -

    - - -
    - - - - - -
    - -

    - The - - create - - operation saves a new resource to the server, allowing the server to - give that resource an ID and version ID. -

    -

    - Create methods must be annotated with the - @Create - annotation, and have a single parameter annotated with the - @ResourceParam - annotation. This parameter contains the resource instance to be created. - See the @ResourceParam for information on the types allowed for this parameter (resource types, String, byte[]). -

    -

    - Create methods must return an object of type - MethodOutcome - . This - object contains the identity of the created resource. -

    -

    - The following snippet shows how to define a server create method: -

    - - - - - - -

    - Example URL to invoke this method (this would be invoked using an HTTP POST, - with the resource in the POST body): -
    - http://fhir.example.com/Patient -

    - -

    - The following snippet shows how the corresponding client interface - would look: -

    - - - - - - -

    Conditional Creates

    - -

    - The FHIR specification also allows "conditional creates". A conditional - create has an additional header called If-None-Exist - which the client will supply on the HTTP request. The client will - populate this header with a search URL such as Patient?identifier=foo. - See the FHIR specification for details on the semantics for correctly - implementing conditional create. -

    -

    - When a conditional create is detected (i.e. when the create request contains - a populated If-None-Exist header), if a method parameter annotated - with the - @ConditionalOperationParam - is detected, it will be populated with the value of this header. -

    - - - - - - -

    - Example URL and HTTP header to perform a conditional create: -
    - http://fhir.example.com/Patient
    If-None-Exist: Patient?identifier=system%7C0001
    -

    - -

    Prefer Header / Returning the resource body

    -

    - If you wish to allow your server to honour the Prefer - header, the same mechanism shown above for - Prefer Header for Updates should be used. -

    - -

    Accessing The Raw Resource Payload

    -

    - The create operation also supports access to the raw payload, - using the same semantics as raw payload access - for the update operation. -

    - - -
    - - - - - -
    - -

    - The - - search - - operation returns a bundle - with zero-to-many resources of a given type, matching a given set of parameters. -

    - - - -

    - The following example shows a search with no parameters. This operation - should return all resources of a given type (this obviously doesn't make - sense in all contexts, but - does for some resource types). -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient -

    - -
    - - -

    - To allow a search using given search parameters, add one or more parameters - to your search method and tag these parameters as either - @RequiredParam - or - @OptionalParam - . -

    - -

    - This annotation takes a "name" parameter which specifies the parameter's - name (as it will appear in the search URL). FHIR defines standardized parameter - names for each - resource, and these are available as constants on the - individual HAPI resource - classes. -

    - -

    - Parameters which take a string as their format should use the - StringParam - type. They may also use normal java String, although it is - not possible to use the :exact qualifier in that case. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient?family=SMITH -

    - -
    - - -

    - The "token" type is used for parameters which have two parts, such as - an idnetifier (which has a system URI, as well as the actual identifier) - or a code (which has a code system, as well as the actual code). - For example, the search below can be used to search by - identifier (e.g. search for an MRN). -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient?identifier=urn:foo|7000135 -

    - -
    - - - -

    - The FHIR specification provides a sytax for specifying - dates+times (but for simplicity we will just say dates here) - as search criteria. -

    - -

    - Dates may be optionally prefixed with a qualifier. For example, the - string - >=2011-01-02 - means any date on or after 2011-01-02. -

    - -

    - To accept a qualified date parameter, use the - DateParam parameter type. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Observation?birthdate=>=2011-01-02 -

    - -

    - Invoking a client of thie type involves the following syntax: -

    - - - - - - -
    - - - - -

    - A common scenario in searches is to allow searching for resources - with values (i.e timestamps) within a range of dates. -

    - -

    - FHIR allows for multiple parameters with the same key, and interprets - these as being an "AND" set. So, for example, a range of - date=>=2011-01-01&date=<2011-02-01 -
    - can be interpreted as any date within January 2011. -

    - -

    - The following snippet shows how to accept such a range, and combines it - with a specific identifier, which is a common scenario. (i.e. Give me a list - of observations for a - specific patient within a given date range) -

    - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Observation?subject.identifier=7000135&date=>=2011-01-01&date=<2011-02-01 -

    - -

    - Invoking a client of this type involves the following syntax: -

    - - - - - - -

    Unbounded Ranges

    - -

    - Note that when using a date range parameter, it is also possible for - the client to request an "unbounded" range. In other words, a range that - only a start date and no end - date, or vice versa. -

    - -

    - An example of this might be the following URL, which refers to any Observation - resources for the given MRN and having a date after 2011-01-01. -
    - http://fhir.example.com/Observation?subject.identifier=7000135&date=>=2011-01-01 -
    - When such a request is made of a server (or to make such a request from a client), - the - getLowerBound() - or - getUpperBound() - property of the - DateRangeParam - object will be set to - null - . -

    - -
    - - - -

    - Quantity parameters allow a number with units and a comparator -

    - -

    - The following snippet shows how to accept such a range, and combines it - with a specific identifier, which is a common scenario. (i.e. Give me a list - of observations for a - specific patient within a given date range) -

    - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Observation?value-quantity=<=123.2||mg -

    - -
    - - - -

    - Many search parameters refer to resource references. For instance, the Patient - parameter "provider" refers to the resource marked as the managing organization - for patients. -

    -

    - Reference parameters use the - ReferenceParam - type. Reference parameters are, in their most basic form, just a pointer to another - resource. For example, you might want to query for DiagnosticReport resources where the - subject (the Patient resource that the report is about) is Patient/123. The following - example shows a simple resource reference parameter in use. -

    - - - - - - -

    Chained Resource References

    - -

    - References may also support a "chained" value. This is a search parameter name - on the target resource. For example, you might want to search for DiagnosticReport - resources by subject, but use the subject's last name instead of their resource ID. - In this example, you are chaining "family" (the last name) to "subject" (the patient). - The net result in the query string would look like:
    - http://fhir.example.com/DiagnosticReport?subject.family=SMITH
    - What this query says is "fetch me all of the DiagnosticReport resources - where the subject (Patient) of the report has the family (name) of - 'SMITH'". -

    - -

    - There are two ways of dealing with chained parameters in your methods: static chains and - dynamic chains. Both are equally valid, although dyamic chains might lead to somewhat - more compact and readable code. -

    - - -

    Dynamic Chains

    - -

    - Chained values must be explicitly declared through the use - of a whitelist (or blacklist). The following example shows how to declare a - report with an allowable chained parameter: -

    - - - - - -

    - You may also specify the whitelist value of - "" to allow an empty chain (e.g. ther resource ID) - and this can be combined with other values, as shown below: -

    - - - - - - -

    - If you are handling multiple types of chained parameters in a single method, - you may want to convert the reference parameter type into something more - convenient before using its value. The following example shows how to do that. -

    - - - - - - -

    Static Chains

    - -

    - It is also possible to explicitly state a chained value right in the parameter name. - This is useful if you want to only support a search by a specific given chained - parameter. It has the added bonus that you can use the correct parameter type of - the chained parameter (in this case a TokenParameter because the Patient.identifier - parameter is a token) -

    - - - - - - - - - - -

    - Composite search parameters incorporate two parameters in a single - value. Each of those parameters will themselves have a parameter type. -

    - -

    - In the following example, Observation.name-value-date is shown. This parameter - is a composite of a string and a date. Note that the composite parameter types - (StringParam and DateParam) must be specified in both the annotation's - compositeTypes field, as well as the generic types for the - CompositeParam method parameter itself. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Observation?name-value-date=PROCTIME$2001-02-02 -

    - -
    - - - -

    - Search methods may take multiple parameters, and these parameters - may (or may not) be optional. - To add a second required parameter, annotate the - parameter with - @RequiredParam - . - To add an optional parameter (which will be passed in as - null - if no value - is supplied), annotate the method with - @OptionalParam - . -

    - -

    - You may annotate a method with any combination of as many @RequiredParam and as many @OptionalParam - parameters as you want. It is valid to have only @RequiredParam - parameters, or - only @OptionalParam parameters, or any combination of the two. -

    - -

    - If you wish to create a server that can accept any combination of a large number - of parameters, (this is how the various reference servers behave, as well as the - public HAPI server) - the easiest way to accomplish this is to simply create one method - with all allowable parameters, each annotated as @OptionalParam. -

    - -

    - On the other hand, if you have specific combinations of parameters you wish to - support (a common scenario if you are building FHIR on top of existing data sources - and only have certain indexes you can use) you could create multiple search methods, - each with specific required and optional parameters matching the database indexes. -

    - -

    - The following example shows a method with two parameters. -

    - - - - - - -

    - Example URLs to invoke this method: -
    - http://fhir.example.com/Patient?family=SMITH -
    - http://fhir.example.com/Patient?family=SMITH&given=JOHN -

    - - - - - -

    - It is possible to accept multiple values of a single parameter - as well. This is useful in cases when you want to return a list - of resources with criteria matching a list of - possible values. - See the - FHIR Specification - for more information. -

    - -

    - The FHIR specification allows two types of composite parameters: -

    -
      -
    • - Where a parameter may accept multiple comma separated values within a single value string - (e.g. - ?language=FR,NL - ) this is treated as an - OR - relationship, and - the search should return elements matching either one or the other. -
    • -
    • - Where a parameter may accept multiple value strings for the same parameter name - (e.g. - ?language=FR&language=NL - ) this is treated as an - AND - relationship, - and the search should return only elements matching both. -
    • -
    - -

    - It is worth noting that according to the FHIR specification, you can have an - AND relationship combining multiple OR relationships, but not vice-versa. In - other words, it's possible to support a search like - ("name" = ("joe" or "john")) AND ("age" = (11 or 12)) but not - a search like - ("language" = ("en" AND "fr") OR ("address" = ("Canada" AND "Quebec")) -

    - -

    OR Relationship Query Parameters

    - -

    - To accept a composite parameter, use a parameter type which implements the - IQueryParameterOr - interface. -

    -

    - Each parameter type (StringParam, TokenParam, etc.) has a corresponding parameter - which accepts an OR list of parameters. These types are called "[type]OrListParam", for example: - StringOrListParam and TokenOrListParam. -

    -

    - The following example shows a search for Observation by name, where a list of - names may be passed in (and the expectation is that the server will return Observations - that match any of these names): -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Observation?name=urn:fakenames|123,urn:fakenames|456 -

    - -

    AND Relationship Query Parameters

    - -

    - To accept a composite parameter, use a parameter type which implements the - IQueryParameterAnd - interface (which in turn encapsulates the corresponding IQueryParameterOr types). -

    -

    - An example follows which shows a search for Patients by address, where multiple string - lists may be supplied by the client. For example, the client might request that the - address match ("Montreal" OR "Sherbrooke") AND ("Quebec" OR "QC") using - the following query: -
    - http://fhir.example.com/Patient?address=Montreal,Sherbrooke&address=Quebec,QC -

    -

    - The following code shows how to receive this parameter using a - StringAndListParameter, - which can handle an AND list of multiple OR lists of strings. -

    - - - - - - -

    - Note that AND parameters join multiple OR parameters together, but - the inverse is not true. In other words, it is possible in FHIR - to use AND search parameters to specify a search criteria of - (A=1 OR A=2) AND (B=1 OR B=2) - but it is not possible to specify - (A=1 AND B=1) OR (A=2 AND B=2) (aside from - in very specific cases where a composite parameter has been - specifically defined). -

    - -

    AND Relationship Query Parameters for Dates

    - -

    - Dates are a bit of a special case, since it is a common scenario to want to match - a date range (which is really just an AND query on two qualified date parameters). - See the section below on date ranges - for an example of a DateRangeParameter. -

    - -
    - - - -

    - FHIR allows clients to request that specific linked resources be included - as contained resources, which means that they will be "embedded" in a special - container called - "contained" within the parent resource. -

    - -

    - HAPI allows you to add a parameter for accepting includes if you wish - to support them for specific search methods. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/DiagnosticReport?identifier=7000135&_include=DiagnosticReport.subject -

    - -

    - It is also possible to use a String type for the include parameter, - which is more convenient if only a single include (or null for none) - is all that is required. -

    - - - - - - -
    - - - -

    - To add support for reverse includes (via the _revinclude parameter), - use the same format as with the _include parameter (shown above) - but add reverse=true to the @IncludeParam - annotation, as shown below. -

    - - - - - - -
    - - - -

    - FHIR supports - named queries - , - which may have specific behaviour defined. The following example shows how to create a Search - operation with a name. -

    - -

    - This operation can only be invoked by explicitly specifying the given query name - in the request URL. Note that the query does not need to take any parameters. -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient?_query=namedQuery1&someparam=value -

    - -
    - - - -

    - FHIR supports - sorting - according to a specific set of rules. -

    - -

    - According to the specification, sorting is requested by the client using a - search param as the sort key. For example, when searching Patient resources, - a sort key of "given" requests the "given" search param as the sort key. That - param maps to the values in the field "Patient.name.given". -

    - -

    - Sort specifications can be passed into handler methods by adding a parameter - of type - SortSpec, - which has been annotated with the - @Sort - annotation, as shown in the following example: -

    - - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient?_identifier=urn:foo|123&_sort=given -

    - -
    - - - -

    - It is also possible to annotate search methods and/or parameters with - the - @Description - annotation. This annotation allows you to add a description of the method - and the individual parameters. These descriptions will be placed in the - server's conformance statement, which can be helpful to anyone who is developing - software against your server. -

    - - - - - - -
    - - -
    - - - - - -
    - -

    - The - - validate - - operation tests whether a resource passes business validation, and would be - acceptable for saving to a server (e.g. by a create or update method). -

    -

    - Note on FHIR versions: - In FHIR DSTU1 the validate operation used a URL resembling http://example.com/Patient/_validate - with a resource in the HTTP POST body. In FHIR DSTU2, validate has been changed to use the - extended operation mechanism. It now uses a URL - resembling http://example.com/Patient/$validate and takes a - Parameters resource as input in the method body.

    - The mechanism described below may be used for both DSTU1 and DSTU2+ servers, and HAPI - will automatically use the correct form depending on what FHIR version the - server is configured to use. -

    -

    - Validate methods must be annotated with the - @Validate - annotation, and have a parameter annotated with the - @ResourceParam - annotation. This parameter contains the resource instance to be created. -

    -

    - Validate methods may optionally also have a parameter - oftype IdDt annotated with the - @IdParam - annotation. This parameter contains the resource ID (see the - FHIR specification - for details on how this is used) -

    -

    - Validate methods must return normally if the resource validates successfully, - or throw an - UnprocessableEntityException - or - InvalidRequestException - if the validation fails. -

    -

    - Validate methods must return either: -

    -
      -
    • - void - - The method should throw an exception for a validation failure, or return normally. -
    • -
    • - An object of type - MethodOutcome - . The - MethodOutcome may optionally be populated with an OperationOutcome resource, which - will be returned to the client if it exists. -
    • -
    -

    - The following snippet shows how to define a server validate method: -

    - - - - - - -

    - In the example above, only the @ResourceParam parameter is technically required, but - in DSTU2 you are encouraged to also add the following parameters: -

    -
      -
    • @Validate.Mode ValidationModeEnum mode - This is the validation mode (see the FHIR specification for information on this)
    • -
    • @Validate.Profile String profile - This is the profile to validate against (see the FHIR specification for more information on this)
    • -
    - -

    - Example URL to invoke this method (this would be invoked using an HTTP POST, - with a Parameters resource in the POST body): -
    - http://fhir.example.com/Patient/$validate -

    - - -
    - - - - - -
    - -

    - FHIR defines that a FHIR Server must be able to export a conformance statement, - which is an instance of the - Conformance - resource describing the server itself. -

    - -

    - The HAPI FHIR RESTful server will automatically export such - a conformance statement. See the - RESTful Server - documentation for more information. -

    - -

    - If you wish to override this default behaviour by creating - your own metadata provider, you simply need to define a class - with a method annotated using the - @Metadata - annotation. -

    - - - - - -

    - To create a Client which can retrieve a Server's conformance - statement is simple. First, define your Client Interface, using - the @Metadata annotation: -

    - - - - - -

    - Then use the standard - RESTful Client - mechanism for instantiating - a client: -

    - - - - - - -
    - - - - - -
    - -

    - The - transaction - action is among the most challenging parts of the FHIR specification to implement. It allows the - user to submit a bundle containing a number of resources to be created/updated/deleted as a single - atomic transaction. -

    - -

    - HAPI provides a skeleton for implementing this action, although most of the effort - will depend on the underlying implementation. The following example shows - how to define a transaction method. -

    - - - - - -

    - Transaction methods require one parameter annotated with @TransactionParam, and that - parameter may be of type List<IResource> or Bundle. -

    - -

    - In terms of actually implementing the method, unfortunately there is only so much help - HAPI will give you. One might expect HAPI to automatically delegate the individual - operations in the transaction to other methods on the server but at this point it - does not do that. There is a lot that transaction needs to handle - (making everything atomic, replacing placeholder IDs across multiple resources - which may even be circular, handling operations in the right order) and - so far we have not found a way for the framework to do this in a generic way. -

    -

    - What it comes down to is the fact that transaction is a tricky thing to implement. - For what it's worth, you could look at our JPA module's "transaction" method in - our source repository - to see how we implemented transaction in the JPA server. -

    - -

    - Example URL to invoke this method: -
    - POST http://fhir.example.com/
    - (note that the content of this POST will be a bundle) -

    - - - -
    - - - - - -
    - -

    - Not yet implemented - Get in touch if you would like to help! -

    - -
    -
    - - - - - -
    - -

    - The - - history - - operation retrieves a historical collection of all versions of a single resource - (instance history) - , all resources of a given type - (type history) - , - or all resources of any type on a server - (server history) - . -

    -

    - History methods must be annotated with the - @History - annotation, and will have additional requirements depending on the kind - of history method intended: -

    -
      -
    • - For an - Instance History - method, the method must have a parameter - annotated with the - @IdParam - annotation, indicating the ID of the resource for which to return history. -
        -
      • - For a server - implementation, the method must either be defined in a - resource provider - or have a - type() - value in the @History annotation if it is - defined in a - plain provider - . -
      • -
      -
    • -
    • - For a - Type History - method, the method must not have any @IdParam parameter. -
        -
      • - For a server - implementation, the method must either be defined in a - resource provider - or have a - type() - value in the @History annotation if it is - defined in a - plain provider - . -
      • -
      -
    • -
    • - For a - Server History - method, the method must not have any @IdParam parameter, and - must not have a - type() - value specified in - the @History annotation. -
        -
      • - In a server implementation, the method must - be defined in a - plain provider - . -
      • -
      -
    • -
    -

    - The following snippet shows how to define a history method on a server. Note that - the following parameters are both optional, but may be useful in - implementing the history operation: -

    - -
  • - The @Since method argument implements the _since - parameter and should be of type DateTimeDt or DateTimeType -
  • -
  • - The @At method argument implements the _at - parameter and may be of type - DateRangeParam, - DateTimeDt or DateTimeType -
  • -
    - - - - - - -

    - The following snippet shows how to define various history methods in a client. -

    - - - - - - - -
    - - -
    - -

    - HAPI FHIR includes basic support for the - - patch - - operation. This support allows you to perform patches, but does not - include logic to actually implement resource patching in the server - framework (note that the JPA server does include a patch implementation). -

    -

    - The following snippet shows how to define a patch method on a server: -

    - - - - - - -
    - - - - - - -
    - -

    - When implementing a server operation, there are a number of failure conditions - specified. For example, an - Instance Read - request might specify an unknown - resource ID, or a - Type Create - request might contain an - invalid resource which can not be created. -

    -

    - In these cases, an appropriate exception should be thrown. The HAPI RESTful - API includes a set of exceptions extending - BaseServerResponseException - which represent specific HTTP failure codes. -

    -

    - See the - Exceptions List - for a complete list of these exceptions. Note that these exceptions are all - unchecked - exceptions, so they do not need to ne explicitly declared in the method - signature. -

    - - -
    - - - - - -
    - -

    - FHIR RESTful servers may support a feature known as tagging. Tags are a set of - named flags called "terms" (with an optional accompanying human friendly name - called a "label", - and an optional namespace called a "scheme"). -

    -

    - Tags have very specific semantics, which may not be - obvious simply by using the HAPI API. It is important to review the specification - pages - here - and - here - before attempting to implement tagging in your own applications. -

    - - - -

    - Tags are stored within a resource object, in the - IResource.html#getResourceMetadata() - map, under the key - TAG_LIST. -

    - -

    - In a server implementation, you may populate your tags into the - returned resource(s) and HAPI will automatically place these tags into - the response headers (for read/vread) or the bundle category tags (for search). - The following example illustrates how to return tags from a server method. This - example shows how to supply tags in a read method, but the same approach applies - to vread and search operations as well. -

    - - - - - - -

    - In a client operation, you simply call the read/vread/search method as you - normally would (as described above), and if any tags have been returned - by the server, these may be accessed from the resource metadata. -

    - - - - - - -
    - - - -

    - Within a Type Create - or Instance Update method, it is - possible for the client to specify a set of tags to be stored - along with the saved resource instance. -

    -

    - Note that FHIR specifies that in an update method, any tags supplied - by the client are copied to the newly saved version, as well as any - tags the existing version had. -

    - -

    - To work with tags in a create/update method, the pattern used in the - read examples above is simply revered. In a server, the resource which - is passed in will be populated with any tags that the client supplied: -

    - - - - - - -
    - - - -

    - FHIR also provides a number of operations to interact directly - with tags. These methods may be used to retrieve lists of tags - that are available on the server, or to add or remove tags from - resources without interacting directly with those resources. -

    - -

    - On a server these methods may be placed in a plain provider, or in a resource - provider in the case of resource type specific methods. -

    - - - - - -

    - On a client, the methods are defined in the exact same way, except that - there is no method body in the client interface. -

    - -
    - -
    - - - - - -
    - - The _summary and _elements parameters are - automatically handled by the server, so no coding is required to make this - work. If you wish to add parameters to manually handle these fields however, - the following example shows how to access these. - - - - - - - - -
    - - - - - -
    - -

    - FHIR defines a mechanism for logically grouping - resources together called compartments. -

    -

    - To define a search by compartment, you simply need to add the compartmentName attribute - to the @Search annotation, and add an @IdParam parameter. -

    -

    - The following example shows a search method in a resource provider which returns - a compartment. Note that you may also add @RequiredParam and - @OptionalParam parameters to your compartment search method. -

    - - - - - -

    - Example URL to invoke this method: -
    - http://fhir.example.com/Patient/123/Condition -

    - - -
    - -
    - -

    - FHIR extended operations are a special type of RPC-style invocation you - can perform against a FHIR server, type, or resource instance. These invocations - take a - Parameters - resource as input, and return either another Parameters resource or a different resource type. -

    - -

    - To define an operation, a method should be placed in a - Resource Provider - class if the operation works against a resource type (e.g. Patient) - or a resource instance (e.g. Patient/123), or on a - Plain Provider - if the operation works against the server (i.e. it is global and not resource specific). -

    - - - -

    - To implement a type-specific operation, - the method should be annotated with the - @Operation tag, and should have an - @OperationParam tag for each named parameter that - the input Parameters resource may be populated with. The following - example shows how to implement the Patient/$everything - method, defined in the FHIR specification. -

    - - - - - -

    - Example URL to invoke this operation (HTTP request body is Parameters resource): -
    - POST http://fhir.example.com/Patient/$everything -

    - -
    - - - -

    - To create an instance-specific operation (an operation which takes the - ID of a specific resource instance as a part of its request URL), - you can add a parameter annotated with the @IdParam annotation, - of type IdDt. The following example show how to implement the - Patient/[id]/$everything operation. -

    - - - - - -

    - Example URL to invoke this operation (HTTP request body is Parameters resource): -
    - http://fhir.example.com/Patient/123/$everything -

    - -
    - - - -

    - FHIR allows operation parameters to be of a - Search parameter type - (e.g. token) instead of a FHIR datatype (e.g. Coding). -

    -

    - To use a search parameter type, any of the search parameter - types listed in - Search - may be used. For example, the following is a simple operation method declaration - using search parameters: -

    - - - - - -

    - Example URL to invoke this operation (HTTP request body is Parameters resource): -
    - http://fhir.example.com/$find-matches?date=2011-01-02&code=http://system|value -

    - -

    - It is also fine to use collection types for search parameter types - if you want to be able to accept multiple values. For example, - a List<TokenParam> could be used if you want - to allow multiple repetitions of a given token parameter (this is - analogous to the "AND" semantics in a search). - A TokenOrListParam could be used if you want to allow - multiple values within a single repetition, separated by comma (this - is analogous to "OR" semantics in a search). -

    -

    For example:

    - - - - - -
    - - - -

    - Server operations do not operate on a specific resource type or - instance, but rather operate globally on the server itself. The following - example show how to implement the - $closure operation. Note that the concept parameter - in the example has a cardinality of 0..* according to the - FHIR specification, so a List<Coding> - is used as the parameter type. -

    - - - - - -

    - Example URL to invoke this operation (HTTP request body is Parameters resource): -
    - http://fhir.example.com/$closure -

    - -
    - - - -

    - In all of the Extended Operation examples above, the return - type specified for the operation is a single Resource instance. This is - a common pattern in FHIR defined operations. However, it is also - possible for an extended operation to be defined with multiple - and/or repeating OUT parameters. In this case, you can return - a Parameters resource directly. -

    - -
    - - - -

    - The FHIR specification notes that if an operation is - idempotent - (which means roughly that it does not modity any data or state - on the server) then it may be invoked with an HTTP GET - instead of an HTTP POST. -

    -

    - If you are implementing an operation which is idempotent, - you should mark your operation with - idempotent=true, - as shown in some of the examples above. The default value - for this flag is false, meaning that operations - will not support HTTP GET by default. -

    -

    - Note that the HTTP GET form is only supported if the operation - has only primitive parameters (no complex parameters or resource parameters). - If a client makes a request containing a complex parameter, the - server will respond with an HTTP 405 Method Not Supported. -

    -
    - - - -

    - For some operations you may wish to bypass the HAPI FHIR - standard request parsing and/or response generation. In this - case you may use the manualRequest() and - manualResponse() attributes on the @Operation - annotation. -

    -

    - The following example shows an operation that parses the - request and generates a response (by echoing back the request). -

    - - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_server.xml b/src/site/xdoc/doc_rest_server.xml deleted file mode 100644 index dcbf88717ba..00000000000 --- a/src/site/xdoc/doc_rest_server.xml +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - - RESTful Server - James Agnew - - - - - -
    - -

    - HAPI provides a built-in mechanism for adding FHIR's RESTful Server - capabilities to your applications. The HAPI RESTful Server is Servlet - based, so it should be easy to deploy to any of the many compliant - containers that exist. -

    - -

    - Setup is mostly done using simple annotations, which means that it should - be possible to create a FHIR compliant server quickly and easily. -

    - - - - -

    - The first step in creating a FHIR RESTful Server is to define one or - more resource providers. A resource provider is a class which is - able to supply exactly one type of resource to be served up. -

    - -

    - For example, if you wish to allow your server to serve up Patient, - Observation and Location resources, you will need three resource - providers. -

    - -

    - A Resource provider class must implement the - IResourceProvider interface, - and will contain one or more methods which have been - annotated with special annotations indicating which RESTful operation - that method supports. Below is a simple example of a resource provider - which supports the - read - operation (i.e. retrieve a single resource by ID) as well as the - search - operation (i.e. find any resources matching a given criteria) for a specific - search criteria. -

    - - - - - - - - - -

    - You will probably wish to add more methods - to your resource provider. See - RESTful Operations for - lots more examples of how to add methods for various operations. -

    -

    - For now, we will move on to the next step though, which is creating - the actual server to hold your resource providers and deploying that. - Once you have this working, you might want to come back and - start adding other operations. -

    - -
    - - - -

    - Once your resource providers are created, your next step is to - define a server class. -

    - -

    - HAPI provides a class called - RestfulServer, which - is a specialized Java Servlet. To create a server, you simply create a class - which extends RestfulServer as shown in the example below. -

    - - - - - - - -
    - - - - -

    - Defining one provider per resource is a good strategy to keep - code readable and maintainable, but it is also possible to put - methods for multiple resource types in a provider class. Providers - which do not implement the - IResourceProvider - (and therefore are not bound to one specific resource type) are known as - Plain Providers. -

    -

    - A plain provider may implement any - RESTful operation, but will generally - need to explicitly state what type of resource it applies to. If the method directly - returns a resource or a collection of resources (as in an - instance read or - type search operation) - the resource type will be inferred automatically. If the method returns a - Bundle - resource, it is necessary to explicitly specify the resource type - in the method annotation. The following example shows this: -

    - - - - - -

    - In addition, some methods are not resource specific. For example, the - system history operation - returns historical versions of all resource types on a server, - so it needs to be defined in a plain provider. -

    - -

    - Once you have defined your plain providers, they are passed to the - server in a similar way to the resource providers. -

    - - - - - - - - -

    - The server will return data in a number of places that includes the - complete "identity" of a resource. Identity in this case refers to the - web address that a user can use to access the resource. -

    -

    - For instance, if your server is hosted at - http://foo.com/fhir - and your resource provider returns a Patient resource with the ID "123", - the server should translate that ID to "http://foo.com/fhir/Patient/123". -

    -

    - The server will attempt to determine what the base URL should be based on - what the request it receives looks like, but if it is not getting - the right address you may wish to use a different "address strategy". -

    -

    - The simplest way to do this is to configure the server to use a hardcoded - base URL, which means that the server won't try to figure out the - "http://foo.com/fhir" part of the URL but will instead just use a fixed - value you supply. This is shown in the following example: -

    - - - - - -

    Other Strategies

    -

    - See the - IServerAddressStrategy - JavaDoc (specifically the list of "All Known Implementing Classes") to see - other strategies that are available. -

    - -
    - - - -

    - Once you have created your resource providers and your restful server class, - you can bundle these into a WAR file and you are ready to deploy to - any JEE container (Tomcat, Websphere, Glassfish, etc). -

    - -

    - Bundling a servlet into a WAR file and deploying it to an application server - is beyond the scope of this page, but there are many good tutorials on how - to do this. -

    - -
    - -
    - -
    - -

    - The HAPI FHIR RESTful Server will automatically export a - capability statement (or a - conformance statement for DSTU2 and prior), - as required by the - FHIR Specification. -

    -

    - This statement is automatically generated based on the various annotated methods which are - provided to the server. This behaviour may be modified by creating a new class - containing a method annotated with a - @Metadata Operation - and then passing an instance of that class to the - setServerConformanceProvider method - on your server. -

    - - - -

    - If you have a need to add your own content (special extensions, etc.) to your - server's conformance statement, but still want to take advantage of HAPI's automatic - conformance generation, you may wish to extend - ServerConformanceProvider. -

    - -

    - In your own class extending this class, you can override the getServerConformance() method - to provide your own implementation. In this method, call - super.getServerConformance() to obtain the built-in conformance statement and then - add your own information to it. -

    - -

    - Note that if you are adding items during each invocation you should be aware that by default the - same instance is cached by ServerConformanceProvider. This can result in an ever-growing - conformance statement. You must call setCache(false); in - the constructor of your new conformance provider to avoid this behaviour. -

    - -
    - -
    - -
    - -

    - The Search and History operations both return a bundle - which contain zero or more resources. FHIR RESTful servers may optionaly - support paging responses, meaning that (for example) if a search returns 500 - resources, the server can return a bundle containing only the first 20 and a link - which will return the next 20, etc. -

    - -

    - By default, RESTful servers will not page, but will rather return all resources - immediately in a single bundle. There are two complimentary parts to the paging support: paging - prividers, and bundle providers. -

    - - - -

    - To support paging, a server must have an IPagingProvider - implementation set. The paging provider is used to store resource - return lists between incoming calls by clients. -

    - -

    - A paging provider provides two key methods: -

    -
      -
    • - storeResultList, which takes a bundle provider (see below) - and stores it for later retrieval. This might be by simply keeping it - in memory, but it might also store it on disk, in a database, etc. This - method must return a textual ID which can be used to retrieve this - list later. -
    • -
    • - retrieveResultList, which takes an ID obtained by a - previous call to storeResultList and returns the corresponding - result list. -
    • -
    - -

    - Note that the IPagingProvider is intended to be simple and implementable and - you are encouraged to provide your own implementations. -

    - -

    - The following example shows a server implementation with paging - support. -

    - - - - - - -
    - - - -

    - If a server supports a paging provider, a further optimization is to - also use a bundle provider. A bundle provider simply takes the place of - the List<IResource> return type in your provider methods. -

    - -

    - When using a bundle provider however, the server will only request small sublists - of resources as they are actually being returned. This allows servers to optimize - by not loading all resources into memory until they are actually needed. -

    - -

    - One implementation of a bundle provider is shown below. This provider example works - by only keeping the resource IDs in memory, but there are other possible implementation - strategies that would work as well. -

    - -

    - Note that the IBundleProvider is intended to be simple and implementable and - you are encouraged to provide your own implementations. -

    - - - - - - -
    - - - -

    - By default, the paging system uses parameters that are embedded into the - page links for the start index and the page size. This is useful for servers that - can retrieve arbitrary offsets within a search result. For example, - if a given search can easily retrieve "items 5-10 from the given search", then - the mechanism above works well. -

    -

    - Another option is to use "named pages", meaning that each - page is simply assigned an ID by the server, and the next/previous - page is requested using this ID. -

    -

    - In order to support named pages, the IPagingProvider must - implement the - retrieveResultList(String theSearchId, String thePageId) - method. -

    -

    - Then, individual search/history methods may return a - BundleProviderWithNamedPages instead of a simple - IBundleProvider. -

    -
    - -
    - - -
    - -

    - Different RESTful methods will have different requirements - in terms of the method parameters they require, as described - in the RESTful Operations - page. -

    - -

    - In addition, there are several parameters you may add - in order to meet specific needs of your application. -

    - - - -

    - In some cases, it may be useful to have access to the - underlying HttpServletRequest and/or HttpServletResponse - objects. These may be added by simply adding one or both - of these objects as method parameters. -

    - - - - - - -
    - - - -

    - FHIR allows for the a number of special behaviours where only certain - portions of resources are returned, instead of the entire resource body. - These behaviours are automatically supported in HAPI (as of HAPI 1.2) - and no additional effort needs to be taken. -

    - -

    - The following behaviours are automatically supported by the HAPI server: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ParameterDescription
    _summary=true - Resources will be returned with any elements not marked as summary elements - omitted. -
    _summary=text - Only the narrative portion of returned resources will be returned. For a read/vread - operation, the narrative will be served with a content type of text/html. - for other operations, a Bundle will be returned but resources will only include - the text element. -
    _summary=data - The narrative (text) portion of the resource will be omitted. -
    _summary=count - For a search, only Bundle.count will be returned. -
    _elements=[element names] - Only the given top level elements of returned resources will be returned, e.g for - a Patient search: _elements=name,contact -
    -
    - -
    - - - -
    - -

    - Within your RESTful operations, you will generally be returning - resources or bundles of resources under normal operation. During - execution you may also need to propagate errors back to the client - for a variety of reasons. -

    - - -

    - By default, HAPI generates appropriate error responses for a several - built-in conditions. For example, if the user makes a request for - a resource type that does not exist, or tries to perform a search - using an invalid parameter, HAPI will automatically generate - an HTTP 400 Invalid Request, and provide an - OperationOutcome resource as response containing details about - the error. -

    - -

    - Similarly, if your method implementation throws any exceptions - (checked or unchecked) instead - of returning normally, the server will usually* automatically - generate an HTTP 500 Internal Error and generate - an OperationOutcome with details about the exception. -

    - -

    - * Note that certain exception types will generate other response - codes, as explained below. -

    -
    - - -

    - In many cases, you will want to respond to client requests - with a specific HTTP error code (and possibly your own error message - too). Sometimes this is a requirement of the FHIR specification - (e.g. the "validate" operation requires a response of - HTTP 422 Unprocessable Entity if the validation fails). - Sometimes this is simply a requirement of your specific application - (e.g. you want to provide application specific HTTP status codes for - certain types of errors) -

    - -

    - To customize the error that is returned by HAPI's server methods, you - must throw an exception which extends HAPI's - BaseServerResponseException - class. Various exceptions which extend this class will generate - a different HTTP status code. -

    -

    - For example, the - ResourceNotFoundException - causes HAPI to return an HTTP 404 Resource Not Found. A complete list - of available exceptions is available - here. -

    -

    - If you wish to return an HTTP status code for which there is no - pre-defined exception, you may throw the - UnclassifiedServerFailureException, - which allows you to return any status code you wish. -

    -
    - -

    - By default, HAPI will automatically generate an OperationOutcome - which contains details about the exception that was thrown. You may - wish to provide your own OperationOutcome instead. In this - case, you may pass one into the constructor of the - exception you are throwing. -

    - - - - -
    -
    - -
    - -

    - Your RESTful server should now support the methods you have declared. Here are a - few helpful tricks for interacting with the server: -

    - -

    - Pretty Printing: The HAPI RESTful server supports a called - _pretty, which can be used to request that responses be pretty-printed (indented for - easy reading by humans) by setting the value to true. This can be useful in testing. An example URL for this might be:
    - http://example.com/fhir/Patient/_search?name=TESTING&_pretty=true -

    - -
    - -
    - -

    - Server operations will often return a resource or a bundle of resources. These - types will contain one or more resource instances, but also specify a set of - metadata describing that resource. -

    - -

    - For example, resources have a "published" and "updated" date, referring to - the date/time the resource was originally created and the date/time the - resource was last updated respectively. For operations which return a single - resource, these values are returned via HTTP headers. For operations which - return a bundle, these values are returned via elements within the - bundle's "entry" tag. -

    - -

    - Bundles may also contain a set of links, such as an "alternate" link to - a resource, or a "search" link. -

    - -

    - Populating these metadata elements is done via the - IResource#getResourceMetadata() - method. The following example shows how to set various metadata elements on - a resource being returned. -

    - - - - - -
    - -
    - -

    - Resource providers may optionally want to be notified when the server they are registered - with is being destroyed, so that they can perform cleanup. In this case, a method - annotated with the - @Destroy annotation can be added (this method should be public, return void, - and take no parameters). -

    -

    - This method will be invoked once by the RestfulServer when it is shutting down. -

    - -
    - -
    - -

    - A complete example showing how to implement a RESTful server can - be found in our Git repo here: - https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example -

    - -

    - Hopefully this will be available as a separate download soon, but currently it may - be used to demonstrate a fully working server project. -

    - -
    - - - -
    - -

    - If you wish to allow a single endpoint to support multiple - tenants, you may supply the server with a multitenancy provider. -

    -

    - This means that additional logic will be performed during request - parsing to determine a tenant ID, which will be supplied to - resource providers. This can be useful in servers that have - multiple distinct logical pools of resources hosted on the - same infrastructure. -

    - - -

    - Using URL Base Multitenancy means that an additional element - is added to the path of each resource between the server base - URL and the resource name. For example, if your restful server - is deployed to http://acme.org:8080/baseDstu3 - and user wished to access Patient 123 for Tenant "FOO", the - resource ID (and URL to fetch that resource) would be - http://acme.org:8080/FOO/Patient/123. -

    - -

    - To enable this mode on your server, simply provide the - UrlBaseTenantIdentificationStrategy to the - server as shown below: -

    - - - - - - -

    - Your resource providers can then use a RequestDetails parameter to - determine the tenant ID: -

    - - - - - -
    - -
    - -
    - -

    - The HAPI FHIR server may be configured using the - RestfulServer#setElementsSupport to enable extended - support for the _elements filter. -

    -

    - In standard mode, elements are supported exactly as described in the - Elements Documentation - in the FHIR specification. -

    -

    - In extended mode, HAPI FHIR provides the same behaviour as described in the - FHIR specification, but also enabled the following additional options: -

    -
      -
    • - Values may be prepended using Resource names in order to apply the - elements filter to multiple resources. For example, the following - parameter could be used to apply elements filtering to both the - DiagnosticReport and Observation resource in a search result:
      - _elements=DiagnosticReport.subject,DiagnosticReport.result,Observation.value -
    • -
    • - Values may be prepended with a wildcard star in order to apply them - to all resource types. For example, the following parameter could - be used to include the subject field in all resource - types:
      - _elements=*.subject -
    • -
    • - Values may include complex paths. For example, the following parameter could - be used to include only the code on a coded element:
      - _elements=Procedure.reasonCode.coding.code -
    • -
    • - Elements may be excluded using the :exclude modifier - on the elements parameter. For example, the following parameter - could be used to remove the resource metadata (meta) element from - all resources in the response:
      - _elements:exclude=*.meta
      - Note that this can be used to suppress the SUBSETTED tag - which is automatically added to resources when an _elements - parameter is applied. -
    • -
    -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_server_interceptor.xml b/src/site/xdoc/doc_rest_server_interceptor.xml deleted file mode 100644 index 85518a12400..00000000000 --- a/src/site/xdoc/doc_rest_server_interceptor.xml +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - Server Interceptors - James Agnew - - - - - -
    - -

    - The RESTful server provides a powerful mechanism for adding cross-cutting behaviour - (e.g. requests, such as authnorization, auditing, fancy output, logging, etc.) - to each incoming request that it processes. This mechanism consists of defining one or - more interceptors that will be invoked at defined points in the processing of - each incoming request. -

    - - Interceptors - -

    - Interceptors will intercept the incoming request, and can take action such as - logging or auditing it, or examining/injecting headers. They can optionally choose - to handle the request directly and the cancel any subsequent processing (in other words, - the interceptor can choose to supply a response to the client, and can then signal - to the server that it does not need to do so). -

    -

    - Interceptors - may also be notified of responses prior to those responses being served to a client, - and may audit or even cancel the response. The diagram on the right shows the - lifecycle of a normal (non failing) request which is subject to an interceptor. -

    - -

    - Interceptors must implement the - IServerInterceptor - interface (or extend the convenience - InterceptorAdapter - class provided). The RESTful server will normally invoke the interceptor at several - points in the execution of the client request. -

    - -
      -
    • - Before any processing at all is performed on the request, - incomingRequestPreProcessed will be invoked. This can be useful - if you wish to handle some requests completely outside of HAPI's processing - mechanism. -
        -
      • - If this method returns true, processing continues to the - next interceptor, and ultimately to the next phase of processing. -
      • -
      • - If this method returns false, processing stops immediately. - This is useful if the interceptor wishes to supply its own response - by directly calling methods on the HttpServletResponse -
      • -
      • - If this method throws any subclass of - BaseServerResponseException, - processing is stopped immedicately and the corresponding status is returned to the client. - This is useful if an interceptor wishes to abort the request (e.g. because - it did not detect valid credentials) -
      • -
      -
    • -
    • - Once the request is classified (meaning that the URL and request headers are - examined to determine exactly what kind of request is being made), - incomingRequestPostProcessed will be invoked. This method has - an additional parameter, the - RequestDetails - object which contains details about what operation is about to be - called, and what request parameters were receievd with that request. -
        -
      • - If this method returns true, processing continues to the - next interceptor, and ultimately to the next phase of processing. -
      • -
      • - If this method returns false, processing stops immediately. - This is useful if the interceptor wishes to supply its own response - by directly calling methods on the HttpServletResponse -
      • -
      • - If this method throws any subclass of - BaseServerResponseException, - processing is stopped immedicately and the corresponding status is returned to the client. - This is useful if an interceptor wishes to abort the request (e.g. because - it did not detect valid credentials) -
      • -
      -
    • -
    • - Once the request is being handled, - incomingRequestPreHandled will be invoked. This method is useful in that - it provides details about the FHIR operation being invoked (e.g. is this a "read" or a "create"? what - is the resource type and ID of the resource being accessed, etc.). This method can be - useful for adding finer grained access controls. Note that incomingRequestPreHandled - is not able to directly supply a response, but it may throw a - BaseServerResponseException - to abort processing. -
    • -
    • - After the operation is handled (by invoking the corresponding ResourceProvider or PlainProvider method), - but before the actual response is returned to the client, - the outgoingResponse method is invoked. - This method also has details about the request in its parameters, but also - receives a copy of the response that is about to be returned. Note that - there are three implementations of outgoingResponse: The server - will invoke the one which corresponds to the response type - of the operation being invoked (resource, bundle, etc.) -
    • -
    - -
    - - - Interceptors - -

    - In the event of an exception being thrown within the server, the interceptor - method - handleException - will be called. This applies both to HAPI-FHIR defined exceptions thrown within resource provider methods - you have created as well as unexpected exceptions such as NullPointerException thrown - at any point in the handling chain. -

    -

    - In general, you will want to return true from the handleException - method, which means that processing continues normally (RestfulServer will return an - HTTP 4xx or 5xx response automatically depending on the specific exception which was thrown). -

    -

    - However, you may override the server's built-in exception handling by returning - false. In this case, you must provide your own response by - interacting with the HttpServletResponse object which is - passed in. -

    -
    - -
    - - -

    - To register an interceptor to the server, simply call - either registerInterceptor or setInterceptors - on your RestfulServer instance. -

    -

    - Note that order is important: The server will invoke - incomingRequestPreProcessed and incomingRequestPostProcessed - in the same order that they are registered to the server. The server will - invoke outgoingResponse in the reverse order to the - order in which the interceptors were registered. This means that interceptors - can be thought of as "wrapping" the request. -

    - -
    - -
    - -
    - -

    - HAPI also provides built-in interceptors which may be useful. Links to the code for each interceptor - is also provided, to give examples of how interceptors are written. -

    - - - - -

    - The - LoggingInterceptor - (code) - can be used to generate a new log line (via SLF4j) for each incoming request. LoggingInterceptor - provides a flexible message format that can be used to provide a customized level - of detail about each incoming request. -

    - -

    - The following example shows how to register a logging interceptor within - a FHIR RESTful server. -

    - - - - - -

    - This interceptor will then produce output similar to the following: -

    - - - - - - - -

    - The - ExceptionHandlingInterceptor - (code) - can be used to customize what is returned to the client and what is logged when the server throws an - exception for any reason (including routine things like UnprocessableEntityExceptions thrown as a matter of - normal processing in a create method, but also including unexpected NullPointerExceptions thrown by client code). -

    - -

    - The following example shows how to register an exception handling interceptor within - a FHIR RESTful server. -

    - - - - - - - - - -

    - The - ResponseHighlighterInterceptor - (code) - detects when a request is coming from a browser and returns HTML with syntax highlighted XML/JSON instead - of just the raw text. In other words, if a user uses a browser to request "http://foo/Patient/1" by typing - this address into their URL bar, they will get nice formatted HTML back with a human readable version - of the content. This is helpful for testers. -

    -

    - To see an example of how this looks, see our demo server using the following example - query: - http://fhirtest.uhn.ca/baseDstu2/Patient -

    -

    - The following example shows how to register this interceptor within - a FHIR RESTful server. -

    - - - - - -
    - - - -

    - The - RequestValidatingInterceptor - and - ResponseValidatingInterceptor - can be used to perform validation of resources on their way into and out of the server respectively. -

    -

    - The RequestValidatingInterceptor looks at resources coming into the server (e.g. for create, - update, $operations, transactions, etc.) and validates them. The ResponseValidatingInterceptor - looks at resources being returned by the server (e.g. for read, search, $operations, etc.) and - validates them. -

    -

    - These interceptors can be configured to add headers to the response, fail the response - (returning an HTTP 422 and throwing an exception in the process), or to add to the - OperationOutcome returned by the server. -

    -

    - See the Validation Page for information on - available - IValidatorModule - validation modules. Any of the Resource Validators - listed on that page can be enabled in these interceptors (note that the Parser Validators - can not). -

    -

    - The following example shows how to register this interceptor within - a FHIR RESTful server. -

    - - - - - -
    - - - -

    - HAPI FHIR includes an interceptor which can be used to - implement CORS support on your server. See HAPI's - CORS Documentation for information - on how to use this interceptor. -

    - -
    - - - -

    - Some security audit tools require that servers return an HTTP 405 if - an unsupported HTTP verb is received (e.g. TRACE). The - BanUnsupprtedHttpMethodsInterceptor - (code) - can be used to accomplish this. -

    - -
    - - - -

    - If you wish to override the value of Resource.meta.source using the value - supplied in an HTTP header, you can use the - CaptureResourceSourceFromHeaderInterceptor - (code) - to accomplish this. -

    - -
    - -
    - -
    - -

    - Creating your own interceptors is easy. HAPI-FHIR provides a class called - InterceptorAdapter which you can extend and then override any - methods you wish. The following example shows a simple request counter. -

    - - - - - -

    - The following example shows an exception handling interceptor which - overrides the built-in exception handling by providing a custom response. -

    - - - - - -
    - -
    - -

    - The HAPI JPA Server is an added layer on top of the HAPI - REST server framework. When you -

    - -

    - When an interceptor is registered against a RestfulServer which is backed by the - HAPI JPA Server, - the incomingRequestPreHandled method will be called once for most - operations (e.g. a FHIR create), but in the case where the client - performs a FHIR transaction that method might be called multiple - times over the course of a single client invocation. For example if the transaction - contained a single create, the incomingRequestPreHandled method will - be called twice: once to indicate the transaction, and once to indicate the create. -

    - -

    - This behaviour can be useful in cases where you want to audit exactly what was done - over the course of a request. Since a transaction can contain creates, updates, and - even more nested transactions, this behaviour ensures that you are notified for each - activity. -

    - -

    - You may also choose to create interceptors which implement the - more specialized - IJpaServerInterceptor - interface, as this interceptor adds additional methods which are called during the JPA - lifecycle. -

    - -

    - Note that this documentation used to erroneously suggest that in order to achieve - this behaviour you needed to register the interceptor with the DaoConfig. In actual fact this - did not make any difference, and registering interceptors with the DaoConfig has now been - deprecated since it does not achieve anything extra. -

    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_server_jaxrs.xml b/src/site/xdoc/doc_rest_server_jaxrs.xml deleted file mode 100644 index 3ad9c720d55..00000000000 --- a/src/site/xdoc/doc_rest_server_jaxrs.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - JAX-RS Server - James Agnew - - - - -
    -

    - The standard server is implemented using Servlet technology. A module - exists which implements the server using JAX-RS technology. - This enables the usage of existing Java EE interceptors and annotations. This module does not provide the full set of features. - - The server currently supports - Conformance Statements, - @Read, - @Search, - @Create, - @Update, - @Delete and - @Operation. -

    -

    - The primary intention for this project is to ensure that other web technologies (JAX-RS in this case) can be used together with the base-server functionality. - An example server can be found in the Git repo here. -

    - - -

    - The set-up of a JAX-RS server goes beyond the scope of this documentation. The implementation of the server follows the same pattern as the standard server. It is required - to put the correct annotation on the methods in the Resource Providers in order to be able to call them. -

    - -

    - Implementing a JAX-RS Resource Provider requires some JAX-RS annotations. The @Path - annotation needs to define the resource path. The @Produces annotation - needs to declare the produced formats. The constructor needs to pass the class of the object explicitely in order to avoid problems with proxy classes in a Java EE environment. - It is necessary to extend the abstract class - AbstractJaxRsResourceProvider. - - - - -

    - -

    - - Extended Operations require the correct JAX-RS ( - @Path, - @GET or - @POST) annotations. The body of the method needs to call the - method AbstractJaxRsResourceProvider#customOperation - with the correct parameters. The server will then call the method with corresponding name. - - - - -

    - -

    - In order to create the conformance profile, a conformance provider class needs to be deployed which exports the provider's conformance statements. - These providers need to be returned as the result of - the method AbstractJaxRsResourceProvider#getProviders. - This method is called once, during PostConstruct. - - - - -

    -
    - -
    - -
    - -

    - A complete example showing how to implement a JAX-RS RESTful server can - be found in our Git repo here: - https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jaxrsserver-example -

    - -
    - - - -
    diff --git a/src/site/xdoc/doc_rest_server_security.xml b/src/site/xdoc/doc_rest_server_security.xml deleted file mode 100644 index c6bdd974571..00000000000 --- a/src/site/xdoc/doc_rest_server_security.xml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Server Security - - - - - -
    - -

    - Security is a complex topic which goes far beyond the scope of HAPI FHIR. - HAPI does provide mechanisms which can be used to implement security in - your server however. -

    - -

    - Because HAPI FHIR's REST server is based on the Servlet API, you may use any - security mechanism which works in that environment. Some serlvet containers - may provide security layers you can plug into. The rest of this page - does not explore that method, but rather looks at HAPI FHIR hooks that can - be used to implement FHIR specific security. -

    - - - -

    - Background reading: Wikipedia - Authentication -

    -

    - Server security is divided into three topics: -

    -
      -
    • - Authentication (AuthN): Is verifying that the user is who they say they - are. This is typically accomplished by testing a username/password in the request, - or by checking a "bearer token" in the request. -
    • -
    • - Authorization (AuthZ): Is verifying that the user is allowed to perform - the given action. For example, in a FHIR application you might use AuthN to test that - the user making a request to the FHIR server is allowed to access the server, but - that test might determine that the requesting user is not permitted to perform - write operations and therefore block a FHIR create operation. This is - AuthN and AuthZ in action. -
    • -
    • - Consent and Audit: Is verifying that a user has rights to see/modify the specific - resources they are requesting, applying any directives to mask data being returned to the - client (either partially or completely), and creating a record that the - event occurred. -
    • -
    - -
    - -
    - -
    - -

    - The Server Interceptor - framework can provide an easy way to test for credentials. The following - example shows a simple interceptor which tests for HTTP Basic Auth. -

    - - - - - - - - -

    - Note that if you are implementing HTTP Basic Auth, you may want to - return a WWW-Authenticate header with the response. - The following snippet shows how to add such a header with a custom - realm: -

    - - - - - -
    - -
    - -
    - -

    - HAPI FHIR 1.5 introduced a new interceptor, the - AuthorizationInterceptor. -

    -

    - This interceptor can help with the complicated task of determining whether a user - has the appropriate permission to perform a given task on a FHIR server. This is - done by declaring a set of rules that can selectively allow (whitelist) and/or selectively - block (blacklist) requests. -

    - -

    - AuthorizationInterceptor has been well tested, but it is impossible to - predeict every scenario and environment in which HAPI FHIR will be used. - Use with caution, and do lots of testing! We welcome - feedback and suggestions on this feature. Please get in - touch if you'd like to help test, have suggestions, etc. -

    - -

    - The AuthorizationInterceptor works by allowing you to declare - permissions based on an individual request coming in. In other - words, you could have code that examines an incoming request and - determines that it is being made by a Patient with ID 123. You - could then declare that the requesting user has access to read and - write any resource in compartment "Patient/123", which corresponds - to any Observation, MedicationOrder etc with a subject of - "Patient/123". On the other hand, another request - might be detemrined to belong to an administrator user, and - could be declared to be allowed to do anything. -

    - -

    - The AuthorizationInterceptor is used by subclassing it and then registering your - subclass with the RestfulServer. The following example shows a subclassed - interceptor implementing some basic rules: -

    - - - - - - - - -

    - The AuthorizationInterceptor works by examining the client request - in order to determine whether "write" operations are legal, and looks at - the response from the server in order to determine whether "read" operations - are legal. -

    - -
    - - - -

    - When authorizing a read operation, the AuthorizationInterceptor - always allows client code to execute and generate a response. - It then examines the response that would be returned before - actually returning it to the client, and if rules do not permit - that data to be shown to the client the interceptor aborts the - request. -

    - -

    - Note that there are performance implications to this mechanism, - since an unauthorized user can still cause the server to fetch data - even if they won't get to see it. This mechanism should be comprehensive - however, since it will prevent clients from using various features - in FHIR (e.g. _include or _revinclude) to - "trick" the server into showing them date they shouldn't be allowed to - see. -

    - -

    - See the following diagram for an example of how this works. -

    - - Write Authorization - -
    - - - -

    - Write operations (create, update, etc.) are typically authorized - by the interceptor by examining the parsed URL and making a decision - about whether to authorize the operation before allowing Resource Provider - code to proceed. This means that client code will not have a chance to execute - and create resources that the client does not have permissions to create. -

    - -

    - See the following diagram for an example of how this works. -

    - - Write Authorization - -
    - - - -

    - There are a number of situations where the REST framework doesn't - actually know exactly what operation is going to be performed by - the implementing server code. For example, if your server implements - a conditional update operation, the server might not know - which resource is actually being updated until the server code - is executed. -

    -

    - Because client code is actually determining which resources are - being modified, the server can not automatically apply security - rules against these modifications without being provided hints - from client code. -

    -

    - In this type of situation, it is important to manually - notify the interceptor chain about the "sub-operation" being performed. - The following snippet shows how to notify interceptors about - a conditional create. -

    - - - - - - -
    - - -

    - The FHIR patch operation - presents a challenge for authorization, as the incoming request often contains - very little detail about what is being modified. -

    -

    - In order to properly enforce authorization on a server that - allows the patch operation, a rule may be added that allows all - patch requests, as shown below. -

    -

    - This should be combined with server support for - Authorizing Sub-Operations - as shown above. -

    - - - - - -
    - - - -

    - The AuthorizationInterceptor has the ability to direct individual - rules as only applying to a single tenant in a multitenant - server. The following example shows such a rule. -

    - - - - - -
    - -
    - -
    - -

    - HAPI FHIR 4.0.0 introduced a new interceptor, the - ConsentInterceptor. -

    -

    - The consent interceptor may be used to examine client requests to apply - consent directives and create audit trail events. Like the AuthorizationInterceptor - above, this interceptor is not a complete working solution, but instead is a - framework designed to make it easier to implement local policies. -

    -

    - The consent interceptor has several primary purposes: -

    -
      -
    • - It can reject a resource from being disclosed to the user by examining it - while calculating search results. This calculation is performed very early - in the process of building search results, in order to ensure that - in many cases the user is unaware that results have been removed. -
    • -
    • - It can redact results, removing specific elements before they are - returned to a client. -
    • -
    • - It can create audit trail records (e.g. using an AuditEvent resource) -
    • -
    • - It can apply consent directives (e.g. by reading relevant Consent resources) -
    • -
    • - The consent service suppresses search the total being returned in - Bundle.total for search results. -
    • -
    -

    - The ConsentInterceptor requires a user-supplied instance of the - IConsentService - interface. The following shows a simple example of an IConsentService implementation: -

    - - - - - -
    - -
    - -

    - HAPI FHIR 3.7.0 introduced a new interceptor, the - SearchNarrowingInterceptor. -

    -

    - This interceptor is designed to be used in conjunction with AuthorizationInterceptor. It - uses a similar strategy where a dynamic list is built up for each request, but the - purpose of this interceptor is to modify client searches that are received (after - HAPI FHIR received the HTTP request, but before the search is actually performed) - to restrict the search to only search for specific resources or compartments that the - user has access to. -

    -

    - This could be used, for example, to allow the user to perform a search for
    - http://baseurl/Observation?category=laboratory
    - and then receive results as though they had requested
    - http://baseurl/Observation?subject=Patient/123&category=laboratory. -

    -

    - An example of this interceptor follows: -

    - - - - - -
    - - - -
    diff --git a/src/site/xdoc/doc_server_tester.xml.vm b/src/site/xdoc/doc_server_tester.xml.vm deleted file mode 100644 index b8e0cb73891..00000000000 --- a/src/site/xdoc/doc_server_tester.xml.vm +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - Server Tester - James Agnew - - - - -
    - - - - -

    - HAPI FHIR includes a web UI that can be used to test your server implementation. - This UI is the same UI used on the http://fhirtest.uhn.ca - public server. -

    - -

    - The Tester is a - Maven WAR Overlay, - meaning that you create your own WAR project (which you would likely be doing anyway - to create your server) and the overlay drops a number of files into your project. -

    - - - -

    - These instructions assume that you have an exsiting web project - which uses Maven to build. The POM.xml should have a "packaging" - type of "war". -

    - -

    - Adding the overlay to your project is relatively simple. First, - add the "hapi-fhir-testpage-overlay" dependency to the dependencies - section of your POM.xml file. - - - - - ca.uhn.hapi.fhir - hapi-fhir-testpage-overlay - ${project.version} - war - provided - - - ca.uhn.hapi.fhir - hapi-fhir-testpage-overlay - ${project.version} - classes - provided - -]]> -

    - -

    - Then, add the following WAR plugin to the plugins section - of your POM.xml - - - - - - org.apache.maven.plugins - maven-war-plugin - - - - ca.uhn.hapi.fhir - hapi-fhir-testpage-overlay - - - - - -]]> -

    - -

    - Then, create a Java source file - called FhirTesterConfig.java - and copy in the following contents: -

    - - - - -

    - Note that the URL in the file above must be customized to point to - the FHIR endpoint your server will be deployed to. For example, if you - are naming your project "myfhir-1.0.war" and your endpoint in the WAR is - deployed to "/fhirbase/*" then you should put a URL similar to - http://localhost:8080/myfhir-1.0/fhirbase -

    - -

    - Next, create the following directory in your project - if it doesn't already exist:
    - src/main/webapp/WEB-INF -

    - -

    - In this directory you should open your web.xml file, or create - it if it doesn't exist. - This file is - required in order to deploy to a servlet container and you should create it if - it does not already exist. Place the following contents in that file, adjusting - the package on the FhirTesterConfig to match the - actual package in which you placed this file. -

    - - - spring - org.springframework.web.servlet.DispatcherServlet - - contextClass - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - contextConfigLocation - ca.uhn.example.config.FhirTesterConfig - - 2 - - - spring - /tester/* - -]]> - -
    - - - -

    - The most important customization required is to - set the FHIR server base URL in the - hapi-fhir-tester-config.xml - configuration file created during the - previous step. -

    - -

    - Beyond this, the entire tester application is built - from a number of - Thymeleaf - template files, any of which can be replaced to - create your own look and feel. All of the templates - can be found in your built war (after running the Maven - build), or in the target directory's staging area, in - WEB-INF/templates. By placing a file - with the same path/name in your src/main/webapp/WEB-INF/templates - directory you can replace the built in template - with your own file. -

    - -
    - - - -

    - The "Restful Server Example" project contains a complete working - example of the FHIR Tester as a part of its configuration. You may - wish to browse its source to see how this works:
    - https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example -

    - -
    - -
    - -
    - -

    - The testing UI uses its own client to talk to your FHIR server. In other words, there are no - special "hooks" which the tested uses to retrieve data from your server, it acts as an HTTP client - just like any other client. -

    - -

    - This does mean that if your server has any authorization requirements, you will need to configure the - tester UI to meet those requirements. For example, if your server has been configured to require - a HTTP Basic Auth header (e.g. Authorization: Basic VVNFUjpQQVNT) you need to - configure the tester UI to send those credentials across when it is acting as - a FHIR client. -

    - -

    - This is done by providing your own implementation of the ITestingUiClientFactory - interface. This interface takes in some details about the incoming request and produces - a client. -

    - -
    - - - -
    diff --git a/src/site/xdoc/doc_tags.xml b/src/site/xdoc/doc_tags.xml deleted file mode 100644 index 30c61ebed23..00000000000 --- a/src/site/xdoc/doc_tags.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Resource Tags - James Agnew - - - - -
    - -

    - FHIR defines a useful framework for adding/updating/removing - Tags - against resource instances. A tag is a pair of URLs (a scheme, and a term) which - can optionally have a textual "label" as well. -

    - -

    - A specific resource instance's tags can be found in the resource - metadata - map, using the key of - ResourceMetadataKeyEnum.TAG_LIST. - The following example shows how to access the tags in a client - following a "read" operation: -

    - - - - - - - -

    - In a server implementation, you might want to - add tags to a resource being returned. This is done - by adding a TagList instance to the resource's - metadata, as shown in the example below. -

    - -

    - The server will then do the "right thing" with the tags. If the method - is for a search operation, the tags will be added to the category - element in the - returned bundle. If the method is for a read operation, the - tags will be added to the response "Category" headers. -

    - - - - - -
    - -
    - - - -
    diff --git a/src/site/xdoc/doc_tinder.xml.vm b/src/site/xdoc/doc_tinder.xml.vm deleted file mode 100644 index 19b71a0391f..00000000000 --- a/src/site/xdoc/doc_tinder.xml.vm +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Tinder - James Agnew - - - - - - -
    - - - - -

    - According to the FHIR specification, any conformant server - must be able to export a Conformance statement, which - indicates all of the resource types and potential operations - that the server supports. -

    - -

    - HAPI provides a Maven plugin called "Tinder" which is able to automatically - generate a client based on that conformance statement. -

    - -
    - -
    - -

    - The following example shows a simple Maven plugin which - builds a client for the Health Intersections reference - server. -

    - -

    - Note that as of HAPI 0.8, you need to add a dependency to the - plugin containing the version of FHIR you are building custom - structures against. -

    - - - - ca.uhn.hapi.fhir - hapi-tinder-plugin - ${project.version} - - - generate-structures - - ca.uhn.hitest.HiTest - http://fhir.healthintersections.com.au/open - true - - - - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu - ${project.version} - - - -]]> - -

    - This example will create a class called - ca.uhn.hitest.HiTest which has - methods to invoke the various server operations. -

    - -

    - It is then possible to use this client as simply as: -

    - - - -
    - - - -
    diff --git a/src/site/xdoc/doc_upgrading.xml b/src/site/xdoc/doc_upgrading.xml deleted file mode 100644 index 34e47f38f8d..00000000000 --- a/src/site/xdoc/doc_upgrading.xml +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Upgrade Guide - James Agnew - - - - -
    - -

    - Since the early days of FHIR, HL7.org has provided an - open source "Java Reference Implementation", which is an implementation - of a FHIR data model, parser, and client in Java. -

    -

    - HAPI was originally started as a separate Java implementation of FHIR, - with a fairly different focus: implementing servers with an easily - extendible data model. Over time though, the two Java implementations have - shown a fair bit of overlap, so at the 2014 - DevDays we decided - to try and harmonize the two libraries. -

    -

    - HAPI FHIR 1.1 begins the availability of a harmonized library. Note that - this version has not yet been formally released, but is currently available in - "snapshot" development builds. -

    -

    - For HAPI FHIR users: This integration will bring the ability to use powerful features - from the RI in your applications, such as the resource validator and the narrative - generator. -

    -

    - For RI users: This integration will bring the ability to use HAPI's client - and server frameworks in your application, as well as the ability to take advantage - of HAPI's code-first statically bound extension mechanism. -

    - - -

    - At this point, the RI integration consists of a new parallel set of - classes representing the FHIR data model. For example, in addition to the - Patient classes representing HAPI's DSTU1 and DSTU2 models there is now - a new Patient class representing the RI structure (which is also a DSTU2 - structure). -

    -

    - The reference implementation (RI) structures have been added as a new - maven dependency library called hapi-fhir-structures-hl7org-dstu2. See - the download page for information on the Maven - dependencies for this version of the structures. -

    -

    - A new interface has been added which serves as a master interface - for all resource classes: org.hl7.fhir.instance.model.api.IBaseResource. - All RI resource classes will be in the package org.hl7.fhir.instance.model, - as shown below. -

    - Structures - -

    - Datatypes will also be found inthe same package. Unlike HAPI datatype structures, - which all end with "Dt", the RI primitive structure names end with "Type" and the - RI composite structures have no suffix, as shown below. -

    - Structures - -
    - - - -

    - If you want to use the RI structures in your application, - you will need to use the "hapi-fhir-structures-hl7org-dstu2-[version].jar" - library. -

    - -

    - Using these structures is then similar to using other structures. -

    - - - - - - -
    - -
    - -
    - -

    - If you have an existing application built using a version of previous - version of HAPI FHIR, there is one change that may affect you. As shown above, - a new interface called IBaseResource has been introduced, and the - IResource interface extends from it. Many methods in the API which - previously returned IResource now return IBaseResource. -

    -

    - For these methods, you may cast the IBaseResource to - IResource. -

    - -
    - - - - - - -
    diff --git a/src/site/xdoc/doc_validation.xml b/src/site/xdoc/doc_validation.xml deleted file mode 100644 index 50bf5bcb91c..00000000000 --- a/src/site/xdoc/doc_validation.xml +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - Validation - James Agnew - - - -
    - -

    - HAPI supportes two types of validation, both of which are described in the - sections below. -

    -
      -
    • - Parser Validation - is validation at runtime during the parsing - of a resource. It can be used to catch input data that is impossible to - fit into the HAPI data model. For - example, it can be used to throw exceptions - or display error messages if a resource being parsed contains elements for which - there are no appropriate fields in a HAPI data structure. This is useful in order to ensure - that no data is being lost during parsing, but is less comprehensive than resource validation - against raw text data. -
    • -
    • - Resource Validation - is validation of the raw or parsed resource against - the official FHIR validation rules (e.g. Schema/Schematron/Profile/StructureDefinition/ValueSet) - as well as against custom profiles which have been developed. -
    • -
    - -
    - - -
    - -

    - Parser validation is controlled by calling - setParserErrorHandler(IParserErrorHandler) - on - either the FhirContext or on individual parser instances. This method - takes an - IParserErrorHandler - , which is a callback that - will be invoked any time a parse issue is detected. -

    -

    - There are two implementations of - IParserErrorHandler - worth - mentioning. You can also supply your own implementation if you want. -

    -
      -
    • - LenientErrorHandler - logs any errors but does not abort parsing. By default this handler is used, and it - logs errors at "warning" level. It can also be configured to silently - ignore issues. -
    • -
    • - StrictErrorHandler - throws a - DataFormatException - if any errors are detected. -
    • -
    - -

    - The following example shows how to configure a parser to use strict validation. -

    - - - - - -

    - You can also configure the error handler at the FhirContext level, which is useful - for clients. -

    - - - - - -

    - FhirContext level validators can also be useful on servers. -

    - - - - - -
    - - - -
    - -

    - HAPI provides a built-in and configurable mechanism for validating resources. - This mechanism is called the - Resource Validator. -

    -

    - The resource validator is an extendible and modular system, and you - can configure it in a number of ways in order to get the specific - type of validation you want to achieve. -

    - -

    - The validator can be manually invoked at any time by creating a - validator and configuring it with one or more - IValidatorModule - instances. -

    - - - - - - -
    - -
    - -

    - HAPI also supports validation against StructureDefinition - resources. This functionality uses the HL7 "InstanceValidator", which is able - to check a resource for conformance to FHIR profiles - (StructureDefinitions, ValueSets, and CodeSystems), - including validating fields, extensions, and codes for conformance to their given ValueSets. -

    -

    - StructureDefinition validation can be used to validate a resource against the - official structure definitions (produced by HL7) as well as against custom - definitions provided either by HL7 or by the user. -

    - -

    - The instance validator is experimental in the DSTU2 mode, but has become very stable - and full-featured in DSTU3+ mode. Use with caution when validating DSTU2 resources using - instance validator. -

    - - - -

    - To execute the validator, you simply create an instance of - FhirInstanceValidator - and register it to new validator, as shown in the example below. -

    - -

    - Note that the example below uses the official FHIR StructureDefintions and ValueSets - to validate the resource. It will not work unless you include the - hapi-fhir-validation-resources-[version].jar to your classpath. -

    - - - - - - -
    - - - -

    - The FhirInstanceValidator relies on the - IValidationSupport - interface to load StructureDefinitions, and validate codes. -

    -

    - By default, the - DefaultProfileValidationSupport - implementation is used. This implementation loads the FHIR profiles from the - validator resources JAR. If you want to use your own profiles, you may wish to - supply your own implementation. -

    - - - - - - -
    - -
    - -
    - -

    - FHIR resource definitions are distributed with a set of XML schema files (XSD) - as well as a set of XML Schematron (SCH) files. These two sets of files are - complimentary to each other, meaning that in order to claim compliance to the - FHIR specification, your resources must validate against both sets. -

    -

    - The two sets of files are included with HAPI, and it uses them to perform - validation. -

    - - - -

    - In order to use HAPI's Schematron support, a libaray called - Ph-Schematron - is used, so this library must be added to your classpath (or Maven POM file, Gradle - file, etc.) - Note that this library is specified as an optional dependency - by HAPI FHIR - so you need to explicitly include it if you want to use this - functionality. -

    -

    - See - Downloads - for more information on how - to add it. -

    -
    - - - -

    - To validate a resource instance, a new validator instance is requested - from the FHIR Context. This validator is then applied against - a specific resource - instance, as shown in the example below. -

    - - - - - -
    - - - -

    - The following example shows how to load a set of resources from files - on disk and validate each one. -

    - - - - - -
    - - -
    - - - -
    diff --git a/src/site/xdoc/docindex.xml b/src/site/xdoc/docindex.xml deleted file mode 100644 index 226d7e8b457..00000000000 --- a/src/site/xdoc/docindex.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Documentation - James Agnew - - - - -
    - -

    - Welcome to HAPI FHIR! We hope that the documentation here will be - helpful to you. -

    - -
    - -

    The Data Model

    - - -

    RESTful Client

    - - -

    RESTful Server

    - - -

    Other Features

    - - - -

    JavaDocs

    - - -

    Source Cross Reference

    - - -
    - - - - diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm deleted file mode 100644 index d15f8d6a12f..00000000000 --- a/src/site/xdoc/download.xml.vm +++ /dev/null @@ -1,655 +0,0 @@ - - - - - Download - - - - - - - -
    -

    - The following table shows the various versions of the HAPI FHIR library, and - the versions of the FHIR standard that they support. Note that support for - stable releases of FHIR are shown in - GREEN - and support for draft pre-release versions of FHIR are shown in - YELLOW. -

    -

    - Note also that after the release of the FHIR DSTU2 specification, the FHIR - standard itself stopped using the DSTUx naming scheme, in favour or naming - new releases STUx or simply Rx. Because HAPI FHIR already had draft support - for what was then called DSTU3 at this time, we did not update our naming - conventions until R4 in order to avoid breaking existing users' code. - From the perspective of a user of HAPI FHIR, consider the terms - DSTU3 / STU3 / R3 to be interchangeable. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    HAPI VersionMin JDKDSTU1DSTU2DSTU2.1DSTU3R4R5
    HAPI FHIR 1.1JDK60.0.820.5.0-5843
    HAPI FHIR 1.2JDK60.0.820.5.0-5843
    HAPI FHIR 1.3JDK60.0.821.0.2
    HAPI FHIR 1.4JDK60.0.821.0.21.3.0-7602
    HAPI FHIR 1.5JDK60.0.821.0.21.4.0-8138
    HAPI FHIR 1.6JDK60.0.821.0.21.4.0-8636
    HAPI FHIR 2.0JDK60.0.821.0.21.6.0-9663
    HAPI FHIR 2.1JDK60.0.821.0.21.7.0-10129
    HAPI FHIR 2.2JDK60.0.821.0.21.4.01.8.0-10528
    HAPI FHIR 2.3JDK60.0.821.0.21.4.01.9.0-11501
    HAPI FHIR 2.4JDK60.0.821.0.21.4.03.0.1
    HAPI FHIR 2.5JDK60.0.821.0.21.4.03.0.1
    HAPI FHIR 3.0.0JDK71.0.21.4.03.0.13.1.0-12370
    HAPI FHIR 3.1.0JDK71.0.21.4.03.0.13.1.0-12370
    HAPI FHIR 3.2.0JDK71.0.21.4.03.0.13.2.0-12917
    HAPI FHIR 3.3.0JDK71.0.21.4.03.0.13.2.0-13271
    HAPI FHIR 3.4.0JDK81.0.21.4.03.0.13.4.0-13732
    HAPI FHIR 3.5.0JDK81.0.21.4.03.0.13.4.0-13732
    HAPI FHIR 3.6.0JDK81.0.21.4.03.0.13.6.0-1202b2eed0f
    HAPI FHIR 3.7.0JDK81.0.21.4.03.0.14.0.0
    HAPI FHIR 3.8.0JDK81.0.21.4.03.0.14.0.0
    HAPI FHIR 4.0.0JDK81.0.21.4.03.0.14.0.04.1.0-e0e3caf9ba
    HAPI FHIR 4.1.0JDK81.0.21.4.03.0.24.0.14.1.0-1a7623d866
    - -
    - -
    -

    - The following table shows the modules that make up the HAPI - FHIR library. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Core Libraries
    hapi-fhir-base - This is the core HAPI FHIR library and is always required in order to use - the framework. It contains the context, parsers, and other support classes. -
    hapi-fhir-utilities - This is a support library containing various utility methods for working with - FHIR. It is always required in order to use the framework. -
    Structures
    hapi-fhir-structures-dstu - This module contains FHIR DSTU1 model classes. It was retired in HAPI FHIR 3.0.0. -
    hapi-fhir-structures-dstu2 - This module contains FHIR DSTU2 model classes. -
    hapi-fhir-structures-hl7org-dstu2 - This module contains alternate FHIR DSTU2 model classes. The HAPI FHIR and FHIR "Java Reference Implementation" - libraries were merged in 2015, and at the time there were two parallel sets of DSTU2 model - classes. This set more closely resembles the model classes for DSTU3+ where the other set - more closely resembles the DSTU1 model classes. The two DSTU2 model JARs are functionally - identital, but the various utility methods on the classes are somewhat different. -
    hapi-fhir-structures-dstu3 - This module contains FHIR DSTU3 model classes. -
    hapi-fhir-structures-r4 - This module contains FHIR R4 model classes. -
    Client Framework
    hapi-fhir-client - This module contains the core FHIR client framework, including an - HTTP implementation based on - Apache HttpClient. It is required in order - to use client functionality in HAPI. -
    hapi-fhir-client-okhttp - This module contains an alternate HTTP implementation based on - OKHTTP. -
    hapi-fhir-android - This module contains the Android HAPI FHIR framework, which is a FHIR - client framework which has been tailed specifically to run on Android. -
    Validation
    hapi-fhir-validation - This module contains the FHIR Profile Validator, which is used to - validate resource instances against FHIR Profiles (StructureDefinitions, - ValueSets, CodeSystems, etc.). -
    hapi-fhir-validation-resources-dstu2 - This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, - and Schematrons for FHIR DSTU2 -
    hapi-fhir-validation-resources-dstu2.1 - This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, - and Schematrons for FHIR DSTU2.1 -
    hapi-fhir-validation-resources-dstu3 - This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, - and Schematrons for FHIR DSTU3 -
    hapi-fhir-validation-resources-r4 - This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, - and Schematrons for FHIR R4 -
    Server
    hapi-fhir-server - This module contains the HAPI FHIR Server framework, which can be used to - develop FHIR compliant servers against your own data storage layer. -
    hapi-fhir-jpaserver-base - This module contains the HAPI FHIR "JPA Server", which is a complete - FHIR server solution including a database and implementations of many - advanced FHIR server features. -
    hapi-fhir-testpage-overlay - This module contains the web based "testpage overlay", which is the - UI that powers our - Public Demo Server - and can also be added to your applications. -
    -
    - -
    -

    - If you are developing applications in Java, the easiest way to use HAPI is - to use a build system which handles dependency management automatically. The - two most common such systems are - Apache Maven and - Gradle. These systems will automatically - download "dependency" libraries and add them to your classpath. - If you are not using one of these systems, you can still manually download - the latest release of HAPI by looking in the - GitHub Release Section. -

    - - -

    - FHIR is a fast moving specification, and there is a lot of ongoing work - in HAPI as well. While we regularly put out new releases, there may be - times when you want to try out the latest unreleased version. You can ususally - look at the source of the - changes report - to get a sense of what has changed in the next unreleased version. -

    -

    - See using snapshot builds below to find out - how to get these builds. -

    -
    - -
    - -
    -

    - To use HAPI in your application, at a minimum you need to include the HAPI-FHIR core - JAR hapi-fhir-base-[version].jar, as well as at least one "structures" JAR. - The structures JAR contains classes with the resource and datatype definitions for a given - version of FHIR. -

    - - - -

    - HAPI also has a hapi-fhir-structures-dstu2-[version].jar, which - contains the latest versions of the releases. You can include this JAR on - your classpath if you want to use resources that were created or updated by - HL7 after the DSTU1 release. Be warned though that using these resources - can lead to incompatibility between your application and other applications - if those applications are designed to be compliant with FHIR DSTU1. -

    - -

    - If you are using Maven, add the following dependency to include DSTU2 resources. - Note that if you do not need to support DSTU1 resources, you do not need to - include the "hapi-fhir-structures-dstu" artifact. -

    - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2 - ${project.version} -]]> - -
    - - - -

    - To use the HL7.org reference implementation structures - (see the DSTU2 page for more information), - use the following dependency. -

    - - ca.uhn.hapi.fhir - hapi-fhir-structures-hl7org-dstu2 - ${project.version} -]]> - -

    - If you want to use HAPI's - StructureDefinition validation - you will also need to include the hapi-fhir-validation-resources-dstu2-[version].jar: -

    - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu2 - ${project.version} -]]> - -
    - -
    - -
    -

    - If you are using Gradle, you may use the following dependencies. Note that if - you are doing Android development, you may want to use our - Android build instead. -

    -

    - DSTU1: -

    - -

    - DSTU2 (HAPI): -

    - -

    - DSTU2 (RI): -

    - -
    - -
    - -

    - Snapshot builds of HAPI are pre-release builds which can contain - fixes and new features not yet released in a formal release. To use - snapshot builds of HAPI you may need to add a reference to the OSS snapshot - repository to your project build file. -

    -

    - Using Maven: -

    - - - - oss-snapshots - - true - - https://oss.sonatype.org/content/repositories/snapshots/ - -]]> - -

    - Using Gradle: -

    - - -
    - -
    - -

    - The HAPI-FHIR library depends on other libraries to provide specific functionality. - Some of those libraries are listed here: -

    - - - -

    - HAPI requires SLF4j for logging support, and it is recommended to include - an underlying logging framework such as Logback. See the - logging documentation for - more information. -

    - -
    - - - -

    - XML processing (for resource marshalling and unmarshalling) uses the - Java StAX API, which is a fast and efficient API for XML processing. - HAPI bundles (for release archives) and depends on (for Maven builds) - the Woodstox library, which - is a good implementation of StAX. -

    -

    - Upon starting up, HAPI will emit a log line indicating which StAX implementation - is being used, e.g: -

    - 08:01:32.044 [main] INFO ca.uhn.fhir.util.XmlUtil - FHIR XML procesing will use StAX implementation 'Woodstox XML-processor' version '4.4.0' -

    - Although most testing is done using the Woodstox implementation of - StAX, it is not required and HAPI should work correctly with any - compliant implementation of StAX. -

    -

    - You can force Woodstox in an environment where multiple StAX libraries are - present by setting the following system properties: -

    - System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory"); -System.setProperty("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); -System.setProperty("javax.xml.stream.XMLEventFactory", "com.ctc.wstx.stax.WstxEventFactory"); - -
    - - - -

    - If you are using the - Schematron Validatioon - module, you will also need to include the Ph-Schematron library on your - classpath. (Note that prior to HAPI FHIR 3.4.0 we used Phloc-Schamtron - instead, but that lirary has been discontinued) -

    -

    - If you are using Maven, this library is not added by default (it is - marked as an optional dependency) since not all applications need Schematron - support. As a result you will need to manually add the following - dependencies to your project POM.xml -

    - - com.helger - ph-schematron - ${ph_schematron_version} - - - com.helger - ph-commons - ${ph_commons_version} -]]> -
    - - -
    - - - -
    diff --git a/src/site/xdoc/hacking_hapi_fhir.xml b/src/site/xdoc/hacking_hapi_fhir.xml deleted file mode 100644 index 684507f5738..00000000000 --- a/src/site/xdoc/hacking_hapi_fhir.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - Hacking HAPI FHIR - - - - -
    - -

    - This page contains useful information about how to get started in developing - HAPI FHIR itself. -

    - -
    - -
    - -

    - The HAPI FHIR Codebase - has a number of subprojects. You will typically need to interact with several - of them in order to develop HAPI, but you generally don't need all of them. -

    - -

    - The following is a list of key subprojects you might open in your IDE: -

    -
      -
    • - hapi-fhir-base: - This is the core library, containing the parsers, client/server frameworks, and many other features. Note - that this module does not contain any model classes (e.g. the Patient model class) as these are found - in "structures" projects below. -
    • -
    • - hapi-fhir-structures-[version]: - There are several structures projects (e.g. hapi-fhir-structures-dstu2), each of - which contains model classes for a specific version of FHIR.It is generally a good idea - to open all of these in your IDE. -
    • -
    • - hapi-fhir-validation-resources-[version]: - There are several validation resources projects (e.g. hapi-fhir-validation-resources-dstu2), each of - which contains text resources for the given version. These resources are text resources produced - as a part of the FHIR specification build (e.g. StructureDefinitions, ValueSets, etc.) -
    • -
    • - hapi-fhir-jpaserver-base: - This module contains the JPA server. -
    • -
    - -
    - -
    -

    - Build Status -

    -

    - The best way to grab our sources is with Git. Grab the repository URL - from our GitHub page. - We try our best to ensure that the sources are always left in a buildable state. Check - Travis (see the image/link on the right) to see if the sources currently build. -

    -
    - -
    -

    - HAPI is built primary using - Apache Maven. Even if you are using an IDE, - you should start by performing a command line build before trying to get - everything working in an IDE. -

    -

    - Execute the build with the following command:
    - mvn install -

    -

    - Note that this complete build takes a long time because of all of the unit tests - being executed. At the end you should expect to see a screen resembling:
    -

    []INFO] ------------------------------------------------------------------------
    -[INFO] Reactor Summary:
    -[INFO] 
    -[INFO] HAPI-FHIR .......................................... SUCCESS [  4.456 s]
    -[INFO] HAPI FHIR - Deployable Artifact Parent POM ......... SUCCESS [  2.841 s]
    -[INFO] HAPI FHIR - Core Library ........................... SUCCESS [01:00 min]
    -[INFO] HAPI Tinder Plugin ................................. SUCCESS [ 19.259 s]
    -[INFO] HAPI FHIR Structures - DSTU1 (FHIR v0.80) .......... SUCCESS [01:40 min]
    -[INFO] HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) ......... SUCCESS [01:14 min]
    -[INFO] HAPI FHIR Structures - DSTU3 ....................... SUCCESS [02:11 min]
    -.... some lines removed .....
    -[INFO] ------------------------------------------------------------------------
    -[INFO] BUILD SUCCESS
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Total time: 20:45 min
    -[INFO] Finished at: 2016-02-27T15:05:35+00:00
    -

    - - - -

    - If the build fails to execute successfully, try the following: -

    -
      -
    • - The first thing to try is always a fresh clean build when things aren't working:
      -
      mvn clean install
      -
    • -
    • - If you are trying to build a submodule (e.g. hapi-fhir-jpaserver-example), - try building the root project first. Especially when building from the Git master, - often times there will be dependencies that require a fresh complete build (note that this is - not generally an issue when building from a release version)
      -
      -
    • -
    • - If the build fails with memory issues (or mysteriously dies during unit tests), - your build environment may be running out of memory. By default, the HAPI build executes - unit tests in multiple parallel JVMs in order to save time. This can consume a lot of RAM - and sometimes causes issues. Try executing with the following command to disable - this behaviour:
      -
      mvn -P ALLMODULES,NOPARALLEL install
      -
    • -
    • - If you figure something else out, please let us know so that we can add it - to this list! -
    • -
    - -
    - -
    - -
    -

    - This section shows how to import HAPI into Eclipse. There is no requirement - to use Eclipse (IntelliJ/IDEA and Netbeans are both fine!) so feel free to - skip this section. -

    -

    - Maven Import
    - Import the HAPI projects as Maven Modules by selecing - File -> Import... from the File menu. Then select - Existing Module Projects as shown below. -

    -

    -

    - Select the Projects
    - Next, browse to the directory where you checked out the HAPI FHIR sources. - You might want to select only the projects you are interested in editing, - in order to keep Eclipse's memory use down. You can always come back and - import more later. -

    - - - - -

    - When importing the HAPI projects into Eclipse, sometimes Eclipse - will fail to correctly import libraries. If you import a module - into Eclipse and it fails to compile with many errors relating to - packages other than HAPI's, the following steps will fix this: -

    -
      -
    • Delete the project from your Eclipse workspace
    • -
    • - On the local filesystem, delete the files .project - and .classpath, and the directory .settings - from each module you want to open. -
    • -
    • - Import each module again using the instructions above -
    • -
    - -
    - -
    - - -
    diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml deleted file mode 100644 index 9bd466af806..00000000000 --- a/src/site/xdoc/index.xml +++ /dev/null @@ -1,1437 +0,0 @@ - - - - - The Open Source HL7 API for Java - James Agnew - - - - - -
    -

    - -
    - -
    - -
    - Build Status -
    - Coverage Status -
    - Maven Central -
    - Apache 2.0 Licensed -

    - -

    - This is the homepage for the HAPI-FHIR library. We are developing - an open-source implementation of the FHIR specification in Java. - FHIR - (Fast Healthcare Interoperability Resources) - is a specification for exchanging healthcare data in a modern - and developer friendly way. -

    - -

    - Note that this is the home for the FHIR version of HAPI. If you are - looking for HL7 v2 support, click here. -

    - - - -

    - A public test server is now operating at - http://hapi.fhir.org. - This server is built entirely using components of HAPI-FHIR - and demonstrates all of its capabilities. This server is also - entirely open source. You can host your own copy by - following instructions on our - JPA Server - documentation. -

    - -
    - - - -

    - Commercial support for HAPI FHIR is available through - Smile CDR. -

    - -
    - -
    - -
    -

    - November 13, 2019 - HAPI FHIR 4.1.0 (Jitterbug) - - It's time for another release of HAPI FHIR! -

    -

    - This release brings some good stuff, including: -

    -
      -
    • - Structures JARs have been updated to incorporate the latest technical corrections. - DSTU3 structures are upgraded to FHIR 3.0.2, R4 structures are upgraded to - FHIR 4.0.1, and R5 draft structures are upgraded to the October 2019 draft revision. -
    • -
    • - ValueSets are now automatically pre-expanded by the JPA server into - a dedicated set of database tables. This "precalculated expansion" is used - to provide much better performance for validation and expanion operations, and - introduced the ability to successfully expand very large ValueSets - such as the LOINC implicit (all codes) valueset. -
    • -
    • - Support for the FHIR Bulk Export specification has been added. We are now - working on adding support for Bulk Import! -
    • -
    • - First-order support for ElasticSearch as a full-text and terminology service - backend implementation. At this time, both raw Lucene and ElasticSearch are - supported (this may change in the future but we do not have any current - plans to deprecate Lucene). -
    • -
    • - Live Terminology Service operations for terminology file maintenance based on - delta files has been added. -
    • -
    • - Binary resources and Media/DocumentReference instances with binary attachments - stored in the FHIR repository can now take advantage of - externalized binary storage for the binary content when that feature is enabled. - This allows much better scalability of repositories containing large amounts - of binary content (e.g. document repositories). -
    • -
    -

    - As always, see the - changelog for a full list - of changes. -

    -

    - Thanks to everyone who contributed to this release! -

    -

    - Also, as a reminder, if you have not already filled out our annual - user survey, please take a moment to do so. Access the survey here: - http://bit.ly/33HO4cs (note that this URL was originally posted incorrectly. It is now fixed) -

    -

    - - James Agnew -

    -

    - - - -

    - September 3, 2019 - Community Survey and HAPI FHIR 4.0.1 - - It is time for us to do another HAPI FHIR community survey. The survey is a not-quite-annual - tradition that helps us to set priority for the coming year and get a pulse on how people - are using HAPI FHIR. -

    -

    - We would very much appreciate if everyone could take a few minutes to fill it out. The - survey is short (2 pages / 5 mins) so it shouldn't be much of a burden. -

    -

    - Access the survey here: - http://bit.ly/33HO4cs (note that this URL was originally posted incorrectly. It is now fixed) -

    -

    - In addition, a new HAPI FHIR release (4.0.1) has been uploaded to the - Maven Central repos. - This release contains no new or updated functionality, but addressed a dependency - version that was left incorrectly requiring a SNAPSHOT maven build of the - org.hl7.fhir.utilities module. Users who are successfully using HAPI FHIR 4.0.0 - do not need to upgrade, but any users who were blocked from upgrading due to - snapshot dependency issues are advised to upgrade immediately. -

    - - - -

    - August 14, 2019 - HAPI FHIR 4.0.0 (Igloo) Released - - The next release of HAPI has now been uploaded to the Maven repos and - GitHub's releases section. -

    -

    - This release features a number of significant performance improvements, - and has some notable changes: -

    -
      -
    • - A new consent framework called ConsentInterceptor that can be used to apply local consent directives and policies, and potentially filter or mask data has been added. -
    • -
    • - Initial support for draft FHIR R5 resources has been added. -
    • -
    • - Support for GraphQL and the _filter search parameter has been added. -
    • -
    • - The ability to perform cascading deletes has been added. -
    • -
    -

    - As always, see the - changelog for a full list - of changes. You can also watch the release webinar! -

    -

    - Thanks to everyone who contributed to this release! -

    -

    - - James Agnew -

    -

    - - - - - - - - - - - - - - - - - - - -
    - -
    -

    - HAPI FHIR is a simple-but-powerful library for adding FHIR messaging to your application. It - is pure Java (1.6+ compatible), and licensed under the business-friendly Apache Software - License, version 2.0. -

    - - -

    - HAPI is designed with one main intent: providing a flexible way of adding - FHIR capability to applications. We at University Health Network - developed HAPI-FHIR to allow us to - build up our own unified FHIR RESTful server which exposes data backed by - a number of systems and repositories, so it is designed to be flexible - above all else. -

    -

    - The library is designed to support several main usage patterns: -
    - -

    -
    - - - -

    - The HAPI API is designed to allow interaction with - FHIR model objects using a convenient - Fluent Interface. -

    - - -
    - - -

    - Both XML and JSON encoding are suported natively using a simple API - to pick between them. XML support is built on top of the lightning-fast - STaX/JSR 173 - API, and JSON support is provided using Google Gson. -

    - - - -
    - - -

    - Creating clients is simple and uses an annotation based format - that will be familiar to users of JAX-WS. -

    - - findPatientsByIdentifier(@RequiredParam(name="identifier") IdentifierDt theIdentifier); - - /** A FHIR create */ - @Create - public MethodOutcome createPatient(@ResourceParam Patient thePatient); -}]]> - -

    - Using this client is as simple as: -

    - - clients = client.findPatientsByIdentifier(searchParam);]]> - -
    -
    - - - -
    diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index acc1aa4da1b..f8341fb7b9a 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index e2c2c0c28dc..c1332424852 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 2b0fddd66ed..dbe808d05ec 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.2.0-SNAPSHOT + 5.0.0-SNAPSHOT ../../pom.xml